@@ -2171,7 +2171,7 @@ TEST_F(Crud, row_locking)
2171
2171
2172
2172
auto lock_check = sess.getSchema (" information_schema" )
2173
2173
.getTable (" innodb_trx" )
2174
- .select (" trx_rows_locked" )
2174
+ .select (" count( trx_rows_locked) " )
2175
2175
.where (" trx_mysql_thread_id=connection_id()" );
2176
2176
2177
2177
@@ -2182,7 +2182,7 @@ TEST_F(Crud, row_locking)
2182
2182
/* Wait to for the row locking status to populate */
2183
2183
std::this_thread::sleep_for (std::chrono::milliseconds (5000 ));
2184
2184
/* No rows here */
2185
- EXPECT_TRUE (lock_check.execute ().fetchOne (). isNull () );
2185
+ EXPECT_TRUE (( int ) lock_check.execute ().fetchOne ()[ 0 ] == 0 );
2186
2186
2187
2187
sch.createCollection (coll_name);
2188
2188
Collection coll = sch.getCollection (coll_name);
@@ -2197,14 +2197,16 @@ TEST_F(Crud, row_locking)
2197
2197
for (DbDoc d; (d = dres.fetchOne ());)
2198
2198
cout << d[" num" ] << endl;
2199
2199
2200
+ /* Wait to for the row locking status to populate */
2201
+ std::this_thread::sleep_for (std::chrono::milliseconds (5000 ));
2200
2202
/* Some number of rows has to be locked */
2201
2203
EXPECT_TRUE ((int )lock_check.execute ().fetchOne ()[0 ] > 0 );
2202
2204
sess.commit ();
2203
2205
2204
2206
/* Wait to for the row locking status to populate */
2205
2207
std::this_thread::sleep_for (std::chrono::milliseconds (5000 ));
2206
2208
/* No rows here */
2207
- EXPECT_TRUE (lock_check.execute ().fetchOne (). isNull () );
2209
+ EXPECT_TRUE (( int ) lock_check.execute ().fetchOne ()[ 0 ] == 0 );
2208
2210
2209
2211
sess.dropSchema (db_name);
2210
2212
}
0 commit comments