1
############################################################################
2
# Bug #1218330: Adaptive hash index memory is incorrectly calculated in SHOW
3
# ENGINE INNODB STATUS and I_S
4
############################################################################
6
--source include/have_innodb.inc
8
let $adaptive_hash_mem_1=`SELECT VARIABLE_VALUE FROM
9
INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
10
VARIABLE_NAME='Innodb_mem_adaptive_hash'`;
13
a INT PRIMARY KEY, b INT,
15
UNIQUE INDEX b(b)) ENGINE=InnoDB;
17
INSERT INTO t1 VALUES (1, 1, REPEAT("a", 200));
25
SELECT a FROM t1 WHERE a=1;
26
SELECT b FROM t1 WHERE b=1;
31
let $adaptive_hash_mem_2=`SELECT VARIABLE_VALUE FROM
32
INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
33
VARIABLE_NAME='Innodb_mem_adaptive_hash'`;
35
# The original implementation would should identical values in
36
# adaptive_hash_mem_1 and adaptive_hash_mem_2
38
--eval SELECT $adaptive_hash_mem_1 != $adaptive_hash_mem_2 as should_be_1