summaryrefslogtreecommitdiffstats
path: root/connectivity/qa/connectivity/mysql/mysql.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/qa/connectivity/mysql/mysql.cxx')
-rw-r--r--connectivity/qa/connectivity/mysql/mysql.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx b/connectivity/qa/connectivity/mysql/mysql.cxx
index f5e878590363..1a6d1e89e0e8 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -165,6 +165,7 @@ void MysqlTestDriver::testIntegerInsertAndQuery()
Reference<XResultSet> xResultSet = xStatement->executeQuery("SELECT id from myTestTable");
CPPUNIT_ASSERT_MESSAGE("result set cannot be instantiated after query", xResultSet.is());
Reference<XRow> xRow(xResultSet, UNO_QUERY);
+ Reference<XColumnLocate> xColumnLocate(xResultSet, UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("cannot extract row from result set!", xRow.is());
for (long i = 0; i < ROW_COUNT; ++i)
@@ -172,6 +173,7 @@ void MysqlTestDriver::testIntegerInsertAndQuery()
bool hasRow = xResultSet->next();
CPPUNIT_ASSERT_MESSAGE("not enough result after query", hasRow);
CPPUNIT_ASSERT_EQUAL(i, xRow->getLong(1)); // first and only column
+ CPPUNIT_ASSERT_EQUAL(i, xRow->getLong(xColumnLocate->findColumn("id"))); // test findColumn
}
CPPUNIT_ASSERT_MESSAGE("Cursor is not on last position.",
xResultSet->isLast()); // cursor is on last position