Skip to content

Commit ff0530e

Browse files
committed
MDEV-12121: Revert test adjustments for -DWITH_INNODB_AHI=OFF
Because the default build configuration of the server will remain at -DWITH_INNODB_AHI=ON, we want to test the instrumentation. We make and revert the test adjustments in separate commits on purpose, so that this commit can be easily reverted later if the default build configuration is changed to -DWITH_INNODB_AHI=OFF.
1 parent 27b9989 commit ff0530e

12 files changed

+76
-36
lines changed

mysql-test/include/have_innodb_ahi.inc

Lines changed: 0 additions & 4 deletions
This file was deleted.

mysql-test/suite/innodb/r/innodb_information_schema.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ trx_isolation_level varchar(16) NO
4242
trx_unique_checks int(1) NO 0
4343
trx_foreign_key_checks int(1) NO 0
4444
trx_last_foreign_key_error varchar(256) YES NULL
45+
trx_adaptive_hash_latched int(1) NO 0
4546
trx_is_read_only int(1) NO 0
4647
trx_autocommit_non_locking int(1) NO 0
4748
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

mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
select count(*) from information_schema.innodb_trx;
2-
count(*)
3-
0
1+
select * from information_schema.innodb_trx;
2+
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_is_read_only trx_autocommit_non_locking
43
Warnings:
54
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_trx but the InnoDB storage engine is not installed
65
select * from information_schema.innodb_locks;
@@ -35,8 +34,7 @@ select * from information_schema.innodb_cmpmem_reset;
3534
page_size buffer_pool_instance pages_used pages_free relocation_ops relocation_time
3635
Warnings:
3736
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_cmpmem_reset but the InnoDB storage engine is not installed
38-
select * from information_schema.innodb_metrics
39-
WHERE name NOT LIKE 'adaptive_hash_%';
37+
select * from information_schema.innodb_metrics;
4038
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
4139
metadata_table_handles_opened metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles opened
4240
metadata_table_handles_closed metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles closed
@@ -230,6 +228,14 @@ index_page_merge_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NU
230228
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
231229
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
232230
index_page_discards index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages discarded
231+
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
232+
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
233+
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
234+
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
235+
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
236+
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
237+
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
238+
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
233239
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)
234240
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
235241
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
@@ -330,14 +336,12 @@ select * from information_schema.innodb_ft_index_table;
330336
WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION
331337
select * from information_schema.innodb_ft_config;
332338
KEY VALUE
333-
select count(*) from information_schema.innodb_buffer_page;
334-
count(*)
335-
0
339+
select * from information_schema.innodb_buffer_page;
340+
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
336341
Warnings:
337342
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page but the InnoDB storage engine is not installed
338-
select count(*) from information_schema.innodb_buffer_page_lru;
339-
count(*)
340-
0
343+
select * from information_schema.innodb_buffer_page_lru;
344+
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
341345
Warnings:
342346
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page_lru but the InnoDB storage engine is not installed
343347
select * from information_schema.innodb_buffer_stats;

mysql-test/suite/innodb/r/monitor.result

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
set global innodb_monitor_disable = All;
2-
select name, status from information_schema.innodb_metrics
3-
where name NOT LIKE 'adaptive_hash_%';
2+
select name, status from information_schema.innodb_metrics;
43
name status
54
metadata_table_handles_opened disabled
65
metadata_table_handles_closed disabled
@@ -194,6 +193,14 @@ index_page_merge_successful disabled
194193
index_page_reorg_attempts disabled
195194
index_page_reorg_successful disabled
196195
index_page_discards disabled
196+
adaptive_hash_searches disabled
197+
adaptive_hash_searches_btree disabled
198+
adaptive_hash_pages_added disabled
199+
adaptive_hash_pages_removed disabled
200+
adaptive_hash_rows_added disabled
201+
adaptive_hash_rows_removed disabled
202+
adaptive_hash_rows_deleted_no_hash_entry disabled
203+
adaptive_hash_rows_updated disabled
197204
file_num_open_files disabled
198205
ibuf_merges_insert disabled
199206
ibuf_merges_delete_mark disabled

mysql-test/suite/innodb/t/innodb_information_schema.test

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
SET storage_engine=InnoDB;
1919

20+
-- disable_warnings
21+
DROP TABLE IF EXISTS t_min, t_max;
22+
-- enable_warnings
23+
2024
let $table_def =
2125
(
2226
c01 TINYINT,
@@ -178,13 +182,13 @@ DROP TABLE t_min, t_max, ```t'\"_str`;
178182
# INFORMATION_SCHEMA.INNODB_TRX
179183
#
180184

181-
CREATE TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_TRX;
182-
-- error 0,ER_CANT_DROP_FIELD_OR_KEY
183-
ALTER TABLE t1 DROP COLUMN trx_adaptive_hash_latched;
184185
-- enable_result_log
185-
DESCRIBE t1;
186+
DESCRIBE INFORMATION_SCHEMA.INNODB_TRX;
186187
-- disable_result_log
187-
DROP TABLE t1;
188+
189+
-- disable_warnings
190+
DROP TABLE IF EXISTS t1;
191+
-- enable_warnings
188192

189193
CREATE TABLE t1 (
190194
c01 INT,

mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--source include/not_embedded.inc
22

3-
select count(*) from information_schema.innodb_trx;
3+
select * from information_schema.innodb_trx;
44
select * from information_schema.innodb_locks;
55
select * from information_schema.innodb_lock_waits;
66
select * from information_schema.innodb_cmp;
@@ -9,16 +9,15 @@ select * from information_schema.innodb_cmp_per_index;
99
select * from information_schema.innodb_cmp_per_index_reset;
1010
select * from information_schema.innodb_cmpmem;
1111
select * from information_schema.innodb_cmpmem_reset;
12-
select * from information_schema.innodb_metrics
13-
WHERE name NOT LIKE 'adaptive_hash_%';
12+
select * from information_schema.innodb_metrics;
1413
select * from information_schema.innodb_ft_default_stopword;
1514
select * from information_schema.innodb_ft_deleted;
1615
select * from information_schema.innodb_ft_being_deleted;
1716
select * from information_schema.innodb_ft_index_cache;
1817
select * from information_schema.innodb_ft_index_table;
1918
select * from information_schema.innodb_ft_config;
20-
select count(*) from information_schema.innodb_buffer_page;
21-
select count(*) from information_schema.innodb_buffer_page_lru;
19+
select * from information_schema.innodb_buffer_page;
20+
select * from information_schema.innodb_buffer_page_lru;
2221
--error 0,1109
2322
select * from information_schema.innodb_buffer_stats;
2423
select * from information_schema.innodb_sys_tables;

mysql-test/suite/innodb/t/monitor.test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
set global innodb_monitor_disable = All;
99
# Test turn on/off the monitor counter with "all" option
1010
# By default, they will be off.
11-
# Skip the adaptive_hash fields, because they depend on WITH_INNODB_AHI.
12-
select name, status from information_schema.innodb_metrics
13-
where name NOT LIKE 'adaptive_hash_%';
11+
select name, status from information_schema.innodb_metrics;
1412

1513
# Turn on all monitor counters
1614
set global innodb_monitor_enable = all;

mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
--- suite/sys_vars/r/sysvars_innodb.result
22
+++ suite/sys_vars/r/sysvars_innodb.result
3+
@@ -54,7 +54,7 @@
4+
GLOBAL_VALUE_ORIGIN COMPILE-TIME
5+
DEFAULT_VALUE 8
6+
VARIABLE_SCOPE GLOBAL
7+
-VARIABLE_TYPE BIGINT UNSIGNED
8+
+VARIABLE_TYPE INT UNSIGNED
9+
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
10+
NUMERIC_MIN_VALUE 1
11+
NUMERIC_MAX_VALUE 512
312
@@ -68,7 +68,7 @@
413
GLOBAL_VALUE_ORIGIN COMPILE-TIME
514
DEFAULT_VALUE 150000

mysql-test/suite/sys_vars/r/sysvars_innodb.result

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
select * from information_schema.system_variables
22
where variable_name like 'innodb%' and
33
variable_name not in (
4-
'innodb_adaptive_hash_index', # only available WITH_INNODB_AHI
5-
'innodb_adaptive_hash_index_parts', # only available WITH_INNODB_AHI
64
'innodb_disallow_writes', # only available WITH_WSREP
75
'innodb_numa_interleave', # only available WITH_NUMA
86
'innodb_sched_priority_cleaner', # linux only
@@ -36,6 +34,34 @@ NUMERIC_BLOCK_SIZE NULL
3634
ENUM_VALUE_LIST NULL
3735
READ_ONLY NO
3836
COMMAND_LINE_ARGUMENT REQUIRED
37+
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX
38+
SESSION_VALUE NULL
39+
GLOBAL_VALUE ON
40+
GLOBAL_VALUE_ORIGIN COMPILE-TIME
41+
DEFAULT_VALUE ON
42+
VARIABLE_SCOPE GLOBAL
43+
VARIABLE_TYPE BOOLEAN
44+
VARIABLE_COMMENT Enable InnoDB adaptive hash index (enabled by default). Disable with --skip-innodb-adaptive-hash-index.
45+
NUMERIC_MIN_VALUE NULL
46+
NUMERIC_MAX_VALUE NULL
47+
NUMERIC_BLOCK_SIZE NULL
48+
ENUM_VALUE_LIST OFF,ON
49+
READ_ONLY NO
50+
COMMAND_LINE_ARGUMENT OPTIONAL
51+
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
52+
SESSION_VALUE NULL
53+
GLOBAL_VALUE 8
54+
GLOBAL_VALUE_ORIGIN COMPILE-TIME
55+
DEFAULT_VALUE 8
56+
VARIABLE_SCOPE GLOBAL
57+
VARIABLE_TYPE BIGINT UNSIGNED
58+
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
59+
NUMERIC_MIN_VALUE 1
60+
NUMERIC_MAX_VALUE 512
61+
NUMERIC_BLOCK_SIZE 0
62+
ENUM_VALUE_LIST NULL
63+
READ_ONLY YES
64+
COMMAND_LINE_ARGUMENT OPTIONAL
3965
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
4066
SESSION_VALUE NULL
4167
GLOBAL_VALUE 150000

mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55

66
--source include/have_innodb.inc
7-
--source include/have_innodb_ahi.inc
87

98
SET @start_global_value = @@global.innodb_adaptive_hash_index;
109
SELECT @start_global_value;

0 commit comments

Comments
 (0)