Skip to content

Commit 311b444

Browse files
committed
MDEV-35049: Improve test coverage
innodb.lock_memory: Allow the test to run with ./mtr --mysqld=--loose-innodb-adaptive-hash-index. main.row_filter_innodb,ahi: A new combination for innodb_adaptive_hash_index=ON.
1 parent 58b39ea commit 311b444

File tree

6 files changed

+50
-0
lines changed

6 files changed

+50
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- rowid_filter_innodb.result
2+
+++ rowid_filter_innodb,ahi.result
3+
@@ -2,7 +2,7 @@
4+
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
5+
SET GLOBAL innodb_stats_persistent=0;
6+
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
7+
-SET GLOBAL innodb_adaptive_hash_index=OFF;
8+
+SET GLOBAL innodb_adaptive_hash_index=ON;
9+
DROP DATABASE IF EXISTS dbt3_s001;
10+
CREATE DATABASE dbt3_s001;
11+
use dbt3_s001;
12+
@@ -2059,7 +2059,7 @@
13+
"r_table_time_ms": "REPLACED",
14+
"r_other_time_ms": "REPLACED",
15+
"r_engine_stats": {
16+
- "pages_accessed": 84
17+
+ "pages_accessed": 6
18+
},
19+
"filtered": "REPLACED",
20+
"r_total_filtered": 2.43902439,
21+
@@ -2227,7 +2227,7 @@
22+
"r_table_time_ms": "REPLACED",
23+
"r_other_time_ms": "REPLACED",
24+
"r_engine_stats": {
25+
- "pages_accessed": 84
26+
+ "pages_accessed": 2
27+
},
28+
"filtered": "REPLACED",
29+
"r_total_filtered": 2.43902439,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[normal]
2+
[ahi]

mysql-test/main/rowid_filter_innodb.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
22
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
33
SET GLOBAL innodb_stats_persistent=0;
4+
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
5+
SET GLOBAL innodb_adaptive_hash_index=OFF;
46
DROP DATABASE IF EXISTS dbt3_s001;
57
CREATE DATABASE dbt3_s001;
68
use dbt3_s001;
@@ -2287,6 +2289,7 @@ ALTER TABLE orders DROP COLUMN o_totaldiscount;
22872289
DROP VIEW v1;
22882290
DROP DATABASE dbt3_s001;
22892291
use test;
2292+
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;
22902293
SET GLOBAL innodb_stats_persistent=@save_stats_persistent;
22912294
#
22922295
# MDEV-18755: possible RORI-plan and possible plan with range filter

mysql-test/main/rowid_filter_innodb.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
1313
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
1414
SET GLOBAL innodb_stats_persistent=0;
1515

16+
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
17+
if ($MTR_COMBINATION_AHI) {
18+
SET GLOBAL innodb_adaptive_hash_index=ON;
19+
}
20+
if (!$MTR_COMBINATION_AHI) {
21+
SET GLOBAL innodb_adaptive_hash_index=OFF;
22+
}
23+
1624
--source rowid_filter.test
1725

26+
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;
1827
SET GLOBAL innodb_stats_persistent=@save_stats_persistent;
1928

2029
--source include/have_sequence.inc

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#
22
# MDEV-28800 SIGABRT due to running out of memory for InnoDB locks
33
#
4+
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
5+
SET GLOBAL innodb_adaptive_hash_index=OFF;
46
CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
57
INSERT INTO t1 VALUES (1),(2),(3),(4);
68
INSERT INTO t1 SELECT * FROM t1;
@@ -18,3 +20,4 @@ SELECT COUNT(*) FROM t1;
1820
COUNT(*)
1921
65552
2022
DROP TABLE t1;
23+
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
--echo # MDEV-28800 SIGABRT due to running out of memory for InnoDB locks
66
--echo #
77

8+
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
9+
SET GLOBAL innodb_adaptive_hash_index=OFF;
10+
811
CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
912

1013
INSERT INTO t1 VALUES (1),(2),(3),(4);
@@ -27,3 +30,4 @@ COMMIT;
2730
SELECT COUNT(*) FROM t1;
2831

2932
DROP TABLE t1;
33+
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;

0 commit comments

Comments
 (0)