Commit 06a7923f authored by Marko Mäkelä's avatar Marko Mäkelä

Remove some more error log spam.

Do not effectively set DEBUG_DBUG='d' by setting DEBUG_DBUG='-d,...'.
Instead, restore the saved value of DEBUG_DBUG.

Also, split the test innodb_fts.innodb_fts_misc_debug into
innodb_fts.crash_recovery and innodb_fts.misc_debug, and enable
these tests for --valgrind, the latter test for --embedded,
and the former tests for the non-debug server.
parent 257eea3d
......@@ -4,17 +4,8 @@ call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* co
call mtr.add_suppression("InnoDB: Based on page type .*");
FLUSH TABLES;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
SET SESSION innodb_strict_mode=1;
SELECT @@SESSION.innodb_strict_mode;
@@SESSION.innodb_strict_mode
1
DROP DATABASE IF EXISTS test_wl5522;
Warnings:
Note 1008 Can't drop database 'test_wl5522'; database doesn't exist
......@@ -38,7 +29,6 @@ SELECT * FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table 't1'
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Lost connection to MySQL server during query
SET SESSION debug_dbug="-d,ib_import_before_commit_crash";
SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
SELECT COUNT(*) FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table 't1'
......@@ -47,20 +37,10 @@ ERROR HY000: Lost connection to MySQL server during query
unlink: t1.ibd
unlink: t1.cfg
# Restart and reconnect to the server
SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
SET SESSION innodb_strict_mode=1;
SELECT @@SESSION.innodb_strict_mode;
@@SESSION.innodb_strict_mode
1
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
ROW_FORMAT=COMPRESSED;
ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
......@@ -89,10 +69,11 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_import_internal_error";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: While updating the <space, root page number> of index "GEN_CLUST_INDEX" - Generic error
SET SESSION debug_dbug="-d,ib_import_internal_error";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
DROP TABLE test_wl5522.t1;
......@@ -106,36 +87,36 @@ SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Too many concurrent transactions
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 44 't1.ibd
SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_cluster_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_cluster_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
unlink: t1.ibd
unlink: t1.cfg
DROP TABLE test_wl5522.t1;
......@@ -479,7 +460,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -491,7 +472,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -504,7 +485,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index "GEN_CLUST_INDEX"
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -517,7 +498,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Incorrect key file for table 't1'; try to repair it
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -530,7 +511,7 @@ SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
Warnings:
Warning 1814 Tablespace has been discarded for table 't1'
SET SESSION debug_dbug="-d,ib_import_create_index_failure_1";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -543,7 +524,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fil_space_create_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 11 't1.ibd
SET SESSION debug_dbug="-d,fil_space_create_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -556,7 +537,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 39 't1.ibd
SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -569,7 +550,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
......@@ -582,4 +563,3 @@ set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
SET GLOBAL INNODB_FILE_PER_TABLE=1;
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET SESSION innodb_strict_mode=0;
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
......
......@@ -26,19 +26,12 @@ FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
let $innodb_file_format = `SELECT @@innodb_file_format`;
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
SET GLOBAL innodb_file_format = `Barracuda`;
SELECT @@innodb_file_format;
SET SESSION innodb_strict_mode=1;
SELECT @@SESSION.innodb_strict_mode;
DROP DATABASE IF EXISTS test_wl5522;
CREATE DATABASE test_wl5522;
......@@ -97,7 +90,6 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
--source include/wait_until_connected_again.inc
--disable_reconnect
SET SESSION debug_dbug="-d,ib_import_before_commit_crash";
#### Before commit crash
# Check that the DD is consistent after recovery
......@@ -130,7 +122,6 @@ EOF
--source include/wait_until_connected_again.inc
--disable_reconnect
SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
#### Before checkpoint crash
# After the above test the results are non-deterministic, recreate the table
......@@ -139,13 +130,9 @@ SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
SET GLOBAL innodb_file_format = `Barracuda`;
SELECT @@innodb_file_format;
SET SESSION innodb_strict_mode=1;
SELECT @@SESSION.innodb_strict_mode;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
ROW_FORMAT=COMPRESSED;
......@@ -184,6 +171,7 @@ ib_restore_tablespaces("test_wl5522", "t1");
EOF
# Test failure after reset of space id and LSN in the tablespace
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_import_internal_error";
--replace_regex /'.*t1.cfg'/'t1.cfg'/
......@@ -191,7 +179,7 @@ SET SESSION debug_dbug="+d,ib_import_internal_error";
--error ER_INTERNAL_ERROR
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_internal_error";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -233,7 +221,7 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_restore_tablespaces("test_wl5522", "t1");
EOF
SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Test failure after attempting a tablespace open
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
......@@ -242,7 +230,7 @@ SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
--error ER_GET_ERRMSG
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -257,7 +245,7 @@ SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -271,7 +259,7 @@ SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -285,7 +273,7 @@ SET SESSION debug_dbug="+d,ib_import_cluster_failure";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_cluster_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -299,7 +287,7 @@ SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Restore files
perl;
......@@ -313,7 +301,7 @@ SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
# Left over from the failed IMPORT
perl;
......@@ -500,7 +488,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
--error ER_INTERNAL_ERROR
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -533,7 +521,7 @@ SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
#--error ER_INTERNAL_ERROR
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -563,7 +551,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
--error ER_INNODB_INDEX_CORRUPT
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -593,7 +581,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
--error ER_NOT_KEYFILE
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -614,7 +602,7 @@ SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
SET SESSION debug_dbug="-d,ib_import_create_index_failure_1";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -645,7 +633,7 @@ SET SESSION debug_dbug="+d,fil_space_create_failure";
--error ER_GET_ERRMSG
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,fil_space_create_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -676,7 +664,7 @@ SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
--error ER_GET_ERRMSG
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -708,7 +696,7 @@ SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
--error ER_INTERNAL_ERROR
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
......@@ -756,4 +744,3 @@ call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl552
eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
......@@ -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';
......@@ -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;
......
......@@ -15,9 +15,7 @@ INSERT INTO articles (title,body) VALUES
BEGIN;
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
SET SESSION debug_dbug="+d,crash_commit_before";
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
# Kill and restart
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
CREATE FULLTEXT INDEX idx ON articles (title,body);
......@@ -38,9 +36,7 @@ INSERT INTO articles (title,body) VALUES
BEGIN;
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
SET SESSION debug_dbug="+d,crash_commit_before";
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
# Kill and restart
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles
......@@ -71,9 +67,7 @@ INSERT INTO articles VALUES
BEGIN;
INSERT INTO articles VALUES
(100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...');
SET SESSION debug_dbug="+d,crash_commit_before";
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
# Kill and restart
INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
......@@ -82,15 +76,3 @@ id FTS_DOC_ID title body
1 10 MySQL Tutorial DBMS stands for DataBase ...
8 12 MySQL Tutorial DBMS stands for DataBase ...
DROP TABLE articles;
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
) ENGINE=InnoDB;
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";
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles;
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;
......@@ -16,6 +16,7 @@ INSERT INTO t1 (a,b) VALUES
('MySQL from Tutorial','DBMS stands for DataBase ...') ,
('when To Use MySQL Well','After that you went through a ...'),
('where will Optimizing MySQL','what In this tutorial we will show ...');
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit";
SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' IN BOOLEAN MODE);
COUNT(*)
......@@ -26,6 +27,6 @@ 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";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
SET GLOBAL innodb_ft_result_cache_limit=default;
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
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=@saved_debug_dbug;
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles;
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 SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
#------------------------------------------------------------------------------
# Misc FTS test on debug servers only
#------------------------------------------------------------------------------
--source include/have_innodb.inc
# Must have debug code to use SET SESSION debug
--source include/have_debug.inc
# Crash recovery tests for FULLTEXT INDEX.
# Note: These tests used to be part of a larger test, innodb_fts_misc_debug
# or innodb_fts.misc_debug. The part of the test that actually needs debug
# instrumentation been moved to innodb_fts.misc_debug.
# Valgrind would complain about memory leaks when we crash on purpose.
--source include/not_valgrind.inc
# Embedded server does not support crashing
--source include/have_innodb.inc
# The embedded server tests do not support restarting.
--source include/not_embedded.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# Following are test for crash recovery on FTS index, the first scenario
# is for bug Bug #14586855 INNODB: FAILING ASSERTION: (DICT_INDEX_GET_N_UNIQUE(
# PLAN->INDEX) <= PLAN->N_EXAC
......@@ -46,27 +38,7 @@ BEGIN;
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
# Request a crash on next execution of commit.
SET SESSION debug_dbug="+d,crash_commit_before";
#
# Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#
# Execute the statement that causes the crash.
--error 2013
COMMIT;
--source include/wait_until_disconnected.inc
--sleep 2
# Turn on reconnect
--enable_reconnect
#
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
#
# Turn off reconnect again
--disable_reconnect
--source include/kill_and_restart_mysqld.inc
# This insert will re-initialize the Doc ID counter, it should not crash
INSERT INTO articles (title,body) VALUES
......@@ -90,33 +62,12 @@ INSERT INTO articles (title,body) VALUES
('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...');
# Now let's crash the server with "crash_commit_before"
BEGIN;
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
# Request a crash on next execution of commit.
SET SESSION debug_dbug="+d,crash_commit_before";
#
# Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#
# Execute the statement that causes the crash.
--error 2013
COMMIT;
--source include/wait_until_disconnected.inc
--sleep 2
# Turn on reconnect
--enable_reconnect
#
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
#
# Turn off reconnect again
--disable_reconnect
--source include/kill_and_restart_mysqld.inc
# This insert will re-initialize the Doc ID counter, it should not crash
INSERT INTO articles (title,body) VALUES
......@@ -150,31 +101,12 @@ INSERT INTO articles VALUES
(5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'),
(7, 4, 'MySQL Security','When configured properly, MySQL ...');
# Now let's crash the server with "crash_commit_before"
BEGIN;
INSERT INTO articles VALUES
(100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...');
# Request a crash on next execution of commit.
SET SESSION debug_dbug="+d,crash_commit_before";
#
# Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#
# Execute the statement that causes the crash.
--error 2013
COMMIT;
--source include/wait_until_disconnected.inc
--sleep 2
# Turn on reconnect
--enable_reconnect
#
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
#
--source include/kill_and_restart_mysqld.inc
# This would re-initialize the FTS index and do the re-tokenization
# of above records
......@@ -184,26 +116,3 @@ SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
DROP TABLE articles;
# Following test is for Bug 14668777 - ASSERT ON IB_VECTOR_SIZE(
# TABLE->FTS->INDEXES, ALTER TABLE
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
) ENGINE=InnoDB;
# 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 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";
# This simply go through ha_innobase::commit_inplace_alter_table
# and do a fts_check_cached_index()
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles;
#
# Test innobase_drop_fts_index_table()
#
-- source include/have_innodb.inc
# Must have debug code to use SET SESSION debug
-- source include/have_debug.inc
-- source include/not_embedded.inc
CREATE TABLE t (a INT, b TEXT) engine=innodb;
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;
......@@ -27,6 +27,7 @@ INSERT INTO t1 (a,b) VALUES
('when To Use MySQL Well','After that you went through a ...'),
('where will Optimizing MySQL','what In this tutorial we will show ...');
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit";
# Simple term search
......@@ -44,7 +45,7 @@ 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";
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
......
# Miscellanous FULLTEXT INDEX tests for debug-instrumented servers.
# Note: These tests used to be part of a larger test, innodb_fts_misc_debug
# or innodb_fts.misc_debug. A large part of that test can be run on a
# non-debug server and has been renamed to innodb_fts.crash_recovery.
--source include/have_innodb.inc
--source include/have_debug.inc
# Following test is for Bug 14668777 - ASSERT ON IB_VECTOR_SIZE(
# TABLE->FTS->INDEXES, ALTER TABLE
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
) ENGINE=InnoDB;
# 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=@saved_debug_dbug;
# This simply go through ha_innobase::commit_inplace_alter_table
# and do a fts_check_cached_index()
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
DROP TABLE articles;
# This test used to be called innodb_fts.innobase_drop_fts_index_table:
CREATE TABLE t (a INT, b TEXT) engine=innodb;
SET debug_dbug='+d,alter_table_rollback_new_index';
-- error ER_UNKNOWN_ERROR
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
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