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;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
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;
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
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
check table bug56947;
Table Op Msg_type Msg_text
test.bug56947 check status OK
......
......@@ -12,5 +12,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376;
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low';
......@@ -107,8 +107,5 @@ SLEEP 1;
--enable_reconnect
--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
DROP TABLE t1;
......@@ -11,7 +11,6 @@ SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
--replace_regex /"[^"]*"/"xxx"/
--error ER_GET_ERRNO
alter table bug56947 add unique index (a);
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
check table bug56947;
drop table bug56947;
......
......@@ -2,5 +2,4 @@ CREATE TABLE t (a INT, b TEXT) engine=innodb;
SET debug_dbug='+d,alter_table_rollback_new_index';
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
ERROR HY000: Unknown error
SET debug_dbug='-d,alter_table_rollback_new_index';
DROP TABLE t;
......@@ -88,9 +88,10 @@ title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
) ENGINE=InnoDB;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
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
SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail";
SET SESSION debug_dbug=@saved_debug_dbug;
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles;
......@@ -26,6 +26,5 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN
ERROR HY000: Table handler out of memory
SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE);
ERROR HY000: Table handler out of memory
SET SESSION debug_dbug="-d,fts_instrument_result_cache_limit";
DROP TABLE t1;
SET GLOBAL innodb_ft_result_cache_limit=default;
......@@ -14,6 +14,4 @@ SET debug_dbug='+d,alter_table_rollback_new_index';
-- error ER_UNKNOWN_ERROR
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
SET debug_dbug='-d,alter_table_rollback_new_index';
DROP TABLE t;
......@@ -197,10 +197,11 @@ CREATE TABLE articles (
# Abort the operation in dict_create_index_step by setting
# 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
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
--error ER_OUT_OF_RESOURCES
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
# and do a fts_check_cached_index()
......
......@@ -44,8 +44,6 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN
--error 128
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;
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