Skip to content

Commit b76881a

Browse files
committed
Do not SET DEBUG_DBUG=-d,... in tests
To disable debug instrumentation, save and restore the original value of the variable DEBUG_DBUG. Assigning -d,... will enable the output of a lot of unrelated DBUG messages to the server error log.
1 parent a5fcced commit b76881a

11 files changed

+4
-16
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
22
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
33
DROP TABLE bug11754376;
4-
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low';

mysql-test/suite/innodb/r/innodb_bug56947.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ create table bug56947(a int not null) engine = innodb;
33
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
44
alter table bug56947 add unique index (a);
55
ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
6-
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
76
check table bug56947;
87
Table Op Msg_type Msg_text
98
test.bug56947 check status OK

mysql-test/suite/innodb/t/innodb_bug11754376.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
1212
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
1313

1414
DROP TABLE bug11754376;
15-
16-
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low';

mysql-test/suite/innodb/t/innodb_bug14147491.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,5 @@ SLEEP 1;
107107
--enable_reconnect
108108
--source include/wait_until_connected_again.inc
109109

110-
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
111-
# because the session information is lost after server restart
112-
113110
--echo # Cleanup
114111
DROP TABLE t1;

mysql-test/suite/innodb/t/innodb_bug56947.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
1111
--replace_regex /"[^"]*"/"xxx"/
1212
--error ER_GET_ERRNO
1313
alter table bug56947 add unique index (a);
14-
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
1514
check table bug56947;
1615

1716
drop table bug56947;

mysql-test/suite/innodb_fts/r/innobase_drop_fts_index_table.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ CREATE TABLE t (a INT, b TEXT) engine=innodb;
22
SET debug_dbug='+d,alter_table_rollback_new_index';
33
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
44
ERROR HY000: Unknown error
5-
SET debug_dbug='-d,alter_table_rollback_new_index';
65
DROP TABLE t;

mysql-test/suite/innodb_fts/r/innodb_fts_misc_debug.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ title VARCHAR(200),
8888
body TEXT,
8989
FULLTEXT (title,body)
9090
) ENGINE=InnoDB;
91+
SET @saved_debug_dbug = @@SESSION.debug_dbug;
9192
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
9293
CREATE FULLTEXT INDEX idx ON articles(body);
9394
ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
94-
SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail";
95+
SET SESSION debug_dbug=@saved_debug_dbug;
9596
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
9697
DROP TABLE articles;

mysql-test/suite/innodb_fts/r/innodb_fts_result_cache_limit.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN
2626
ERROR HY000: Table handler out of memory
2727
SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE);
2828
ERROR HY000: Table handler out of memory
29-
SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit";
3029
DROP TABLE t1;
3130
SET GLOBAL innodb_ft_result_cache_limit=default;

mysql-test/suite/innodb_fts/t/innobase_drop_fts_index_table.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ SET debug_dbug='+d,alter_table_rollback_new_index';
1414
-- error ER_UNKNOWN_ERROR
1515
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
1616

17-
SET debug_dbug='-d,alter_table_rollback_new_index';
18-
1917
DROP TABLE t;

mysql-test/suite/innodb_fts/t/innodb_fts_misc_debug.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ CREATE TABLE articles (
197197
# Abort the operation in dict_create_index_step by setting
198198
# return status of dict_create_index_tree_step() to DB_OUT_OF_MEMORY
199199
# The newly create dict_index_t should be removed from fts cache
200+
SET @saved_debug_dbug = @@SESSION.debug_dbug;
200201
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
201202
--error ER_OUT_OF_RESOURCES
202203
CREATE FULLTEXT INDEX idx ON articles(body);
203-
SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail";
204+
SET SESSION debug_dbug=@saved_debug_dbug;
204205

205206
# This simply go through ha_innobase::commit_inplace_alter_table
206207
# and do a fts_check_cached_index()

0 commit comments

Comments
 (0)