qt5base-lts/tests/auto/sql/kernel
Matt Newell aea6845069 Fix postgres notification support in the QPSQLDriver.
This patch fixes a critical bug in the qsqlpsql driver where
notifications aren't delivered when received. Any blocking libpq
function(specifically PQexec) will read all the incoming data
from the socket, including any pending notifications. This would
cause the socket notifier to never be fired for incoming
notifications that are already queued inside libpq. The qsqldriver
test case was skipping the postgres notification test because of
this bug, now its enabled and passing. In order to fix this
bug I made a wrapper function for PQexec in QPSQLDriverPrivate
that calls _q_handleNotification via QMetaObject::callMethod
QueuedConnection in order to deliver pending notifications
when control returns to the event loop. I also added a flag
to ensure only one call is made each time the event loop is
entered.

Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-30 23:51:11 +02:00
..
qsql Make tst_qsql.cpp independent of QtWidgets 2012-03-11 00:08:33 +01:00
qsqldatabase Fix postgres notification support in the QPSQLDriver. 2012-03-30 23:51:11 +02:00
qsqldriver Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqlerror Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqlfield Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqlquery Allow named bind values to be used multiple times per query 2012-03-30 09:31:03 +02:00
qsqlrecord Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsqlthread Fix compilation of tst_QSqlThread: no need to use QBasicAtomicInt here 2012-03-24 17:07:52 +01:00
kernel.pro Fix tst_qsql crashes on Mac OS X 2011-12-02 17:35:11 +01:00