1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Marko Mäkelä
2025-06-26 11:45:33 +03:00
parent 58b39ea650
commit 311b4445c5
6 changed files with 50 additions and 0 deletions

View File

@@ -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,

View File

@@ -0,0 +1,2 @@
[normal]
[ahi]

View File

@@ -1,6 +1,8 @@
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB'; SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent; SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=0; 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; DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001; CREATE DATABASE dbt3_s001;
use dbt3_s001; use dbt3_s001;
@@ -2287,6 +2289,7 @@ ALTER TABLE orders DROP COLUMN o_totaldiscount;
DROP VIEW v1; DROP VIEW v1;
DROP DATABASE dbt3_s001; DROP DATABASE dbt3_s001;
use test; use test;
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;
SET GLOBAL innodb_stats_persistent=@save_stats_persistent; SET GLOBAL innodb_stats_persistent=@save_stats_persistent;
# #
# MDEV-18755: possible RORI-plan and possible plan with range filter # MDEV-18755: possible RORI-plan and possible plan with range filter

View File

@@ -13,8 +13,17 @@ SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent; SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=0; 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 --source rowid_filter.test
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;
SET GLOBAL innodb_stats_persistent=@save_stats_persistent; SET GLOBAL innodb_stats_persistent=@save_stats_persistent;
--source include/have_sequence.inc --source include/have_sequence.inc

View File

@@ -1,6 +1,8 @@
# #
# MDEV-28800 SIGABRT due to running out of memory for InnoDB locks # 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; CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4); INSERT INTO t1 VALUES (1),(2),(3),(4);
INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1;
@@ -18,3 +20,4 @@ SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
65552 65552
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;

View File

@@ -5,6 +5,9 @@
--echo # MDEV-28800 SIGABRT due to running out of memory for InnoDB locks --echo # MDEV-28800 SIGABRT due to running out of memory for InnoDB locks
--echo # --echo #
SET @save_ahi=@@GLOBAL.innodb_adaptive_hash_index;
SET GLOBAL innodb_adaptive_hash_index=OFF;
CREATE TABLE t1 (col1 INT) ENGINE=InnoDB; CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4); INSERT INTO t1 VALUES (1),(2),(3),(4);
@@ -27,3 +30,4 @@ COMMIT;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_adaptive_hash_index=@save_ahi;