Commit 27b9989d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-12121 Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index

The InnoDB adaptive hash index is sometimes degrading the performance of
InnoDB, and it is sometimes disabled to get more consistent performance.
We should have a compile-time option to disable the adaptive hash index.

Let us introduce two options:

OPTION(WITH_INNODB_AHI "Include innodb_adaptive_hash_index" ON)
OPTION(WITH_INNODB_ROOT_GUESS "Cache index root block descriptors" ON)

where WITH_INNODB_AHI always implies WITH_INNODB_ROOT_GUESS.

As part of this change, the misleadingly named function
trx_search_latch_release_if_reserved(trx) will be replaced with the macro
trx_assert_no_search_latch(trx) that will be empty unless
BTR_CUR_HASH_ADAPT is defined (cmake -DWITH_INNODB_AHI=ON).

We will also remove the unused column
INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_TIMEOUT.
In MariaDB Server 10.1, it used to reflect the value of
trx_t::search_latch_timeout which could be adjusted during
row_search_for_mysql(). In 10.2, there is no such field.

Other than the removal of the unused column TRX_ADAPTIVE_HASH_TIMEOUT,
this is an almost non-functional change to the server when using the
default build options.

Some tests are adjusted so that they will work with both
-DWITH_INNODB_AHI=ON and -DWITH_INNODB_AHI=OFF. The test
innodb.innodb_monitor has been renamed to innodb.monitor
in order to track MySQL 5.7, and the duplicate tests
sys_vars.innodb_monitor_* are removed.
parent 545f49da
if (`select count(*)!=1 from information_schema.GLOBAL_VARIABLES
where variable_name='innodb_adaptive_hash_index'`){
skip Test requires cmake -DWITH_INNODB_AHI=ON;
}
......@@ -42,8 +42,6 @@ trx_isolation_level varchar(16) NO
trx_unique_checks int(1) NO 0
trx_foreign_key_checks int(1) NO 0
trx_last_foreign_key_error varchar(256) YES NULL
trx_adaptive_hash_latched int(1) NO 0
trx_adaptive_hash_timeout bigint(21) unsigned NO 0
trx_is_read_only int(1) NO 0
trx_autocommit_non_locking int(1) NO 0
trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks
......
This diff is collapsed.
select * from information_schema.innodb_trx;
trx_id trx_state trx_started trx_requested_lock_id trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state trx_tables_in_use trx_tables_locked trx_lock_structs trx_lock_memory_bytes trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks trx_last_foreign_key_error trx_adaptive_hash_latched trx_adaptive_hash_timeout trx_is_read_only trx_autocommit_non_locking
select count(*) from information_schema.innodb_trx;
count(*)
0
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_trx but the InnoDB storage engine is not installed
select * from information_schema.innodb_locks;
......@@ -34,7 +35,8 @@ select * from information_schema.innodb_cmpmem_reset;
page_size buffer_pool_instance pages_used pages_free relocation_ops relocation_time
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_cmpmem_reset but the InnoDB storage engine is not installed
select * from information_schema.innodb_metrics;
select * from information_schema.innodb_metrics
WHERE name NOT LIKE 'adaptive_hash_%';
NAME SUBSYSTEM COUNT MAX_COUNT MIN_COUNT AVG_COUNT COUNT_RESET MAX_COUNT_RESET MIN_COUNT_RESET AVG_COUNT_RESET TIME_ENABLED TIME_DISABLED TIME_ELAPSED TIME_RESET STATUS TYPE COMMENT
metadata_table_handles_opened metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles opened
metadata_table_handles_closed metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles closed
......@@ -228,14 +230,6 @@ index_page_merge_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NU
index_page_reorg_attempts index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index page reorganization attempts
index_page_reorg_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of successful index page reorganizations
index_page_discards index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages discarded
adaptive_hash_searches adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of successful searches using Adaptive Hash Index
adaptive_hash_searches_btree adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of searches using B-tree on an index search
adaptive_hash_pages_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages on which the Adaptive Hash Index is built
adaptive_hash_pages_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages whose corresponding Adaptive Hash Index entries were removed
adaptive_hash_rows_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows added
adaptive_hash_rows_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows removed
adaptive_hash_rows_deleted_no_hash_entry adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of rows deleted that did not have corresponding Adaptive Hash Index entries
adaptive_hash_rows_updated adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows updated
file_num_open_files file_system 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of files currently open (innodb_num_open_files)
ibuf_merges_insert change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of inserted records merged by change buffering
ibuf_merges_delete_mark change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of deleted records merged by change buffering
......@@ -336,12 +330,14 @@ select * from information_schema.innodb_ft_index_table;
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
select * from information_schema.innodb_ft_config;
KEY VALUE
select * from information_schema.innodb_buffer_page;
POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
select count(*) from information_schema.innodb_buffer_page;
count(*)
0
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page but the InnoDB storage engine is not installed
select * from information_schema.innodb_buffer_page_lru;
POOL_ID LRU_POSITION SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE COMPRESSED IO_FIX IS_OLD FREE_PAGE_CLOCK
select count(*) from information_schema.innodb_buffer_page_lru;
count(*)
0
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page_lru but the InnoDB storage engine is not installed
select * from information_schema.innodb_buffer_stats;
......
set global innodb_monitor_disable = All;
select name, status from information_schema.innodb_metrics;
select name, status from information_schema.innodb_metrics
where name NOT LIKE 'adaptive_hash_%';
name status
metadata_table_handles_opened disabled
metadata_table_handles_closed disabled
......@@ -193,14 +194,6 @@ index_page_merge_successful disabled
index_page_reorg_attempts disabled
index_page_reorg_successful disabled
index_page_discards disabled
adaptive_hash_searches disabled
adaptive_hash_searches_btree disabled
adaptive_hash_pages_added disabled
adaptive_hash_pages_removed disabled
adaptive_hash_rows_added disabled
adaptive_hash_rows_removed disabled
adaptive_hash_rows_deleted_no_hash_entry disabled
adaptive_hash_rows_updated disabled
file_num_open_files disabled
ibuf_merges_insert disabled
ibuf_merges_delete_mark disabled
......@@ -610,7 +603,59 @@ icp_match 1
drop table monitor_test;
set global innodb_monitor_disable = All;
set global innodb_monitor_reset_all = all;
select 1 from `information_schema`.`INNODB_METRICS`
where case (1) when (1) then (AVG_COUNT_RESET) else (1) end;
1
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
#
# Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL
# MONITORS
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf 0
SET GLOBAL innodb_monitor_enable='module_buffer_page';
INSERT INTO t1 VALUES (1), (2), (3), (4);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf NNNN
SET GLOBAL innodb_monitor_disable='module_buffer_page';
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf 0
SET GLOBAL innodb_monitor_enable='%';
INSERT INTO t1 VALUES (5), (6), (7), (8);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf NNNN
SET GLOBAL innodb_monitor_disable='%';
SET GLOBAL innodb_monitor_reset_all='%';
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf 0
SET GLOBAL innodb_monitor_enable='ALL';
INSERT INTO t1 VALUES (9), (10), (11), (12);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT
buffer_page_written_index_leaf NNNN
SET GLOBAL innodb_monitor_enable=default;
SET GLOBAL innodb_monitor_disable=default;
SET GLOBAL innodb_monitor_reset_all=default;
DROP TABLE t1;
......@@ -17,10 +17,6 @@
SET storage_engine=InnoDB;
-- disable_warnings
DROP TABLE IF EXISTS t_min, t_max;
-- enable_warnings
let $table_def =
(
c01 TINYINT,
......@@ -182,13 +178,13 @@ DROP TABLE t_min, t_max, ```t'\"_str`;
# INFORMATION_SCHEMA.INNODB_TRX
#
CREATE TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_TRX;
-- error 0,ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP COLUMN trx_adaptive_hash_latched;
-- enable_result_log
DESCRIBE INFORMATION_SCHEMA.INNODB_TRX;
DESCRIBE t1;
-- disable_result_log
-- disable_warnings
DROP TABLE IF EXISTS t1;
-- enable_warnings
DROP TABLE t1;
CREATE TABLE t1 (
c01 INT,
......
This diff is collapsed.
--source include/not_embedded.inc
select * from information_schema.innodb_trx;
select count(*) from information_schema.innodb_trx;
select * from information_schema.innodb_locks;
select * from information_schema.innodb_lock_waits;
select * from information_schema.innodb_cmp;
......@@ -9,15 +9,16 @@ select * from information_schema.innodb_cmp_per_index;
select * from information_schema.innodb_cmp_per_index_reset;
select * from information_schema.innodb_cmpmem;
select * from information_schema.innodb_cmpmem_reset;
select * from information_schema.innodb_metrics;
select * from information_schema.innodb_metrics
WHERE name NOT LIKE 'adaptive_hash_%';
select * from information_schema.innodb_ft_default_stopword;
select * from information_schema.innodb_ft_deleted;
select * from information_schema.innodb_ft_being_deleted;
select * from information_schema.innodb_ft_index_cache;
select * from information_schema.innodb_ft_index_table;
select * from information_schema.innodb_ft_config;
select * from information_schema.innodb_buffer_page;
select * from information_schema.innodb_buffer_page_lru;
select count(*) from information_schema.innodb_buffer_page;
select count(*) from information_schema.innodb_buffer_page_lru;
--error 0,1109
select * from information_schema.innodb_buffer_stats;
select * from information_schema.innodb_sys_tables;
......
# This is the test for Metrics Monitor Table feature.
# Test the metrics monitor system's control system
# and counter accuracy.
# This test used to be duplicated in the following:
# sys_vars.innodb_monitor_reset_basic
# sys_vars.innodb_monitor_reset_all_basic
# sys_vars.innodb_monitor_disable_basic
# sys_vars.innodb_monitor_enable_basic
--source include/have_innodb.inc
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
# By default, they will be off
select name, status from information_schema.innodb_metrics;
# By default, they will be off.
# Skip the adaptive_hash fields, because they depend on WITH_INNODB_AHI.
select name, status from information_schema.innodb_metrics
where name NOT LIKE 'adaptive_hash_%';
# Turn on all monitor counters
set global innodb_monitor_enable = all;
......@@ -370,9 +374,66 @@ drop table monitor_test;
set global innodb_monitor_disable = All;
set global innodb_monitor_reset_all = all;
# Test for bug #13966091
select 1 from `information_schema`.`INNODB_METRICS`
where case (1) when (1) then (AVG_COUNT_RESET) else (1) end;
-- disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
-- enable_warnings
--echo #
--echo # Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL
--echo # MONITORS
--echo #
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='module_buffer_page';
INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_disable='module_buffer_page';
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='%';
INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_disable='%';
SET GLOBAL innodb_monitor_reset_all='%';
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='ALL';
INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
--replace_regex /[1-9]/NNNN/
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
--disable_warnings
SET GLOBAL innodb_monitor_enable=default;
SET GLOBAL innodb_monitor_disable=default;
SET GLOBAL innodb_monitor_reset_all=default;
--enable_warnings
DROP TABLE t1;
--- suite/sys_vars/r/sysvars_innodb.result
+++ suite/sys_vars/r/sysvars_innodb.result
@@ -54,7 +54,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8).
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
@@ -68,7 +68,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 150000
......
select * from information_schema.system_variables
where variable_name like 'innodb%' and
variable_name not in (
'innodb_adaptive_hash_index', # only available WITH_INNODB_AHI
'innodb_adaptive_hash_index_parts', # only available WITH_INNODB_AHI
'innodb_disallow_writes', # only available WITH_WSREP
'innodb_numa_interleave', # only available WITH_NUMA
'innodb_sched_priority_cleaner', # linux only
......@@ -34,34 +36,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable InnoDB adaptive hash index (enabled by default). Disable with --skip-innodb-adaptive-hash-index.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
SESSION_VALUE NULL
GLOBAL_VALUE 8
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8).
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
SESSION_VALUE NULL
GLOBAL_VALUE 150000
......
......@@ -4,6 +4,7 @@
#
--source include/have_innodb.inc
--source include/have_innodb_ahi.inc
SET @start_global_value = @@global.innodb_adaptive_hash_index;
SELECT @start_global_value;
......
--source include/have_innodb.inc
--source include/have_innodb_ahi.inc
####################################################################
# Displaying default value #
......
......@@ -13,6 +13,8 @@ if (`select plugin_auth_version <= "5.6.34-79.1" from information_schema.plugins
select * from information_schema.system_variables
where variable_name like 'innodb%' and
variable_name not in (
'innodb_adaptive_hash_index', # only available WITH_INNODB_AHI
'innodb_adaptive_hash_index_parts', # only available WITH_INNODB_AHI
'innodb_disallow_writes', # only available WITH_WSREP
'innodb_numa_interleave', # only available WITH_NUMA
'innodb_sched_priority_cleaner', # linux only
......
......@@ -105,22 +105,24 @@ throughput clearly from about 100000. */
#define BTR_CUR_FINE_HISTORY_LENGTH 100000
/** Number of searches down the B-tree in btr_cur_search_to_nth_level(). */
ulint btr_cur_n_non_sea = 0;
/** Number of successful adaptive hash index lookups in
btr_cur_search_to_nth_level(). */
ulint btr_cur_n_sea = 0;
ulint btr_cur_n_non_sea;
/** Old value of btr_cur_n_non_sea. Copied by
srv_refresh_innodb_monitor_stats(). Referenced by
srv_printf_innodb_monitor(). */
ulint btr_cur_n_non_sea_old = 0;
ulint btr_cur_n_non_sea_old;
#ifdef BTR_CUR_HASH_ADAPT
/** Number of successful adaptive hash index lookups in
btr_cur_search_to_nth_level(). */
ulint btr_cur_n_sea;
/** Old value of btr_cur_n_sea. Copied by
srv_refresh_innodb_monitor_stats(). Referenced by
srv_printf_innodb_monitor(). */
ulint btr_cur_n_sea_old = 0;
ulint btr_cur_n_sea_old;
#endif /* BTR_CUR_HASH_ADAPT */
#ifdef UNIV_DEBUG
/* Flag to limit optimistic insert records */
uint btr_cur_limit_optimistic_insert_debug = 0;
uint btr_cur_limit_optimistic_insert_debug;
#endif /* UNIV_DEBUG */
/** In the optimistic insert, if the insert does not fit, but this much space
......@@ -953,7 +955,7 @@ btr_cur_search_to_nth_level(
if (has_search_latch) {
/* Release possible search latch to obey latching order */
rw_lock_s_unlock(btr_get_search_latch(index));
btr_search_s_unlock(index);
}
/* Store the position of the tree latch we push to mtr so that we
......@@ -1477,6 +1479,7 @@ btr_cur_search_to_nth_level(
cursor->low_match =
DICT_INDEX_SPATIAL_NODEPTR_SIZE + 1;
}
#ifdef BTR_CUR_HASH_ADAPT
} else if (height == 0 && btr_search_enabled
&& !dict_index_is_spatial(index)) {
/* The adaptive hash index is only used when searching
......@@ -1486,6 +1489,7 @@ btr_cur_search_to_nth_level(
page_cur_search_with_match_bytes(
block, index, tuple, page_mode, &up_match, &up_bytes,
&low_match, &low_bytes, page_cursor);
#endif /* BTR_CUR_HASH_ADAPT */
} else {
/* Search for complete index fields. */
up_bytes = low_bytes = 0;
......@@ -1966,7 +1970,7 @@ btr_cur_search_to_nth_level(
index, autoinc, mtr, false);
}
#ifdef BTR_CUR_ADAPT
#ifdef BTR_CUR_HASH_ADAPT
/* We do a dirty read of btr_search_enabled here. We
will properly check btr_search_enabled again in
btr_search_build_page_hash_index() before building a
......@@ -1978,7 +1982,7 @@ btr_cur_search_to_nth_level(
) {
btr_search_info_update(index, cursor);
}
#endif
#endif /* BTR_CUR_HASH_ADAPT */
ut_ad(cursor->up_match != ULINT_UNDEFINED
|| mode != PAGE_CUR_GE);
ut_ad(cursor->up_match != ULINT_UNDEFINED
......@@ -2014,8 +2018,7 @@ btr_cur_search_to_nth_level(
}
if (has_search_latch) {
rw_lock_s_lock(btr_get_search_latch(index));
btr_search_s_lock(index);
}
if (mbr_adj) {
......@@ -3271,12 +3274,12 @@ btr_cur_pessimistic_insert(
}
}
#ifdef BTR_CUR_ADAPT
#ifdef BTR_CUR_HASH_ADAPT
# ifdef MYSQL_INDEX_DISABLE_AHI
if (index->disable_ahi); else
# endif
btr_search_update_hash_on_insert(cursor);
#endif
#endif /* BTR_CUR_HASH_ADAPT */
if (inherit && !(flags & BTR_NO_LOCKING_FLAG)) {
lock_update_insert(btr_cur_get_block(cursor), *rec);
......@@ -3609,7 +3612,6 @@ btr_cur_update_in_place(
rec_t* rec;
roll_ptr_t roll_ptr = 0;
ulint was_delete_marked;
ibool is_hashed;
rec = btr_cur_get_rec(cursor);
index = cursor->index;
......@@ -3668,9 +3670,8 @@ btr_cur_update_in_place(
was_delete_marked = rec_get_deleted_flag(
rec, page_is_comp(buf_block_get_frame(block)));
is_hashed = (block->index != NULL);
if (is_hashed) {
#ifdef BTR_CUR_HASH_ADAPT
if (block->index) {
/* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields
are being updated? */
......@@ -3687,14 +3688,17 @@ btr_cur_update_in_place(
btr_search_update_hash_on_delete(cursor);
}
rw_lock_x_lock(btr_get_search_latch(index));
btr_search_x_lock(index);
}
#endif /* BTR_CUR_HASH_ADAPT */
row_upd_rec_in_place(rec, index, offsets, update, page_zip);
if (is_hashed) {
rw_lock_x_unlock(btr_get_search_latch(index));
#ifdef BTR_CUR_HASH_ADAPT
if (block->index) {
btr_search_x_unlock(index);
}
#endif /* BTR_CUR_HASH_ADAPT */
btr_cur_update_in_place_log(flags, rec, index, update,
trx_id, roll_ptr, mtr);
......
......@@ -31,6 +31,7 @@ Created 2/17/1996 Heikki Tuuri
*************************************************************************/
#include "btr0sea.h"
#ifdef BTR_CUR_HASH_ADAPT
#ifdef UNIV_NONINL
#include "btr0sea.ic"
#endif /* UNIV_NOINL */
......@@ -375,43 +376,6 @@ btr_search_enable()
btr_search_x_unlock_all();
}
/** Creates and initializes a search info struct.
@param[in] heap heap where created.
@return own: search info struct */
btr_search_t*
btr_search_info_create(mem_heap_t* heap)
{
btr_search_t* info;
info = (btr_search_t*) mem_heap_alloc(heap, sizeof(btr_search_t));
ut_d(info->magic_n = BTR_SEARCH_MAGIC_N);
info->ref_count = 0;
info->root_guess = NULL;
info->withdraw_clock = 0;
info->hash_analysis = 0;
info->n_hash_potential = 0;
info->last_hash_succ = FALSE;
#ifdef UNIV_SEARCH_PERF_STAT
info->n_hash_succ = 0;
info->n_hash_fail = 0;
info->n_patt_succ = 0;
info->n_searches = 0;
#endif /* UNIV_SEARCH_PERF_STAT */
/* Set some sensible values */
info->n_fields = 1;
info->n_bytes = 0;
info->left_side = TRUE;
return(info);
}
/** Returns the value of ref_count. The value is protected by latch.
@param[in] info search info
@param[in] index index identifier
......@@ -2177,3 +2141,4 @@ btr_search_validate()
}
#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
#endif /* BTR_CUR_HASH_ADAPT */
......@@ -1536,7 +1536,9 @@ buf_block_init(
ut_d(block->page.file_page_was_freed = FALSE);
#ifdef BTR_CUR_HASH_ADAPT
block->index = NULL;
#endif /* BTR_CUR_HASH_ADAPT */
block->skip_flush_check = false;
ut_d(block->page.in_page_hash = FALSE);
......@@ -1547,9 +1549,11 @@ buf_block_init(
ut_d(block->in_unzip_LRU_list = FALSE);
ut_d(block->in_withdraw_list = FALSE);
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
#ifdef BTR_CUR_HASH_ADAPT
# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
block->n_pointers = 0;
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
#endif /* BTR_CUR_HASH_ADAPT */
page_zip_des_init(&block->page.zip);
mutex_create(LATCH_ID_BUF_BLOCK_MUTEX, &block->mutex);
......@@ -2260,11 +2264,13 @@ buf_page_realloc(
/* set other flags of buf_block_t */
#ifdef BTR_CUR_HASH_ADAPT
ut_ad(!block->index);
new_block->index = NULL;
new_block->n_hash_helps = 0;
new_block->n_fields = 1;
new_block->left_side = TRUE;
#endif /* BTR_CUR_HASH_ADAPT */
new_block->lock_hash_val = block->lock_hash_val;
ut_ad(new_block->lock_hash_val == lock_rec_hash(
......@@ -2726,7 +2732,7 @@ buf_pool_resize()
buf_pool_mutex_exit(buf_pool);
}
#ifdef BTR_CUR_HASH_ADAPT
/* disable AHI if needed */
bool btr_search_disabled = false;
......@@ -2745,6 +2751,7 @@ buf_pool_resize()
if (btr_search_disabled) {
ib::info() << "disabled adaptive hash index.";
}
#endif /* BTR_CUR_HASH_ADAPT */
/* set withdraw target */
for (ulint i = 0; i < srv_buf_pool_instances; i++) {
......@@ -3116,7 +3123,10 @@ buf_pool_resize()
dict_resize();
ib::info() << "Resized hash tables at lock_sys,"
" adaptive hash index, dictionary.";
#ifdef BTR_CUR_HASH_ADAPT
" adaptive hash index,"
#endif /* BTR_CUR_HASH_ADAPT */
" dictionary.";
}
/* normalize ibuf->max_size */
......@@ -3130,11 +3140,13 @@ buf_pool_resize()
srv_buf_pool_old_size = srv_buf_pool_size;
}
#ifdef BTR_CUR_HASH_ADAPT
/* enable AHI if needed */
if (btr_search_disabled) {
btr_search_enable();
ib::info() << "Re-enabled adaptive hash index.";
}
#endif /* BTR_CUR_HASH_ADAPT */
char now[32];
......@@ -3196,11 +3208,10 @@ DECLARE_THREAD(buf_resize_thread)(void*)
OS_THREAD_DUMMY_RETURN;
}
/********************************************************************//**
Clears the adaptive hash index on all pages in the buffer pool. */
#ifdef BTR_CUR_HASH_ADAPT
/** Clear the adaptive hash index on all pages in the buffer pool. */
void
buf_pool_clear_hash_index(void)
/*===========================*/
buf_pool_clear_hash_index()
{
ulint p;
......@@ -3237,6 +3248,7 @@ buf_pool_clear_hash_index(void)
}
}
}
#endif /* BTR_CUR_HASH_ADAPT */
/********************************************************************//**
Relocate a buffer control block. Relocates the block on the LRU list
......@@ -3920,13 +3932,15 @@ buf_block_init_low(
/*===============*/
buf_block_t* block) /*!< in: block to init */
{
block->index = NULL;
block->skip_flush_check = false;
#ifdef BTR_CUR_HASH_ADAPT
block->index = NULL;
block->n_hash_helps = 0;
block->n_fields = 1;
block->n_bytes = 0;
block->left_side = TRUE;
#endif /* BTR_CUR_HASH_ADAPT */
}
/********************************************************************//**
......@@ -3998,6 +4012,7 @@ buf_zip_decompress(
return(FALSE);
}
#ifdef BTR_CUR_HASH_ADAPT
/** Get a buffer block from an adaptive hash index pointer.
This function does not return if the block is not identified.
@param[in] ptr pointer to within a page frame
......@@ -4040,6 +4055,7 @@ buf_block_from_ahi(const byte* ptr)
ut_ad(state == BUF_BLOCK_FILE_PAGE || state == BUF_BLOCK_REMOVE_HASH);
return(block);
}
#endif /* BTR_CUR_HASH_ADAPT */
/********************************************************************//**
Find out if a pointer belongs to a buf_block_t. It can be a pointer to
......
......@@ -219,6 +219,7 @@ buf_LRU_evict_from_unzip_LRU(
return(unzip_avg <= io_avg * BUF_LRU_IO_TO_UNZIP_FACTOR);
}
#ifdef BTR_CUR_HASH_ADAPT
/** Attempts to drop page hash index on a batch of pages belonging to a
particular space id.
@param[in] space_id space id
......@@ -364,6 +365,7 @@ buf_LRU_drop_page_hash_for_tablespace(
buf_LRU_drop_page_hash_batch(id, page_size, page_arr, num_entries);
ut_free(page_arr);
}
#endif /* BTR_CUR_HASH_ADAPT */
/******************************************************************//**
While flushing (or removing dirty) pages from a tablespace we don't
......@@ -788,7 +790,7 @@ buf_LRU_remove_all_pages(
bpage->id.space(),
bpage->id.page_no(),
bpage->state));
#ifdef BTR_CUR_HASH_ADAPT
if (buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE) {
/* Do nothing, because the adaptive hash index
covers uncompressed pages only. */
......@@ -810,6 +812,7 @@ buf_LRU_remove_all_pages(
goto scan_again;
}
#endif /* BTR_CUR_HASH_ADAPT */
if (bpage->oldest_modification != 0) {
......@@ -911,7 +914,7 @@ buf_LRU_flush_or_remove_pages(
buf_pool_t* buf_pool;
buf_pool = buf_pool_from_array(i);
#ifdef BTR_CUR_HASH_ADAPT
switch (buf_remove) {
case BUF_REMOVE_ALL_NO_WRITE:
buf_LRU_drop_page_hash_for_tablespace(buf_pool, id);
......@@ -927,7 +930,7 @@ buf_LRU_flush_or_remove_pages(
table, there is no need to drop the AHI entries. */
break;
}
#endif /* BTR_CUR_HASH_ADAPT */
buf_LRU_remove_pages(buf_pool, id, buf_remove, trx);
}
}
......@@ -1206,15 +1209,15 @@ buf_LRU_check_size_of_non_data_objects(
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->curr_size / 20) {
ib::fatal() << "Over 95 percent of the buffer pool is"
" occupied by lock heaps or the adaptive hash index!"
" occupied by lock heaps"
#ifdef BTR_CUR_HASH_ADAPT
" or the adaptive hash index!"
#endif /* BTR_CUR_HASH_ADAPT */
" Check that your transactions do not set too many"
" row locks. Your buffer pool size is "
<< (buf_pool->curr_size
/ (1024 * 1024 / UNIV_PAGE_SIZE)) << " MB."
" Maybe you should make the buffer pool bigger?"
" We intentionally generate a seg fault to print"
" a stack trace on Linux!";
" row locks, or review if"
" innodb_buffer_pool_size="
<< (buf_pool->curr_size >> (20 - UNIV_PAGE_SIZE_SHIFT))
<< "M could be bigger.";
} else if (!recv_recovery_is_on()
&& buf_pool->curr_size == buf_pool->old_size
&& (UT_LIST_GET_LEN(buf_pool->free)
......@@ -1228,16 +1231,17 @@ buf_LRU_check_size_of_non_data_objects(
leak! */
ib::warn() << "Over 67 percent of the buffer pool is"
" occupied by lock heaps or the adaptive hash"
" index! Check that your transactions do not"
" set too many row locks. Your buffer pool"
" size is "
<< (buf_pool->curr_size
/ (1024 * 1024 / UNIV_PAGE_SIZE))
<< " MB. Maybe you should make the buffer pool"
" bigger?. Starting the InnoDB Monitor to print"
" diagnostics, including lock heap and hash"
" index sizes.";
" occupied by lock heaps"
#ifdef BTR_CUR_HASH_ADAPT
" or the adaptive hash index!"
#endif /* BTR_CUR_HASH_ADAPT */
" Check that your transactions do not"
" set too many row locks."
" innodb_buffer_pool_size="
<< (buf_pool->curr_size >>
(20 - UNIV_PAGE_SIZE_SHIFT)) << "M."
" Starting the InnoDB Monitor to print"
" diagnostics.";
buf_lru_switched_on_innodb_mon = true;
srv_print_innodb_monitor = TRUE;
......@@ -2103,9 +2107,11 @@ buf_LRU_block_free_non_file_page(
return; /* Continue */
}
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
#ifdef BTR_CUR_HASH_ADAPT
# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
ut_a(block->n_pointers == 0);
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
#endif /* BTR_CUR_HASH_ADAPT */
ut_ad(!block->page.in_free_list);
ut_ad(!block->page.in_flush_list);
ut_ad(!block->page.in_LRU_list);
......
......@@ -1407,8 +1407,6 @@ dict_table_can_be_evicted(
ut_a(table->referenced_set.empty());
if (table->get_ref_count() == 0) {
dict_index_t* index;
/* The transaction commit and rollback are called from
outside the handler interface. This means that there is
a window where the table->n_ref_count can be zero but
......@@ -1418,7 +1416,8 @@ dict_table_can_be_evicted(
return(FALSE);
}
for (index = dict_table_get_first_index(table);
#ifdef BTR_CUR_HASH_ADAPT
for (dict_index_t* index = dict_table_get_first_index(table);
index != NULL;
index = dict_table_get_next_index(index)) {
......@@ -1440,6 +1439,7 @@ dict_table_can_be_evicted(
return(FALSE);
}
}
#endif /* BTR_CUR_HASH_ADAPT */
return(TRUE);
}
......@@ -2611,7 +2611,9 @@ dict_index_add_to_cache_w_vcol(
UT_LIST_ADD_LAST(table->indexes, new_index);
new_index->table = table;
new_index->table_name = table->name.m_name;
#ifdef BTR_CUR_ADAPT
new_index->search_info = btr_search_info_create(new_index->heap);
#endif /* BTR_CUR_ADAPT */
new_index->page = page_no;
rw_lock_create(index_tree_rw_lock_key, &new_index->lock,
......@@ -2636,8 +2638,6 @@ dict_index_remove_from_cache_low(
to make room in the table LRU list */
{
lint size;
ulint retries = 0;
btr_search_t* info;
ut_ad(table && index);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
......@@ -2652,9 +2652,11 @@ dict_index_remove_from_cache_low(
row_log_free(index->online_log);
}
#ifdef BTR_CUR_HASH_ADAPT
/* We always create search info whether or not adaptive
hash index is enabled or not. */
info = btr_search_get_info(index);
btr_search_t* info = btr_search_get_info(index);
ulint retries = 0;
ut_ad(info);
/* We are not allowed to free the in-memory index struct
......@@ -2688,10 +2690,9 @@ dict_index_remove_from_cache_low(
/* To avoid a hang here we commit suicide if the
ref_count doesn't drop to zero in 600 seconds. */
if (retries >= 60000) {
ut_error;
}
ut_a(retries < 60000);
} while (srv_shutdown_state == SRV_SHUTDOWN_NONE || !lru_evict);
#endif /* BTR_CUR_HASH_ADAPT */
rw_lock_free(&index->lock);
......
......@@ -3060,7 +3060,9 @@ fseg_free_page_low(
fil_space_t* space,
page_no_t offset,
const page_size_t& page_size,
#ifdef BTR_CUR_HASH_ADAPT
bool ahi,
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr)
{
xdes_t* descr;
......@@ -3076,7 +3078,7 @@ fseg_free_page_low(
== FSEG_MAGIC_N_VALUE);
ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
ut_d(fsp_space_modify_check(space, mtr));
#ifdef BTR_CUR_HASH_ADAPT
/* Drop search system page hash index if the page is found in
the pool and is hashed */
......@@ -3084,6 +3086,7 @@ fseg_free_page_low(
btr_search_drop_page_hash_when_freed(
page_id_t(space->id, offset), page_size);
}
#endif /* BTR_CUR_HASH_ADAPT */
descr = xdes_get_descriptor(space, offset, page_size, mtr);
......@@ -3168,16 +3171,22 @@ fseg_free_page_low(
}
}
#ifndef BTR_CUR_HASH_ADAPT
# define fseg_free_page_low(inode, space, offset, page_size, ahi, mtr) \
fseg_free_page_low(inode, space, offset, page_size, mtr)
#endif /* !BTR_CUR_HASH_ADAPT */
/**********************************************************************//**
Frees a single page of a segment. */
void
fseg_free_page(
/*===========*/
fseg_free_page_func(
fseg_header_t* seg_header, /*!< in: segment header */
ulint space_id,/*!< in: space id */
ulint page, /*!< in: page offset */
#ifdef BTR_CUR_HASH_ADAPT
bool ahi, /*!< in: whether we may need to drop
the adaptive hash index */
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
DBUG_ENTER("fseg_free_page");
......@@ -3253,7 +3262,9 @@ fseg_free_extent(
fil_space_t* space,
const page_size_t& page_size,
ulint page,
#ifdef BTR_CUR_HASH_ADAPT
bool ahi,
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr)
{
ulint first_page_in_extent;
......@@ -3274,6 +3285,7 @@ fseg_free_extent(
first_page_in_extent = page - (page % FSP_EXTENT_SIZE);
#ifdef BTR_CUR_HASH_ADAPT
if (ahi) {
for (i = 0; i < FSP_EXTENT_SIZE; i++) {
if (!xdes_mtr_get_bit(descr, XDES_FREE_BIT, i, mtr)) {
......@@ -3289,6 +3301,7 @@ fseg_free_extent(
}
}
}
#endif /* BTR_CUR_HASH_ADAPT */
if (xdes_is_full(descr, mtr)) {
flst_remove(seg_inode + FSEG_FULL,
......@@ -3321,6 +3334,11 @@ fseg_free_extent(
#endif /* UNIV_DEBUG */
}
#ifndef BTR_CUR_HASH_ADAPT
# define fseg_free_extent(inode, space, page_size, page, ahi, mtr) \
fseg_free_extent(inode, space, page_size, page, mtr)
#endif /* !BTR_CUR_HASH_ADAPT */
/**********************************************************************//**
Frees part of a segment. This function can be used to free a segment by
repeatedly calling this function in different mini-transactions. Doing
......@@ -3328,14 +3346,15 @@ the freeing in a single mini-transaction might result in too big a
mini-transaction.
@return TRUE if freeing completed */
ibool
fseg_free_step(
/*===========*/
fseg_free_step_func(
fseg_header_t* header, /*!< in, own: segment header; NOTE: if the header
resides on the first page of the frag list
of the segment, this pointer becomes obsolete
after the last freeing step */
#ifdef BTR_CUR_HASH_ADAPT
bool ahi, /*!< in: whether we may need to drop
the adaptive hash index */
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
ulint n;
......@@ -3414,12 +3433,13 @@ Frees part of a segment. Differs from fseg_free_step because this function
leaves the header page unfreed.
@return TRUE if freeing completed, except the header page */
ibool
fseg_free_step_not_header(
/*======================*/
fseg_free_step_not_header_func(
fseg_header_t* header, /*!< in: segment header which must reside on
the first fragment page of the segment */
#ifdef BTR_CUR_HASH_ADAPT
bool ahi, /*!< in: whether we may need to drop
the adaptive hash index */
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
ulint n;
......
......@@ -1553,6 +1553,7 @@ rtr_copy_buf(
/* Skip buf_block_t::lock */
matches->block.lock_hash_val = block->lock_hash_val;
matches->block.modify_clock = block->modify_clock;
#ifdef BTR_CUR_HASH_ADAPT
matches->block.n_hash_helps = block->n_hash_helps;
matches->block.n_fields = block->n_fields;
matches->block.left_side = block->left_side;
......@@ -1562,7 +1563,7 @@ rtr_copy_buf(
matches->block.curr_n_fields = block->curr_n_fields;
matches->block.curr_left_side = block->curr_left_side;
matches->block.index = block->index;
#endif /* BTR_CUR_HASH_ADAPT */
ut_d(matches->block.debug_latch = block->debug_latch);
}
......
......@@ -146,7 +146,9 @@ ha_clear(
hash_table_t* table) /*!< in, own: hash table */
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
#ifdef BTR_CUR_HASH_ADAPT
ut_ad(!table->adaptive || btr_search_own_all(RW_LOCK_X));
#endif /* BTR_CUR_HASH_ADAPT */
for (ulint i = 0; i < table->n_sync_obj; i++) {
mem_heap_free(table->heaps[i]);
......@@ -189,6 +191,7 @@ ha_clear(
}
}
#ifdef BTR_CUR_HASH_ADAPT
/*************************************************************//**
Inserts an entry into a hash table. If an entry with the same fold number
is found, its node is updated to point to the new data, and no new node
......@@ -536,3 +539,4 @@ builds, see http://bugs.mysql.com/36941 */
(ulong) n_bufs);
}
}
#endif /* BTR_CUR_HASH_ADAPT */
......@@ -273,9 +273,11 @@ hash_create(
table->type = HASH_TABLE_SYNC_NONE;
table->array = array;
table->n_cells = prime;
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
#ifdef BTR_CUR_HASH_ADAPT
# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
table->adaptive = FALSE;
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
#endif /* BTR_CUR_HASH_ADAPT */
table->n_sync_obj = 0;
table->sync_obj.mutexes = NULL;
table->heaps = NULL;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -162,8 +162,10 @@ struct i_s_trx_row_t {
/*!< check_foreigns in trx_t */
const char* trx_foreign_key_error;
/*!< detailed_error in trx_t */
#ifdef BTR_CUR_HASH_ADAPT
ibool trx_has_search_latch;
/*!< has_search_latch in trx_t */
#endif /* BTR_CUR_HASH_ADAPT */
ulint trx_is_read_only;
/*!< trx_t::read_only */
ulint trx_is_autocommit_non_locking;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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