Commit b76881a2 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent a5fcced7
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low';
...@@ -3,7 +3,6 @@ create table bug56947(a int not null) engine = innodb; ...@@ -3,7 +3,6 @@ create table bug56947(a int not null) engine = innodb;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
alter table bug56947 add unique index (a); alter table bug56947 add unique index (a);
ERROR HY000: Got error 11 "xxx" from storage engine InnoDB ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
check table bug56947; check table bug56947;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.bug56947 check status OK test.bug56947 check status OK
......
...@@ -12,5 +12,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; ...@@ -12,5 +12,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low';
...@@ -107,8 +107,5 @@ SLEEP 1; ...@@ -107,8 +107,5 @@ SLEEP 1;
--enable_reconnect --enable_reconnect
--source include/wait_until_connected_again.inc --source include/wait_until_connected_again.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
# because the session information is lost after server restart
--echo # Cleanup --echo # Cleanup
DROP TABLE t1; DROP TABLE t1;
...@@ -11,7 +11,6 @@ SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; ...@@ -11,7 +11,6 @@ SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
--replace_regex /"[^"]*"/"xxx"/ --replace_regex /"[^"]*"/"xxx"/
--error ER_GET_ERRNO --error ER_GET_ERRNO
alter table bug56947 add unique index (a); alter table bug56947 add unique index (a);
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
check table bug56947; check table bug56947;
drop table bug56947; drop table bug56947;
......
...@@ -2,5 +2,4 @@ CREATE TABLE t (a INT, b TEXT) engine=innodb; ...@@ -2,5 +2,4 @@ CREATE TABLE t (a INT, b TEXT) engine=innodb;
SET debug_dbug='+d,alter_table_rollback_new_index'; SET debug_dbug='+d,alter_table_rollback_new_index';
ALTER TABLE t ADD FULLTEXT INDEX (b(64)); ALTER TABLE t ADD FULLTEXT INDEX (b(64));
ERROR HY000: Unknown error ERROR HY000: Unknown error
SET debug_dbug='-d,alter_table_rollback_new_index';
DROP TABLE t; DROP TABLE t;
...@@ -88,9 +88,10 @@ title VARCHAR(200), ...@@ -88,9 +88,10 @@ title VARCHAR(200),
body TEXT, body TEXT,
FULLTEXT (title,body) FULLTEXT (title,body)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
CREATE FULLTEXT INDEX idx ON articles(body); CREATE FULLTEXT INDEX idx ON articles(body);
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 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
SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail"; SET SESSION debug_dbug=@saved_debug_dbug;
ALTER TABLE articles STATS_PERSISTENT=DEFAULT; ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles; DROP TABLE articles;
...@@ -26,6 +26,5 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN ...@@ -26,6 +26,5 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN
ERROR HY000: Table handler out of memory ERROR HY000: Table handler out of memory
SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE); SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE);
ERROR HY000: Table handler out of memory ERROR HY000: Table handler out of memory
SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit";
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_ft_result_cache_limit=default; SET GLOBAL innodb_ft_result_cache_limit=default;
...@@ -14,6 +14,4 @@ SET debug_dbug='+d,alter_table_rollback_new_index'; ...@@ -14,6 +14,4 @@ SET debug_dbug='+d,alter_table_rollback_new_index';
-- error ER_UNKNOWN_ERROR -- error ER_UNKNOWN_ERROR
ALTER TABLE t ADD FULLTEXT INDEX (b(64)); ALTER TABLE t ADD FULLTEXT INDEX (b(64));
SET debug_dbug='-d,alter_table_rollback_new_index';
DROP TABLE t; DROP TABLE t;
...@@ -197,10 +197,11 @@ CREATE TABLE articles ( ...@@ -197,10 +197,11 @@ CREATE TABLE articles (
# Abort the operation in dict_create_index_step by setting # Abort the operation in dict_create_index_step by setting
# return status of dict_create_index_tree_step() to DB_OUT_OF_MEMORY # return status of dict_create_index_tree_step() to DB_OUT_OF_MEMORY
# The newly create dict_index_t should be removed from fts cache # The newly create dict_index_t should be removed from fts cache
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
--error ER_OUT_OF_RESOURCES --error ER_OUT_OF_RESOURCES
CREATE FULLTEXT INDEX idx ON articles(body); CREATE FULLTEXT INDEX idx ON articles(body);
SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail"; SET SESSION debug_dbug=@saved_debug_dbug;
# This simply go through ha_innobase::commit_inplace_alter_table # This simply go through ha_innobase::commit_inplace_alter_table
# and do a fts_check_cached_index() # and do a fts_check_cached_index()
......
...@@ -44,8 +44,6 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN ...@@ -44,8 +44,6 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN
--error 128 --error 128
SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE); SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE);
SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit";
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_ft_result_cache_limit=default; SET GLOBAL innodb_ft_result_cache_limit=default;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment