1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-21360 global debug_dbug pre-test value restoration issues

This commit is contained in:
Alice Sherepa
2020-01-09 13:38:48 +01:00
parent 451573fab1
commit b7fb30e930
171 changed files with 564 additions and 564 deletions

View File

@@ -8,10 +8,10 @@ select f1, substring(f2, 1, 40) from t1;
f1 substring(f2, 1, 40)
1 ****************************************
set @saved_debug = @@session.debug_dbug;
set debug_dbug = 'd,row_ins_index_entry_timeout';
SET debug_dbug = 'd,row_ins_index_entry_timeout';
update t1 set f1 = 3;
select f1, substring(f2, 1, 40) from t1;
f1 substring(f2, 1, 40)
3 ****************************************
drop table t1;
set debug_dbug= @saved_debug;
SET debug_dbug= @saved_debug;

View File

@@ -5,10 +5,10 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34);
set @old_dbug= @@session.debug_dbug;
set debug_dbug = '+d,row_ins_sec_index_entry_timeout';
SET debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34);
select * from t1;
f1 f2 f3
14 25 34
drop table t1;
set debug_dbug = @old_dbug;
SET debug_dbug = @old_dbug;

View File

@@ -1,5 +1,5 @@
call mtr.add_suppression("InnoDB: Warning: Index.*");
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized';
create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb;
create procedure innodb_insert_proc (repeat_count int)
@@ -30,4 +30,4 @@ count(1)
781
drop procedure innodb_insert_proc;
drop table t1;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -1,5 +1,5 @@
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -1,6 +1,6 @@
SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
alter table bug56947 add unique index (a);
ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
@@ -9,4 +9,4 @@ Table Op Msg_type Msg_text
test.bug56947 check status OK
drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -24,7 +24,7 @@ test.corrupt_bit_test_ā check Warning InnoDB: Index idx is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index idxā is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index idxē is marked as corrupted
test.corrupt_bit_test_ā check error Corrupt
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
ERROR HY000: Index idx is corrupted
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);

View File

@@ -4,7 +4,7 @@ drop table if exists t1;
connection con1;
create table t1 (id integer, x integer) engine = InnoDB;
insert into t1 values(0, 0);
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,fatal-semaphore-timeout';
set autocommit=0;
# Sending query on con1,
@@ -22,6 +22,6 @@ connection default;
# Waitting for reconnect after mysqld restarts
# Reconnected after mysqld was successfully restarted
# Cleaning up before exit
set debug_dbug = @saved_dbug;
SET debug_dbug = @saved_dbug;
drop table if exists t1;
# Clean exit

View File

@@ -7,10 +7,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -20,10 +20,10 @@ i f c
2 2.2 b
3 3.3 c
# 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -33,10 +33,10 @@ i f c
2 2.2 b
3 3.3 c
# 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_drop_index';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
@@ -50,10 +50,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_create_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_create_index';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
@@ -67,9 +67,9 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -85,9 +85,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -103,9 +103,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK

View File

@@ -12,8 +12,8 @@ create table t1 (f1 int primary key, f2 blob) engine = innodb;
insert into t1 values (1, repeat('*', 50000));
select f1, substring(f2, 1, 40) from t1;
set @saved_debug = @@session.debug_dbug;
set debug_dbug = 'd,row_ins_index_entry_timeout';
SET debug_dbug = 'd,row_ins_index_entry_timeout';
update t1 set f1 = 3;
select f1, substring(f2, 1, 40) from t1;
drop table t1;
set debug_dbug= @saved_debug;
SET debug_dbug= @saved_debug;

View File

@@ -9,8 +9,8 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34);
set @old_dbug= @@session.debug_dbug;
set debug_dbug = '+d,row_ins_sec_index_entry_timeout';
SET debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34);
select * from t1;
drop table t1;
set debug_dbug = @old_dbug;
SET debug_dbug = @old_dbug;

View File

@@ -6,7 +6,7 @@
call mtr.add_suppression("InnoDB: Warning: Index.*");
# This caused crash earlier
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized';
create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb;
@@ -37,4 +37,4 @@ select count(1) from t1 where c between 7 and 787;
drop procedure innodb_insert_proc;
drop table t1;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -8,8 +8,8 @@
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
# This will invoke test_normalize_table_name_low() in debug builds
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -7,7 +7,7 @@
SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
--replace_regex /"[^"]*"/"xxx"/
--error ER_GET_ERRNO
@@ -16,4 +16,4 @@ check table bug56947;
drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT;
set debug_dbug= @saved_dbug;
SET debug_dbug= @saved_dbug;

View File

@@ -36,7 +36,7 @@ select count(*) from corrupt_bit_test_ā;
SET @save_dbug = @@SESSION.debug_dbug;
SET debug_dbug = '+d,dict_set_index_corrupted';
check table corrupt_bit_test_ā;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
# Cannot create new indexes while corrupted indexes exist
--error ER_INDEX_CORRUPT

View File

@@ -17,7 +17,7 @@ eval create table t1 (id integer, x integer) engine = InnoDB;
insert into t1 values(0, 0);
# Enable the debug injection.
set @saved_dbug = @@session.debug_dbug;
SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,fatal-semaphore-timeout';
set autocommit=0;
@@ -108,7 +108,7 @@ source include/wait_until_connected_again.inc;
--echo # Cleaning up before exit
--disable_warnings
set debug_dbug = @saved_dbug;
SET debug_dbug = @saved_dbug;
drop table if exists t1;
--enable_warnings

View File

@@ -33,8 +33,8 @@ while ($i)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
set debug_dbug = '+d,increase_mtr_checkpoint_size';
set debug_dbug = '+d,crash_after_checkpoint';
SET debug_dbug = '+d,increase_mtr_checkpoint_size';
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;
@@ -64,7 +64,7 @@ while ($i)
--enable_query_log
--exec echo "wait" > $_expect_file_name
set debug_dbug = '+d,crash_after_checkpoint';
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;

View File

@@ -14,26 +14,26 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
#
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
select * from t;
--echo # 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
select * from t;
--echo # 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_drop_index';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t;
@@ -44,10 +44,10 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
SET debug_dbug = '+d,ib_err_trunc_create_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_create_index';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t;
@@ -58,9 +58,9 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
select * from t;
@@ -73,9 +73,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
select * from t;
@@ -88,9 +88,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
SET @@SESSION.debug_dbug = @save_dbug;
check table t;
select * from t order by i;