1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 11.0 into 11.1

This commit is contained in:
Marko Mäkelä
2024-03-28 12:15:36 +02:00
727 changed files with 22650 additions and 8324 deletions

View File

@@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2);
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
Got one of the listed errors
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
a
2

View File

@@ -32,7 +32,7 @@ foobar 2
# Restart server with keysbad3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
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.
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
DROP TABLE t1;
# Start server with keys3.txt
@@ -44,31 +44,31 @@ INSERT INTO t2 VALUES ('foobar',1,2);
# Restart server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SELECT * FROM t2;
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 id = 1;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
SELECT * FROM t2 where b = 1;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
INSERT INTO t2 VALUES ('tmp',3,3);
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DELETE FROM t2 where b = 3;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DELETE FROM t2 where id = 3;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
UPDATE t2 set b = b +1;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
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 is corrupted. Please drop the table and recreate.
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 HY000: Table test/t2 is corrupted. Please drop the table and recreate.
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 is corrupted. Please drop the table and recreate.
test.t2 analyze Error Table `test`.`t2` is corrupted. Please drop the table and recreate.
test.t2 analyze error Corrupt
TRUNCATE TABLE t2;
ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DROP TABLE t2;
# Start server with keys2.txt

View File

@@ -13,24 +13,24 @@ ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
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.
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.
ALTER TABLE t1 ENGINE=InnoDB;
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SHOW WARNINGS;
Level Code Message
Error 1877 Table test/t1 is corrupted. Please drop the table and recreate.
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 is corrupted. Please drop the table and recreate.
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 is corrupted. Please drop the table and recreate.
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
@@ -40,7 +40,7 @@ backup: t1
UNLOCK TABLES;
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
ALTER TABLE t1 DISCARD TABLESPACE;
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;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@@ -61,7 +61,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
# restart: --innodb-encrypt-tables --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
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")
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
ALTER TABLE t1 RENAME TO t1new;
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
DROP TABLE t1;

View File

@@ -1,7 +1,7 @@
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; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
# Restart mysqld --file-key-management-filename=keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
set GLOBAL innodb_default_encryption_key_id=4;
@@ -16,9 +16,9 @@ insert into t3 values (1, repeat('secret',6000));
# Restart mysqld --file-key-management-filename=keys3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
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(*) from t2 FORCE INDEX (b) where b like 'secret%';
ERROR 42S02: Table 'test.t2' doesn't exist in engine
ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
count(*)
1

View File

@@ -1,8 +1,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|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[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` is corrupted");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
create table t5 (
@@ -24,9 +23,9 @@ insert into t1 values (1,2,'maria','db','encryption');
alter table t1 encrypted='yes' `encryption_key_id`=1;
# restart: --innodb-encrypt-tables=OFF
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 t5;
ERROR 42S02: Table 'test.t5' doesn't exist in engine
ERROR HY000: Table `test`.`t5` is corrupted. Please drop the table and recreate.
# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1;
drop table t5;

View File

@@ -1,4 +1,4 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
@@ -17,11 +17,11 @@ COMMIT;
# Corrupt tables
# restart
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;
Got one of the listed errors
SELECT * FROM t3;
ERROR 42S02: Table 'test.t3' doesn't exist in engine
ERROR HY000: Table `test`.`t3` is corrupted. Please drop the table and recreate.
# Restore the original tables
# restart
DROP TABLE t1,t2,t3;

View File

@@ -38,11 +38,11 @@ SELECT COUNT(1) FROM t2;
COUNT(1)
2048
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
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 where b = 'ab';
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT COUNT(1) FROM t1;
ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
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

View File

@@ -22,6 +22,15 @@ insert into t2 select * from t1;
insert into t3 select * from t1;
insert into t4 select * from t1;
commit;
# Flush all dirty pages from buffer pool
SET @no_checkpoint_save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
SET @no_checkpoint_save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
SET GLOBAL innodb_max_dirty_pages_pct=0.0;
SET GLOBAL innodb_max_dirty_pages_pct= @no_checkpoint_save_pct;
SET GLOBAL innodb_max_dirty_pages_pct_lwm= @no_checkpoint_save_pct_lwm;
CREATE TABLE t5 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
begin;
@@ -41,6 +50,6 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t1.ibd/ in mysqld.1.err
FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd/ in mysqld.1.err
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1,t2,t3,t4,t5;