1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MariaRocks port: temporarily disable gap lock checking

Also provide handler::is_using_full_key
This commit is contained in:
Sergei Petrunia
2016-10-19 14:27:43 +00:00
parent fe0b57dfbe
commit 8c5912e9ee
3 changed files with 15 additions and 0 deletions

View File

@ -2704,6 +2704,14 @@ int handler::ha_index_first(uchar * buf)
return result; return result;
} }
bool handler::is_using_full_key(key_part_map keypart_map,
uint actual_key_parts)
{
return (keypart_map == HA_WHOLE_KEY) ||
(keypart_map == ((key_part_map(1) << actual_key_parts)
- 1));
}
int handler::ha_index_last(uchar * buf) int handler::ha_index_last(uchar * buf)
{ {
int result; int result;

View File

@ -3159,6 +3159,7 @@ public:
size_t size) size_t size)
{ return 0; } { return 0; }
bool is_using_full_key(key_part_map keypart_map, uint actual_key_parts);
virtual int read_range_first(const key_range *start_key, virtual int read_range_first(const key_range *start_key,
const key_range *end_key, const key_range *end_key,
bool eq_range, bool sorted); bool eq_range, bool sorted);

View File

@ -6229,6 +6229,7 @@ int ha_rocksdb::read_range_first(const key_range *start_key,
result= ha_index_first(table->record[0]); result= ha_index_first(table->record[0]);
else else
{ {
#ifdef MARIAROCKS_NOT_YET
if (is_using_prohibited_gap_locks(table, if (is_using_prohibited_gap_locks(table,
is_using_full_unique_key( is_using_full_unique_key(
active_index, active_index,
@ -6237,6 +6238,7 @@ int ha_rocksdb::read_range_first(const key_range *start_key,
{ {
DBUG_RETURN(HA_ERR_LOCK_DEADLOCK); DBUG_RETURN(HA_ERR_LOCK_DEADLOCK);
} }
#endif
MYSQL_TABLE_IO_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0, MYSQL_TABLE_IO_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
{ result= index_read_map_impl(table->record[0], { result= index_read_map_impl(table->record[0],
@ -8613,7 +8615,11 @@ 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 &&