From: Michael Marley Date: Tue, 5 May 2015 01:27:14 +0000 (-0400) Subject: Fix SQL errors caused by sender insertion from multiple threads X-Git-Tag: travis-deploy-test~514^2~1 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=09b9df73ca9decca2555f1d0024806cfd090ea5a;hp=09b9df73ca9decca2555f1d0024806cfd090ea5a Fix SQL errors caused by sender insertion from multiple threads At least on Qt5, the QSqlQuery.lastQuery() function, when used with prepared queries, returns the EXECUTE statement and not the actual query. Qt then attempts to PREPARE this statement, which causes a syntax error, aborting the transaction and dropping the message that was to be inserted. A better idea would be to execute the named prepared query directly, which avoids the problem. ---