diff options
author | Israel Lins <israelins85@yahoo.com.br> | 2013-03-18 02:23:15 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-24 21:57:44 (GMT) |
commit | 5500bdc4f18e2e5b056e8b274dfef389889a5d34 (patch) | |
tree | 4b7dbb5b7ece2b6e461548ceefa46927cbb4b10d /tests/auto/qsqlquery | |
parent | dd22022e1b0b1fc9538ae4374477bc2fde00cb85 (diff) | |
download | Qt-5500bdc4f18e2e5b056e8b274dfef389889a5d34.zip Qt-5500bdc4f18e2e5b056e8b274dfef389889a5d34.tar.gz Qt-5500bdc4f18e2e5b056e8b274dfef389889a5d34.tar.bz2 |
ODBC: fixed consistence of return of QODBCResult::exec()
The QODBCResult::exec() returns false when query is an delete
with no data do delete caused by SQLExecute function returning
SQL_NO_DATA, but the false return means error on execution.
Task-number: QTBUG-10569
Change-Id: I6c7ebadcf62ab404b60c7bcccdab6a10bf16a923
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
(cherry-picked from qtbase commit 0646d1131b4bc65cdd9af29f4ce00fdd2398a3df)
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'tests/auto/qsqlquery')
-rw-r--r-- | tests/auto/qsqlquery/tst_qsqlquery.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index 27c28b1..bbb1a8d 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -1030,6 +1030,10 @@ void tst_QSqlQuery::isActive() QVERIFY_SQL( q, exec( "delete from " + qtest + " where id = 42" ) ); QVERIFY( q.isActive() ); + + QVERIFY_SQL( q, exec( "delete from " + qtest + " where id = 42" ) ); + + QVERIFY( q.isActive() ); } void tst_QSqlQuery::numRowsAffected() |