mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -25,7 +25,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`
|
||||
@ -34,7 +33,6 @@ 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 SESSION innodb_strict_mode=1;
|
||||
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
|
||||
@ -65,10 +63,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;
|
||||
@ -82,36 +81,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: Index for table 't1' is corrupt; 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: Index for table 't1' is corrupt; 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: Index for table 't1' is corrupt; 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: Index for table 't1' is corrupt; 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: Index for table 't1' is corrupt; 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;
|
||||
@ -455,7 +454,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
|
||||
@ -468,7 +467,7 @@ restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="+d,buf_page_is_corrupt_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,buf_page_is_corrupt_failure";
|
||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||
DROP TABLE test_wl5522.t1;
|
||||
unlink: t1.ibd
|
||||
unlink: t1.cfg
|
||||
@ -481,7 +480,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
|
||||
@ -494,7 +493,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: Index for table 't1' is corrupt; 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
|
||||
@ -507,7 +506,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
|
||||
@ -520,7 +519,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
|
||||
@ -533,7 +532,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
|
||||
@ -546,7 +545,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
|
||||
|
@ -1,4 +1,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';
|
||||
|
@ -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
|
||||
|
@ -85,7 +85,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
|
||||
@ -118,7 +117,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
|
||||
@ -165,6 +163,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'/
|
||||
@ -172,7 +171,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;
|
||||
@ -214,7 +213,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";
|
||||
@ -223,7 +222,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;
|
||||
@ -238,7 +237,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;
|
||||
@ -252,7 +251,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;
|
||||
@ -266,7 +265,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;
|
||||
@ -280,7 +279,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;
|
||||
@ -294,7 +293,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;
|
||||
@ -481,7 +480,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;
|
||||
|
||||
@ -514,7 +513,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;
|
||||
|
||||
@ -544,7 +543,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;
|
||||
|
||||
@ -574,7 +573,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;
|
||||
|
||||
@ -595,7 +594,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;
|
||||
|
||||
@ -626,7 +625,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;
|
||||
|
||||
@ -657,7 +656,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;
|
||||
|
||||
@ -689,7 +688,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;
|
||||
|
||||
|
@ -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;
|
@ -1,6 +0,0 @@
|
||||
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;
|
||||
|
19
mysql-test/suite/innodb_fts/r/misc_debug.result
Normal file
19
mysql-test/suite/innodb_fts/r/misc_debug.result
Normal file
@ -0,0 +1,19 @@
|
||||
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;
|
@ -1,20 +1,12 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Misc FTS test on debug servers only
|
||||
#------------------------------------------------------------------------------
|
||||
# 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.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Must have debug code to use SET SESSION debug
|
||||
--source include/have_debug.inc
|
||||
|
||||
# Valgrind would complain about memory leaks when we crash on purpose.
|
||||
--source include/not_valgrind.inc
|
||||
|
||||
# Embedded server does not support crashing
|
||||
# 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;
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# 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;
|
||||
|
||||
|
41
mysql-test/suite/innodb_fts/t/misc_debug.test
Normal file
41
mysql-test/suite/innodb_fts/t/misc_debug.test
Normal file
@ -0,0 +1,41 @@
|
||||
# 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;
|
Reference in New Issue
Block a user