Fix SQL errors caused by sender insertion from multiple threads
authorMichael Marley <michael@michaelmarley.com>
Tue, 5 May 2015 01:27:14 +0000 (21:27 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 2 Jan 2016 16:14:37 +0000 (17:14 +0100)
commita6bcc52535bc584405de447e5fc8dbb63e89c6f4
treef882e7e8f631bf74af551a56cbe2b4b7a0e08d76
parent602c7b89ac9f087cab83f759607c37737f8419f0
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.
src/core/postgresqlstorage.cpp