| ||||||||||||||||||
SSL index_ahi_option.result Interaktion und
| ||||||||||||||||||
|
# # Test InnoDB index-level adaptive_hash_index options # SET @start_global_value= @@global.innodb_adaptive_hash_index; SET @combination_value= 'OFF'; SET GLOBAL innodb_adaptive_hash_index= @combination_value; CREATE TABLE t1 ( id INT PRIMARY KEY, col1 INT, col2 INT, col3 INT, INDEX idx_1 (col1) adaptive_hash_index=DEFAULT, INDEX idx_2 (col1, col2) adaptive_hash_index=YES, INDEX idx_3 (col1, col2, col3) adaptive_hash_index=NO ) ENGINE=InnoDB STATS_PERSISTENT=0 adaptive_hash_index=DEFAULT; INSERT INTO t1 SELECT seq, seq, seq << 8, seq << 16 FROM seq_0_to_255; SET GLOBAL innodb_monitor_enable= module_adaptive_hash; CALL run_and_check_idx(240, 1, 't1'); result_msg # No AHI used in SELECT (idx_1) CALL run_and_check_idx(240, 2, 't1'); result_msg # No AHI used in SELECT (idx_2) CALL run_and_check_idx(240, 3, 't1'); result_msg # No AHI used in SELECT (idx_3) ALTER TABLE t1 adaptive_hash_index=OFF, ALGORITHM=INSTANT, LOCK=NONE; CALL run_and_check_idx(240, 1, 't1'); result_msg # No AHI used in SELECT (idx_1) CALL run_and_check_idx(240, 2, 't1'); result_msg # No AHI used in SELECT (idx_2) CALL run_and_check_idx(240, 3, 't1'); result_msg # No AHI used in SELECT (idx_3) ALTER TABLE t1 adaptive_hash_index='ON', ALGORITHM=INSTANT, LOCK=NONE; CALL run_and_check_idx(240, 1, 't1'); result_msg # No AHI used in SELECT (idx_1) CALL run_and_check_idx(240, 2, 't1'); result_msg # No AHI used in SELECT (idx_2) CALL run_and_check_idx(240, 3, 't1'); result_msg # No AHI used in SELECT (idx_3) connect con1, localhost, root; CALL run_and_check_idx(-1, 1, 't1');; connection default; SET GLOBAL innodb_adaptive_hash_index= OFF; CALL run_and_check_idx(240, 1, 't1'); result_msg # No AHI used in SELECT (idx_1) SET GLOBAL innodb_adaptive_hash_index= ON; CALL run_and_check_idx(240, 1, 't1'); result_msg # Used AHI in SELECT (idx_1) SET GLOBAL innodb_adaptive_hash_index= IF_SPECIFIED; CALL run_and_check_idx(240, 1, 't1'); result_msg # Used AHI in SELECT (idx_1) SET GLOBAL innodb_adaptive_hash_index= @combination_value; CALL run_and_check_idx(240, 1, 't1'); result_msg # No AHI used in SELECT (idx_1) KILL con1_id; connection con1; Got one of the listed errors disconnect con1; connection default; DROP TABLE t1; # # Test AHI with partitioned tables # CREATE TABLE t1_part ( id INT PRIMARY KEY, col1 INT, col2 INT, col3 INT, INDEX idx_1 (col1) adaptive_hash_index=DEFAULT, INDEX idx_2 (col1, col2) adaptive_hash_index=YES, INDEX idx_3 (col1, col2, col3) adaptive_hash_index=NO ) ENGINE=InnoDB STATS_PERSISTENT=0 adaptive_hash_index=DEFAULT PARTITION BY HASH(id) PARTITIONS 4; INSERT INTO t1_part SELECT seq, seq, seq << 8, seq << 16 FROM seq_0_to_511; CALL run_and_check_idx(240, 1, 't1_part'); result_msg # No AHI used in SELECT (idx_1) CALL run_and_check_idx(240, 2, 't1_part'); result_msg # No AHI used in SELECT (idx_2) CALL run_and_check_idx(240, 3, 't1_part'); result_msg # No AHI used in SELECT (idx_3) DROP TABLE t1_part; DROP PROCEDURE run_and_check_idx; SET @@global.innodb_adaptive_hash_index= @start_global_value; SET GLOBAL innodb_monitor_disable= module_adaptive_hash; SET GLOBAL innodb_monitor_disable= default; SET GLOBAL innodb_monitor_enable= default; # # Test AHI metadata retention after crash recovery # CREATE TABLE t1_crash ( id INT PRIMARY KEY, col1 INT, col2 INT, col3 INT, INDEX idx_1 (col1) adaptive_hash_index=DEFAULT, INDEX idx_2 (col1, col2) adaptive_hash_index=YES, INDEX idx_3 (col1, col2, col3) adaptive_hash_index=NO ) ENGINE=InnoDB STATS_PERSISTENT=0 adaptive_hash_index=DEFAULT; INSERT INTO t1_crash SELECT seq, seq, seq << 8, seq << 16 FROM seq_0_to_255; ALTER TABLE t1_crash ADD INDEX idx_9 (col3, col1, col2) adaptive_hash_index=YES complete_f SHOW CREATE TABLE t1_crash; Table Create Table t1_crash CREATE TABLE `t1_crash` ( `id` int(11) NOT NULL, `col1` int(11) DEFAULT NULL, `col2` int(11) DEFAULT NULL, `col3` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_1` (`col1`), KEY `idx_2` (`col1`,`col2`) `adaptive_hash_index`='YES', KEY `idx_3` (`col1`,`col2`,`col3`) `adaptive_hash_index`='NO', KEY `idx_9` (`col3`,`col1`,`col2`) `adaptive_hash_index`='YES' `complete_fields`='2' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci STATS_PERSISTEN # Kill the server # restart SHOW CREATE TABLE t1_crash; Table Create Table t1_crash CREATE TABLE `t1_crash` ( `id` int(11) NOT NULL, `col1` int(11) DEFAULT NULL, `col2` int(11) DEFAULT NULL, `col3` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_1` (`col1`), KEY `idx_2` (`col1`,`col2`) `adaptive_hash_index`='YES', KEY `idx_3` (`col1`,`col2`,`col3`) `adaptive_hash_index`='NO', KEY `idx_9` (`col3`,`col1`,`col2`) `adaptive_hash_index`='YES' `complete_fields`='2' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci STATS_PERSISTEN SELECT COUNT(*) FROM t1_crash; COUNT(*) 256 DROP TABLE t1_crash; # # Test maximum number of fields per (secondary) index is 64 (32+32) # CREATE TABLE t2 (dummy INT NOT NULL, c1 INT NOT NULL, c2 INT NOT NULL, c3 INT NOT NULL, c4 INT NOT NUL ALTER TABLE t2 DROP PRIMARY KEY, ADD PRIMARY KEY (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, ERROR 42000: Too many key parts specified; max 32 parts allowed ALTER TABLE t2 DROP PRIMARY KEY, ADD PRIMARY KEY (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, CREATE INDEX idx_fail ON t2 (c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, ERROR 42000: Too many key parts specified; max 32 parts allowed CREATE INDEX idx_ok ON t2 (c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c4 SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( `dummy` int(11) NOT NULL, `c1` int(11) NOT NULL, `c2` int(11) NOT NULL, `c3` int(11) NOT NULL, `c4` int(11) NOT NULL, `c5` int(11) NOT NULL, `c6` int(11) NOT NULL, `c7` int(11) NOT NULL, `c8` int(11) NOT NULL, `c9` int(11) NOT NULL, `c10` int(11) NOT NULL, `c11` int(11) NOT NULL, `c12` int(11) NOT NULL, `c13` int(11) NOT NULL, `c14` int(11) NOT NULL, `c15` int(11) NOT NULL, `c16` int(11) NOT NULL, `c17` int(11) NOT NULL, `c18` int(11) NOT NULL, `c19` int(11) NOT NULL, `c20` int(11) NOT NULL, `c21` int(11) NOT NULL, `c22` int(11) NOT NULL, `c23` int(11) NOT NULL, `c24` int(11) NOT NULL, `c25` int(11) NOT NULL, `c26` int(11) NOT NULL, `c27` int(11) NOT NULL, `c28` int(11) NOT NULL, `c29` int(11) NOT NULL, `c30` int(11) NOT NULL, `c31` int(11) NOT NULL, `c32` int(11) NOT NULL, `c33` int(11) NOT NULL, `c34` int(11) NOT NULL, `c35` int(11) NOT NULL, `c36` int(11) NOT NULL, `c37` int(11) NOT NULL, `c38` int(11) NOT NULL, `c39` int(11) NOT NULL, `c40` int(11) NOT NULL, `c41` int(11) NOT NULL, `c42` int(11) NOT NULL, `c43` int(11) NOT NULL, `c44` int(11) NOT NULL, `c45` int(11) NOT NULL, `c46` int(11) NOT NULL, `c47` int(11) NOT NULL, `c48` int(11) NOT NULL, `c49` int(11) NOT NULL, `c50` int(11) NOT NULL, `c51` int(11) NOT NULL, `c52` int(11) NOT NULL, `c53` int(11) NOT NULL, `c54` int(11) NOT NULL, `c55` int(11) NOT NULL, `c56` int(11) NOT NULL, `c57` int(11) NOT NULL, `c58` int(11) NOT NULL, `c59` int(11) NOT NULL, `c60` int(11) NOT NULL, `c61` int(11) NOT NULL, `c62` int(11) NOT NULL, `c63` int(11) NOT NULL, `c64` int(11) NOT NULL, `c65` int(11) NOT NULL, PRIMARY KEY (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`, KEY `idx_ok` (`c33`,`c34`,`c35`,`c36`,`c37`,`c38`,`c39`,`c40`,`c41`,`c42`,`c43`,`c ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci DROP TABLE t2;
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.5Angebot (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-11-25) ¤*Eine klare Vorstellung vom Zielzustand |
|
||||||||||||||||
2026-11-25