summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 17:08:06 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 17:08:06 +0200
commitff0530ef681ebb8cf2272d2976f9ed3d718ae387 (patch)
treec6219dd392138ce556fdc2e111a15ff8b2930d71
parent27b9989d316163d00177bfee8fceb10995c2ba9b (diff)
downloadmariadb-git-ff0530ef681ebb8cf2272d2976f9ed3d718ae387.tar.gz
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.
-rw-r--r--mysql-test/include/have_innodb_ahi.inc4
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result26
-rw-r--r--mysql-test/suite/innodb/r/monitor.result11
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test9
-rw-r--r--mysql-test/suite/innodb/t/monitor.test4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff9
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result30
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_innodb.test2
12 files changed, 76 insertions, 36 deletions
diff --git a/mysql-test/include/have_innodb_ahi.inc b/mysql-test/include/have_innodb_ahi.inc
deleted file mode 100644
index 145061e58e6..00000000000
--- a/mysql-test/include/have_innodb_ahi.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-if (`select count(*)!=1 from information_schema.GLOBAL_VARIABLES
- where variable_name='innodb_adaptive_hash_index'`){
- skip Test requires cmake -DWITH_INNODB_AHI=ON;
-}
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result
index c1625f2bc3c..36c76b03bd0 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema.result
@@ -42,6 +42,7 @@ 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_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
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index 0e12f1bccf9..a031cfaa278 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -1,6 +1,5 @@
-select count(*) from information_schema.innodb_trx;
-count(*)
-0
+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_is_read_only trx_autocommit_non_locking
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_trx but the InnoDB storage engine is not installed
select * from information_schema.innodb_locks;
@@ -35,8 +34,7 @@ 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
-WHERE name NOT LIKE 'adaptive_hash_%';
+select * from information_schema.innodb_metrics;
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
@@ -230,6 +228,14 @@ 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
@@ -330,14 +336,12 @@ 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 count(*) from information_schema.innodb_buffer_page;
-count(*)
-0
+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
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page but the InnoDB storage engine is not installed
-select count(*) from information_schema.innodb_buffer_page_lru;
-count(*)
-0
+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
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;
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index f81234c7d42..33a09a553b9 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -1,6 +1,5 @@
set global innodb_monitor_disable = All;
-select name, status from information_schema.innodb_metrics
-where name NOT LIKE 'adaptive_hash_%';
+select name, status from information_schema.innodb_metrics;
name status
metadata_table_handles_opened disabled
metadata_table_handles_closed disabled
@@ -194,6 +193,14 @@ 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
diff --git a/mysql-test/suite/innodb/t/innodb_information_schema.test b/mysql-test/suite/innodb/t/innodb_information_schema.test
index 375348efdd0..da7ee016f29 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema.test
@@ -17,6 +17,10 @@
SET storage_engine=InnoDB;
+-- disable_warnings
+DROP TABLE IF EXISTS t_min, t_max;
+-- enable_warnings
+
let $table_def =
(
c01 TINYINT,
@@ -178,13 +182,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 t1;
+DESCRIBE INFORMATION_SCHEMA.INNODB_TRX;
-- disable_result_log
-DROP TABLE t1;
+
+-- disable_warnings
+DROP TABLE IF EXISTS t1;
+-- enable_warnings
CREATE TABLE t1 (
c01 INT,
diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
index 812dcc60477..01ced047302 100644
--- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
+++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
@@ -1,6 +1,6 @@
--source include/not_embedded.inc
-select count(*) from information_schema.innodb_trx;
+select * 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,16 +9,15 @@ 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
-WHERE name NOT LIKE 'adaptive_hash_%';
+select * from information_schema.innodb_metrics;
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 count(*) from information_schema.innodb_buffer_page;
-select count(*) from information_schema.innodb_buffer_page_lru;
+select * from information_schema.innodb_buffer_page;
+select * from information_schema.innodb_buffer_page_lru;
--error 0,1109
select * from information_schema.innodb_buffer_stats;
select * from information_schema.innodb_sys_tables;
diff --git a/mysql-test/suite/innodb/t/monitor.test b/mysql-test/suite/innodb/t/monitor.test
index da33a720839..98aa4505e34 100644
--- a/mysql-test/suite/innodb/t/monitor.test
+++ b/mysql-test/suite/innodb/t/monitor.test
@@ -8,9 +8,7 @@
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
# 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_%';
+select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index 92606e2b8f3..9bf02940d75 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -1,5 +1,14 @@
--- 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 Adaptive 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
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 69f67b86f5c..a6a36ccf6d6 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -1,8 +1,6 @@
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
@@ -36,6 +34,34 @@ 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 Adaptive 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
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
index 7a04041296f..5171c0e1621 100644
--- a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test
@@ -4,7 +4,6 @@
#
--source include/have_innodb.inc
---source include/have_innodb_ahi.inc
SET @start_global_value = @@global.innodb_adaptive_hash_index;
SELECT @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test
index 8953b947ece..3f4a9283339 100644
--- a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test
@@ -1,5 +1,4 @@
--source include/have_innodb.inc
---source include/have_innodb_ahi.inc
####################################################################
# Displaying default value #
diff --git a/mysql-test/suite/sys_vars/t/sysvars_innodb.test b/mysql-test/suite/sys_vars/t/sysvars_innodb.test
index 18d5c91eff0..2abafda34c6 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_innodb.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_innodb.test
@@ -13,8 +13,6 @@ 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