Commit 34b66fcc authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks port: get rocksdb.locking_issues test to work

Also update test results (MariaDB's dialect changes)
parent 7b708ee3
...@@ -8636,6 +8636,19 @@ int ha_rocksdb::update_row(const uchar *old_data, uchar *new_data) ...@@ -8636,6 +8636,19 @@ int ha_rocksdb::update_row(const uchar *old_data, uchar *new_data)
} }
/*
MariaDB's temporary: MyRocks has this function in sql/handler.cc:
*/
bool can_hold_read_locks_on_select(THD *thd, thr_lock_type lock_type)
{
return (lock_type == TL_READ_WITH_SHARED_LOCKS
|| lock_type == TL_READ_NO_INSERT
|| (lock_type != TL_IGNORE
&& thd->lex->sql_command != SQLCOM_SELECT));
}
/* The following function was copied from ha_blackhole::store_lock: */ /* The following function was copied from ha_blackhole::store_lock: */
THR_LOCK_DATA **ha_rocksdb::store_lock(THD *thd, THR_LOCK_DATA **ha_rocksdb::store_lock(THD *thd,
THR_LOCK_DATA **to, THR_LOCK_DATA **to,
...@@ -8668,11 +8681,7 @@ THR_LOCK_DATA **ha_rocksdb::store_lock(THD *thd, ...@@ -8668,11 +8681,7 @@ THR_LOCK_DATA **ha_rocksdb::store_lock(THD *thd,
uint sql_command = my_core::thd_sql_command(thd); uint sql_command = my_core::thd_sql_command(thd);
if ((lock_type == TL_READ && in_lock_tables) || if ((lock_type == TL_READ && in_lock_tables) ||
(lock_type == TL_READ_HIGH_PRIORITY && in_lock_tables) || (lock_type == TL_READ_HIGH_PRIORITY && in_lock_tables) ||
#ifdef MARIAROCKS_NOT_YET
can_hold_read_locks_on_select(thd, lock_type)) can_hold_read_locks_on_select(thd, lock_type))
#else
false)
#endif
{ {
ulong tx_isolation = my_core::thd_tx_isolation(thd); ulong tx_isolation = my_core::thd_tx_isolation(thd);
if (sql_command != SQLCOM_CHECKSUM && if (sql_command != SQLCOM_CHECKSUM &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment