diff --git a/mysql-test/suite/innodb/r/truncate_debug.result b/mysql-test/suite/innodb/r/truncate_debug.result index eb4e9cfbc85..c04b83dbbe8 100644 --- a/mysql-test/suite/innodb/r/truncate_debug.result +++ b/mysql-test/suite/innodb/r/truncate_debug.result @@ -1,6 +1,9 @@ # # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS # +SET @ahi= @@global.innodb_adaptive_hash_index; +SET GLOBAL innodb_adaptive_hash_index=OFF; +SET GLOBAL innodb_adaptive_hash_index=ON; Test_1 :- Check if DDL operations are possible on table being truncated. Also check if DDL operations on other tables succeed. @@ -81,6 +84,5 @@ connection con2; disconnect con2; connection default; SET DEBUG_SYNC= 'RESET'; -SET session lock_wait_timeout=default; -set global innodb_adaptive_hash_index=on; +SET GLOBAL innodb_adaptive_hash_index=@ahi; drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/t/truncate_debug.test b/mysql-test/suite/innodb/t/truncate_debug.test index 915688ed354..5fee9174d98 100644 --- a/mysql-test/suite/innodb/t/truncate_debug.test +++ b/mysql-test/suite/innodb/t/truncate_debug.test @@ -8,6 +8,12 @@ --echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS --echo # +SET @ahi= @@global.innodb_adaptive_hash_index; +# Ensure that there is no adaptive hash index on any system tables, +# or any other tables than the ones that we are creating below. +SET GLOBAL innodb_adaptive_hash_index=OFF; +SET GLOBAL innodb_adaptive_hash_index=ON; + --echo Test_1 :- Check if DDL operations are possible on --echo table being truncated. Also check if --echo DDL operations on other tables succeed. @@ -115,8 +121,7 @@ disconnect con2; connection default; SET DEBUG_SYNC= 'RESET'; -SET session lock_wait_timeout=default; -set global innodb_adaptive_hash_index=on; +SET GLOBAL innodb_adaptive_hash_index=@ahi; drop table t1,t2,t3; --source include/wait_until_count_sessions.inc