diff --git a/mysql-test/main/rowid_filter_innodb,ahi.rdiff b/mysql-test/main/rowid_filter_innodb,ahi.rdiff new file mode 100644 index 00000000000..2eaf2c78302 --- /dev/null +++ b/mysql-test/main/rowid_filter_innodb,ahi.rdiff @@ -0,0 +1,29 @@ +--- rowid_filter_innodb.result ++++ rowid_filter_innodb,ahi.result +@@ -2,7 +2,7 @@ + SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent; + SET GLOBAL innodb_stats_persistent=0; + SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index; +-SET GLOBAL innodb_adaptive_hash_index=OFF; ++SET GLOBAL innodb_adaptive_hash_index=ON; + DROP DATABASE IF EXISTS dbt3_s001; + CREATE DATABASE dbt3_s001; + use dbt3_s001; +@@ -2059,7 +2059,7 @@ + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": { +- "pages_accessed": 84 ++ "pages_accessed": 6 + }, + "filtered": "REPLACED", + "r_total_filtered": 2.43902439, +@@ -2227,7 +2227,7 @@ + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": { +- "pages_accessed": 84 ++ "pages_accessed": 2 + }, + "filtered": "REPLACED", + "r_total_filtered": 2.43902439, diff --git a/mysql-test/main/rowid_filter_innodb.combinations b/mysql-test/main/rowid_filter_innodb.combinations new file mode 100644 index 00000000000..a40cff7ae09 --- /dev/null +++ b/mysql-test/main/rowid_filter_innodb.combinations @@ -0,0 +1,2 @@ +[normal] +[ahi] diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index a8a31762b07..ccfbaced90b 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -1,6 +1,8 @@ SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB'; SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent; SET GLOBAL innodb_stats_persistent=0; +SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index; +SET GLOBAL innodb_adaptive_hash_index=OFF; DROP DATABASE IF EXISTS dbt3_s001; CREATE DATABASE dbt3_s001; use dbt3_s001; @@ -2287,6 +2289,7 @@ ALTER TABLE orders DROP COLUMN o_totaldiscount; DROP VIEW v1; DROP DATABASE dbt3_s001; use test; +SET GLOBAL innodb_adaptive_hash_index=@save_ahi; SET GLOBAL innodb_stats_persistent=@save_stats_persistent; # # MDEV-18755: possible RORI-plan and possible plan with range filter diff --git a/mysql-test/main/rowid_filter_innodb.test b/mysql-test/main/rowid_filter_innodb.test index 9730a133a21..5dd7f8dbdfc 100644 --- a/mysql-test/main/rowid_filter_innodb.test +++ b/mysql-test/main/rowid_filter_innodb.test @@ -13,8 +13,17 @@ SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB'; SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent; SET GLOBAL innodb_stats_persistent=0; +SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index; +if ($MTR_COMBINATION_AHI) { +SET GLOBAL innodb_adaptive_hash_index=ON; +} +if (!$MTR_COMBINATION_AHI) { +SET GLOBAL innodb_adaptive_hash_index=OFF; +} + --source rowid_filter.test +SET GLOBAL innodb_adaptive_hash_index=@save_ahi; SET GLOBAL innodb_stats_persistent=@save_stats_persistent; --source include/have_sequence.inc diff --git a/mysql-test/suite/innodb/r/lock_memory.result b/mysql-test/suite/innodb/r/lock_memory.result index 9859fdfd1f4..0502da5b4de 100644 --- a/mysql-test/suite/innodb/r/lock_memory.result +++ b/mysql-test/suite/innodb/r/lock_memory.result @@ -1,6 +1,8 @@ # # MDEV-28800 SIGABRT due to running out of memory for InnoDB locks # +SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index; +SET GLOBAL innodb_adaptive_hash_index=OFF; CREATE TABLE t1 (col1 INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1),(2),(3),(4); INSERT INTO t1 SELECT * FROM t1; @@ -18,3 +20,4 @@ SELECT COUNT(*) FROM t1; COUNT(*) 65552 DROP TABLE t1; +SET GLOBAL innodb_adaptive_hash_index=@save_ahi; diff --git a/mysql-test/suite/innodb/t/lock_memory.test b/mysql-test/suite/innodb/t/lock_memory.test index 6b936e18dfc..2c7f7a9e986 100644 --- a/mysql-test/suite/innodb/t/lock_memory.test +++ b/mysql-test/suite/innodb/t/lock_memory.test @@ -5,6 +5,9 @@ --echo # MDEV-28800 SIGABRT due to running out of memory for InnoDB locks --echo # +SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index; +SET GLOBAL innodb_adaptive_hash_index=OFF; + CREATE TABLE t1 (col1 INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1),(2),(3),(4); @@ -27,3 +30,4 @@ COMMIT; SELECT COUNT(*) FROM t1; DROP TABLE t1; +SET GLOBAL innodb_adaptive_hash_index=@save_ahi;