Fix SQL errors caused by sender insertion from multiple threads 126/head
authorMichael Marley <michael@michaelmarley.com>
Tue, 5 May 2015 01:27:14 +0000 (21:27 -0400)
committerMichael Marley <michael@michaelmarley.com>
Tue, 5 May 2015 01:34:36 +0000 (21:34 -0400)
commit09b9df73ca9decca2555f1d0024806cfd090ea5a
treebc5c98bf54920adfeb2ec2462ffe1c50b50260a1
parent8e2f578b3d83d2dd7b6f2ea64d350693073ffed1
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