summaryrefslogtreecommitdiffstats
path: root/connectivity/qa
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2019-01-22 13:06:45 +0100
committerTamás Bunth <btomi96@gmail.com>2019-01-22 17:43:41 +0100
commit6e80862ee6851b75fc7fa628156400bb044391ee (patch)
tree67ebbd75c51a05d9079b2898ec45eb86c513a8ce /connectivity/qa
parentRevert "tdf#107792 vcl/win: do not afraid to delete stock objects" (diff)
downloadcore-6e80862ee6851b75fc7fa628156400bb044391ee.tar.gz
core-6e80862ee6851b75fc7fa628156400bb044391ee.zip
mysqlc: resultset's previous() on first position..
.. should move the cursor backwards to beforeFirst position and return false. Change-Id: Icbb4bed0ea39ea3a0bf375d5616e3ef768fc69d9 Reviewed-on: https://gerrit.libreoffice.org/66729 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'connectivity/qa')
-rw-r--r--connectivity/qa/connectivity/mysql/mysql.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx b/connectivity/qa/connectivity/mysql/mysql.cxx
index 0d1d9ef85145..bfefeec132c1 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -256,6 +256,12 @@ void MysqlTestDriver::testDBPositionChange()
xResultSet->first();
CPPUNIT_ASSERT_EQUAL(1, xResultSet->getRow());
+ // Now previous should put the cursor to before-first position, but it
+ // should return with false.
+ successPrevious = xResultSet->previous();
+ CPPUNIT_ASSERT(!successPrevious);
+ CPPUNIT_ASSERT_EQUAL(0, xResultSet->getRow());
+
nUpdateCount = xStatement->executeUpdate("DROP TABLE myTestTable");
CPPUNIT_ASSERT_EQUAL(0, nUpdateCount); // it's a DDL statement
}