mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
InnoDB: send "corrupted" error to the user, not only to the log
This commit is contained in:
@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2);
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
SELECT * FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
2
|
||||
|
@ -1,10 +1,10 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
# Start server with keys2.txt
|
||||
@ -46,29 +46,29 @@ INSERT INTO t2 VALUES ('foobar',1,2);
|
||||
SELECT * FROM t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
SELECT * FROM t2 where id = 1;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
SELECT * FROM t2 where b = 1;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
INSERT INTO t2 VALUES ('tmp',3,3);
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
DELETE FROM t2 where b = 3;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
DELETE FROM t2 where id = 3;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
UPDATE t2 set b = b +1;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
OPTIMIZE TABLE t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 optimize Error Table 'test.t2' doesn't exist in engine
|
||||
test.t2 optimize status Operation failed
|
||||
test.t2 optimize Error Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
test.t2 optimize error Corrupt
|
||||
ALTER TABLE t2 ADD COLUMN d INT;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
ANALYZE TABLE t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze Error Table 'test.t2' doesn't exist in engine
|
||||
test.t2 analyze status Operation failed
|
||||
test.t2 analyze Error Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
test.t2 analyze error Corrupt
|
||||
TRUNCATE TABLE t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
|
||||
DROP TABLE t2;
|
||||
|
||||
# Start server with keys2.txt
|
||||
|
@ -1,9 +1,9 @@
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
@ -19,20 +19,20 @@ SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1932 Table 'test.t1' doesn't exist in engine
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1932 Table 'test.t1' doesn't exist in engine
|
||||
Error 1877 Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 optimize status Operation failed
|
||||
test.t1 optimize Error Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
test.t1 optimize error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 check status Operation failed
|
||||
test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
test.t1 check error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
@ -65,5 +65,5 @@ t1 CREATE TABLE `t1` (
|
||||
RENAME TABLE t1 TO t1new;
|
||||
ERROR HY000: Error on rename of './test/t1' to './test/t1new' (errno: 155 "The table does not exist in the storage engine")
|
||||
ALTER TABLE t1 RENAME TO t1new;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
DROP TABLE t1;
|
||||
|
@ -1,8 +1,8 @@
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
@ -18,8 +18,8 @@ SHOW WARNINGS;
|
||||
Level Code Message
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 check status Operation failed
|
||||
test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
test.t1 check error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
@ -1,8 +1,8 @@
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
|
||||
@ -40,9 +40,9 @@ COUNT(1)
|
||||
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
SELECT COUNT(1) FROM t1 where b = 'ab';
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
SELECT COUNT(1) FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
@ -54,12 +54,12 @@ EOF
|
||||
SELECT * FROM t1;
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[1].ibd looks corrupted; key_version=");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted. Please drop the table and recreate.");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate.");
|
||||
--enable_query_log
|
||||
let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
CHECK TABLE t2;
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
@ -75,32 +75,32 @@ INSERT INTO t2 VALUES ('foobar',1,2);
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
SELECT * FROM t2;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT * FROM t2 where id = 1;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT * FROM t2 where b = 1;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
INSERT INTO t2 VALUES ('tmp',3,3);
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
DELETE FROM t2 where b = 3;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
DELETE FROM t2 where id = 3;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
UPDATE t2 set b = b +1;
|
||||
|
||||
OPTIMIZE TABLE t2;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
ALTER TABLE t2 ADD COLUMN d INT;
|
||||
|
||||
ANALYZE TABLE t2;
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
TRUNCATE TABLE t2;
|
||||
|
||||
DROP TABLE t2;
|
||||
|
@ -8,13 +8,13 @@
|
||||
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
|
||||
# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
@ -36,7 +36,7 @@ INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
SELECT * FROM t1;
|
||||
--replace_regex /key_id [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
--replace_regex /key_id [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
@ -97,7 +97,7 @@ SHOW CREATE TABLE t1;
|
||||
|
||||
--error ER_ERROR_ON_RENAME
|
||||
RENAME TABLE t1 TO t1new;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
ALTER TABLE t1 RENAME TO t1new;
|
||||
# Drop should pass even with incorrect keys
|
||||
# Drop should succeed even with incorrect keys
|
||||
DROP TABLE t1;
|
||||
|
@ -7,12 +7,12 @@
|
||||
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
# MDEV-11004: Unable to start (Segfault or os error 2) when encryption key missing
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
@ -48,9 +48,9 @@ SELECT COUNT(1) FROM t3;
|
||||
SELECT COUNT(1) FROM t2;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT COUNT(1) FROM t1 where b = 'ab';
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT COUNT(1) FROM t1;
|
||||
|
||||
--echo
|
||||
|
@ -17,7 +17,7 @@ disconnect con1;
|
||||
SELECT COUNT(*) FROM bug16720368;
|
||||
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
|
||||
INSERT INTO bug16720368 VALUES(1);
|
||||
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
|
||||
ERROR HY000: Table test/bug16720368 is corrupted. Please drop the table and recreate.
|
||||
INSERT INTO bug16720368_1 VALUES(1);
|
||||
# Shut down the server to uncorrupt the data.
|
||||
# restart
|
||||
|
@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(1);
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
SELECT * FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
1
|
||||
|
@ -19,7 +19,7 @@ call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted*");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`bug16720368` is corrupted");
|
||||
call mtr.add_suppression("Table .*bug16720368.* is corrupted");
|
||||
-- enable_query_log
|
||||
|
||||
-- echo #
|
||||
@ -79,7 +79,7 @@ EOF
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
SELECT COUNT(*) FROM bug16720368;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
INSERT INTO bug16720368 VALUES(1);
|
||||
INSERT INTO bug16720368_1 VALUES(1);
|
||||
|
||||
|
@ -7,7 +7,7 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
|
||||
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
|
||||
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=3\\]");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate.");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
@ -57,7 +57,7 @@ SELECT * FROM t1;
|
||||
let $restart_parameters=--innodb_force_recovery=1;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
--error ER_TABLE_CORRUPT
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
CHECK TABLE t2;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- suite/plugins/r/compression.result
|
||||
+++ suite/plugins/r/compression.reject
|
||||
@@ -1,9 +1,9 @@
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
-# Testing bzip2 compression provider with innodb
|
||||
+# Testing lz4 compression provider with innodb
|
||||
@ -10,14 +10,15 @@
|
||||
+set global innodb_compression_algorithm = lz4;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
|
||||
create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
@@ -14,7 +14,7 @@
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
@@ -15,8 +15,8 @@
|
||||
0 abcabcabc 300
|
||||
1 defdefdef 3000
|
||||
2 ghighighi 30000
|
||||
-# restart: --disable-provider-bzip2
|
||||
+# restart: --disable-provider-lz4
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
+ERROR HY000: Table test/t1 is compressed with lz4, which is not currently loaded. Please load the lz4 provider plugin to open the table
|
||||
drop table t1;
|
||||
# restart
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- suite/plugins/r/compression.result
|
||||
+++ suite/plugins/r/compression.reject
|
||||
@@ -1,9 +1,9 @@
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
-# Testing bzip2 compression provider with innodb
|
||||
+# Testing lzma compression provider with innodb
|
||||
@ -10,14 +10,15 @@
|
||||
+set global innodb_compression_algorithm = lzma;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
|
||||
create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
@@ -14,7 +14,7 @@
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
@@ -15,8 +15,8 @@
|
||||
0 abcabcabc 300
|
||||
1 defdefdef 3000
|
||||
2 ghighighi 30000
|
||||
-# restart: --disable-provider-bzip2
|
||||
+# restart: --disable-provider-lzma
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
+ERROR HY000: Table test/t1 is compressed with lzma, which is not currently loaded. Please load the lzma provider plugin to open the table
|
||||
drop table t1;
|
||||
# restart
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- suite/plugins/r/compression.result
|
||||
+++ suite/plugins/r/compression.reject
|
||||
@@ -1,9 +1,9 @@
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
-# Testing bzip2 compression provider with innodb
|
||||
+# Testing lzo compression provider with innodb
|
||||
@ -10,14 +10,15 @@
|
||||
+set global innodb_compression_algorithm = lzo;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
|
||||
create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
@@ -14,7 +14,7 @@
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
@@ -15,8 +15,8 @@
|
||||
0 abcabcabc 300
|
||||
1 defdefdef 3000
|
||||
2 ghighighi 30000
|
||||
-# restart: --disable-provider-bzip2
|
||||
+# restart: --disable-provider-lzo
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
+ERROR HY000: Table test/t1 is compressed with lzo, which is not currently loaded. Please load the lzo provider plugin to open the table
|
||||
drop table t1;
|
||||
# restart
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- suite/plugins/r/compression.result
|
||||
+++ suite/plugins/r/compression.reject
|
||||
@@ -1,9 +1,9 @@
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
-# Testing bzip2 compression provider with innodb
|
||||
+# Testing snappy compression provider with innodb
|
||||
@ -10,14 +10,15 @@
|
||||
+set global innodb_compression_algorithm = snappy;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
|
||||
create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
@@ -14,7 +14,7 @@
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
@@ -15,8 +15,8 @@
|
||||
0 abcabcabc 300
|
||||
1 defdefdef 3000
|
||||
2 ghighighi 30000
|
||||
-# restart: --disable-provider-bzip2
|
||||
+# restart: --disable-provider-snappy
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
+ERROR HY000: Table test/t1 is compressed with snappy, which is not currently loaded. Please load the snappy provider plugin to open the table
|
||||
drop table t1;
|
||||
# restart
|
||||
|
@ -9,7 +9,7 @@
|
||||
-set global innodb_compression_algorithm = bzip2;
|
||||
-call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
-call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
-call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
-call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
-create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
+create table t1 (a int, b text COMMENT 'FLAGS "COLUMN_SCALAR|COMPRESS_LZ4"') engine = mroonga charset = utf8;
|
||||
insert t1 (a, b) values (0, repeat("abc", 100));
|
||||
@ -22,7 +22,7 @@
|
||||
-# restart: --disable-provider-bzip2
|
||||
+# restart: --disable-provider-lz4
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
+a left(b, 9) length(b)
|
||||
+0 0
|
||||
+1 0
|
||||
|
@ -5,7 +5,7 @@ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provi
|
||||
set global innodb_compression_algorithm = bzip2;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
create table t1 (a int, b text ) engine = innodb page_compressed = 1;
|
||||
insert t1 (a, b) values (0, repeat("abc", 100));
|
||||
insert t1 (a, b) values (1, repeat("def", 1000));
|
||||
@ -17,6 +17,6 @@ a left(b, 9) length(b)
|
||||
2 ghighighi 30000
|
||||
# restart: --disable-provider-bzip2
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
|
||||
drop table t1;
|
||||
# restart
|
||||
|
@ -21,7 +21,7 @@ if ($engine == "innodb") {
|
||||
let $table_params = page_compressed = 1;
|
||||
call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
|
||||
call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
|
||||
}
|
||||
if ($engine == "mroonga") {
|
||||
let $column_params = `select upper('COMMENT \'flags "COLUMN_SCALAR|COMPRESS_$alg"\'')`;
|
||||
@ -39,7 +39,7 @@ let $restart_parameters = --disable-provider-$alg;
|
||||
source include/restart_mysqld.inc;
|
||||
|
||||
if ($engine == "innodb") {
|
||||
error ER_NO_SUCH_TABLE_IN_ENGINE;
|
||||
error ER_PROVIDER_NOT_LOADED;
|
||||
select a, left(b, 9), length(b) from t1;
|
||||
}
|
||||
if ($engine == "mroonga"){
|
||||
|
@ -1041,14 +1041,15 @@ dict_table_open_on_name(
|
||||
{
|
||||
ulint algo = table->space->get_compression_algo();
|
||||
if (algo <= PAGE_ALGORITHM_LAST && !fil_comp_algo_loaded(algo)) {
|
||||
ib::error() << "Table " << table->name << " is compressed with "
|
||||
<< page_compression_algorithms[algo]
|
||||
<< ", which is not currently loaded. Please load the "
|
||||
<< page_compression_algorithms[algo]
|
||||
<< " provider plugin to open the table";
|
||||
my_printf_error(ER_PROVIDER_NOT_LOADED,
|
||||
"Table %s is compressed with %s, which is not currently loaded. "
|
||||
"Please load the %s provider plugin to open the table",
|
||||
MYF(ME_ERROR_LOG), table->name,
|
||||
page_compression_algorithms[algo], page_compression_algorithms[algo]);
|
||||
} else {
|
||||
ib::error() << "Table " << table->name
|
||||
<< " is corrupted. Please drop the table and recreate.";
|
||||
my_printf_error(ER_TABLE_CORRUPT,
|
||||
"Table %s is corrupted. Please drop the table and recreate.",
|
||||
MYF(ME_ERROR_LOG), table->name);
|
||||
}
|
||||
dict_sys.unfreeze();
|
||||
DBUG_RETURN(nullptr);
|
||||
|
Reference in New Issue
Block a user