mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Write information about restart in .result
Idea comes from MySQL which does something similar
This commit is contained in:
@@ -24,3 +24,4 @@ SET GLOBAL innodb_encryption_threads = 4;
|
||||
# Success!
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
# restart
|
||||
|
@@ -18,6 +18,7 @@ SET GLOBAL debug_dbug = '+d,ib_log';
|
||||
SET GLOBAL innodb_log_checkpoint_now = 1;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
|
||||
INSERT INTO t1 VALUES(NULL);
|
||||
# restart
|
||||
set global innodb_encrypt_tables=OFF;
|
||||
set global debug_key_management_version=1;
|
||||
select * from t1;
|
||||
|
@@ -27,6 +27,7 @@ NOT FOUND /tempsecret/ in t2.ibd
|
||||
FOUND 12 /dummysecret/ in t3.ibd
|
||||
# ibdata1 expecting NOT FOUND
|
||||
NOT FOUND /foobarsecret/ in ibdata1
|
||||
# restart
|
||||
# Now turn off encryption and wait for threads to decrypt everything
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
# Wait max 10 min for key encryption threads to decrypt all spaces
|
||||
@@ -49,6 +50,7 @@ FOUND 12 /tempsecret/ in t2.ibd
|
||||
FOUND 12 /dummysecret/ in t3.ibd
|
||||
# ibdata1 expecting NOT FOUND
|
||||
NOT FOUND /foobarsecret/ in ibdata1
|
||||
# restart
|
||||
# Now turn on encryption and wait for threads to encrypt all spaces
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
@@ -71,4 +73,5 @@ NOT FOUND /tempsecret/ in t2.ibd
|
||||
FOUND 12 /dummysecret/ in t3.ibd
|
||||
# ibdata1 expecting NOT FOUND
|
||||
NOT FOUND /foobarsecret/ in ibdata1
|
||||
# restart
|
||||
drop table t1, t2, t3;
|
||||
|
@@ -35,4 +35,5 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
|
||||
# Run innochecksum on t3
|
||||
# Run innochecksum on t6
|
||||
# Restore the original tables
|
||||
# restart
|
||||
DROP TABLE t1, t2, t3, t4, t5, t6;
|
||||
|
@@ -6,6 +6,7 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[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("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
|
||||
INSERT INTO t1 VALUES ('foobar');
|
||||
@@ -27,17 +28,21 @@ foobar 1
|
||||
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
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 192 Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
# Start server with keys3.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
|
||||
SET GLOBAL innodb_default_encryption_key_id=5;
|
||||
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
|
||||
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
|
||||
SELECT * FROM t2 where id = 1;
|
||||
@@ -67,3 +72,4 @@ ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
DROP TABLE t2;
|
||||
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
@@ -3,10 +3,12 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
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\\.");
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
# restart: --plugin-load-add=file_key_management.so --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
|
||||
SHOW WARNINGS;
|
||||
@@ -30,9 +32,11 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 check status Operation failed
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
backup: t1
|
||||
UNLOCK TABLES;
|
||||
# restart: --plugin-load-add=file_key_management.so --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
|
||||
DROP TABLE t1;
|
||||
@@ -40,6 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
restore: t1 .ibd and .cfg files
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
Warnings:
|
||||
Warning 1814 Tablespace has been discarded for table `t1`
|
||||
@@ -50,6 +55,7 @@ t1 CREATE TABLE `t1` (
|
||||
`f` varchar(8) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
||||
# restart: --innodb-encrypt-tables --plugin-load-add=file_key_management.so --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")
|
||||
ALTER TABLE t1 RENAME TO t1new;
|
||||
|
@@ -22,6 +22,7 @@ backup: t1
|
||||
UNLOCK TABLES;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
restore: t1 .ibd and .cfg files
|
||||
# restart
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW CREATE TABLE t1;
|
||||
|
@@ -2,10 +2,12 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root pa
|
||||
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");
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize Warning Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
@@ -19,4 +21,5 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 check status Operation failed
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
# restart: --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
DROP TABLE t1;
|
||||
|
@@ -2,6 +2,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
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: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set GLOBAL innodb_default_encryption_key_id=4;
|
||||
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
@@ -13,6 +14,7 @@ insert into t1 values (1, repeat('secret',6000));
|
||||
insert into t2 values (1, repeat('secret',6000));
|
||||
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 HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
|
||||
@@ -21,4 +23,5 @@ select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
|
||||
count(*)
|
||||
1
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
drop table t1,t2,t3;
|
||||
|
@@ -96,6 +96,7 @@ connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR done';
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
COMMIT;
|
||||
# restart
|
||||
disconnect con1;
|
||||
select * from t1;
|
||||
f1 f2
|
||||
|
@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
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.t[15].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
create table t5 (
|
||||
`intcol1` int(32) DEFAULT NULL,
|
||||
`intcol2` int(32) DEFAULT NULL,
|
||||
@@ -20,9 +21,11 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=InnoDB;
|
||||
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
|
||||
select * from t5;
|
||||
ERROR 42S02: Table 'test.t5' doesn't exist in engine
|
||||
# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
drop table t1;
|
||||
drop table t5;
|
||||
|
@@ -14,6 +14,7 @@ INSERT INTO t3 select * from t1;
|
||||
COMMIT;
|
||||
# Backup tables before corrupting
|
||||
# Corrupt tables
|
||||
# restart
|
||||
SELECT * FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
SELECT * FROM t2;
|
||||
@@ -21,4 +22,5 @@ ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be
|
||||
SELECT * FROM t3;
|
||||
ERROR 42S02: Table 'test.t3' doesn't exist in engine
|
||||
# Restore the original tables
|
||||
# restart
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
@@ -61,4 +61,5 @@ FOUND 1 /public/ in t7.ibd
|
||||
FOUND 1 /public/ in t8.ibd
|
||||
# t9 page compressed expecting NOT FOUND
|
||||
NOT FOUND /public/ in t9.ibd
|
||||
# restart
|
||||
drop database enctests;
|
||||
|
@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
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");
|
||||
# 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;
|
||||
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
||||
CREATE TABLE t3(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=NO;
|
||||
@@ -22,6 +23,7 @@ INSERT INTO t2 SELECT * FROM t1;
|
||||
INSERT INTO t3 SELECT * FROM t1;
|
||||
|
||||
# Restart server with keys3.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
|
||||
set global innodb_encryption_rotate_key_age = 1;
|
||||
use test;
|
||||
CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
||||
@@ -42,6 +44,7 @@ SELECT COUNT(1) FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
|
||||
# Start server with keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SELECT COUNT(1) FROM t1;
|
||||
COUNT(1)
|
||||
2048
|
||||
|
@@ -118,6 +118,7 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
# restart
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
@@ -193,6 +194,7 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
# restart
|
||||
show create table innodb_compact;
|
||||
Table Create Table
|
||||
innodb_compact CREATE TABLE `innodb_compact` (
|
||||
|
@@ -41,6 +41,7 @@ call innodb_insert_proc(2000);
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
commit;
|
||||
# restart: --innodb-encrypt-tables=OFF
|
||||
set global innodb_compression_algorithm = 1;
|
||||
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
|
||||
show create table innodb_normal;
|
||||
|
@@ -60,6 +60,7 @@ variable_value > 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
# restart
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
@@ -115,6 +116,7 @@ drop table innodb_redundant;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ENCRYPTION_KEY_ID=2 ENCRYPTED=YES;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
# Restarting server...
|
||||
# restart
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
1
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
# Success!
|
||||
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
|
||||
# All done
|
||||
|
@@ -5,7 +5,7 @@ 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: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.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]*\\]");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
||||
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
@@ -28,6 +28,6 @@ insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
|
||||
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
|
||||
COMMIT;
|
||||
# Kill the server
|
||||
# restart
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
drop table t1, t2,t3,t4;
|
||||
|
@@ -6,6 +6,7 @@ flush tables;
|
||||
create table t1(a int not null primary key, b char(200)) engine=innodb;
|
||||
|
||||
# Restart server with encryption
|
||||
# restart: --plugin-load-add=file_key_management.so --loose-file-key-management --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys.txt --file-key-management-encryption-algorithm=aes_cbc --innodb-encrypt-tables=ON --innodb-encryption-threads=4 --innodb-tablespaces-encryption --innodb-encryption-rotate-key-age=15
|
||||
# Wait until encryption threads have encrypted all tablespaces
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
NAME
|
||||
@@ -31,6 +32,7 @@ NAME
|
||||
# Success!
|
||||
|
||||
# Restart server with no encryption setup, there should be no crashes
|
||||
# restart: --skip-file-key-management --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 --innodb-tablespaces-encryption
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
NAME
|
||||
innodb_system
|
||||
|
@@ -1,11 +1,12 @@
|
||||
--- innodb-spatial-index.result
|
||||
+++ innodb-spatial-index.result
|
||||
@@ -1,23 +1,26 @@
|
||||
@@ -1,23 +1,27 @@
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
|
||||
ENCRYPTED=YES;
|
||||
-Got one of the listed errors
|
||||
+INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)'));
|
||||
+# restart
|
||||
+INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
|
||||
+DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
|
@@ -1,11 +1,12 @@
|
||||
--- innodb-spatial-index.result
|
||||
+++ innodb-spatial-index.result
|
||||
@@ -1,23 +1,26 @@
|
||||
@@ -1,23 +1,27 @@
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
|
||||
ENCRYPTED=YES;
|
||||
-Got one of the listed errors
|
||||
+INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)'));
|
||||
+# restart
|
||||
+INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
|
||||
+DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
|
@@ -38,6 +38,7 @@ NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd
|
||||
# ib_logfile0 expecting NOT FOUND
|
||||
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
|
||||
# Restart without redo log encryption
|
||||
# restart: --skip-innodb-encrypt-log --innodb-log-files-in-group=1
|
||||
SELECT COUNT(*) FROM t0;
|
||||
COUNT(*)
|
||||
1024
|
||||
@@ -55,6 +56,7 @@ FOUND 1 /(public|gossip).*/ in ib_logfile0
|
||||
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
|
||||
# t0.ibd expecting NOT FOUND
|
||||
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd
|
||||
# restart
|
||||
SELECT COUNT(*) FROM t0;
|
||||
COUNT(*)
|
||||
1025
|
||||
|
@@ -1,10 +1,12 @@
|
||||
# redo log from before MariaDB 10.2.2/MySQL 5.7.9
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2\./ in mysqld.1.err
|
||||
# redo log from before MariaDB 10.2.2, with corrupted log checkpoint
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -12,12 +14,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err
|
||||
FOUND 2 /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err
|
||||
# redo log from before MariaDB 10.2.2, with corrupted log block
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
|
||||
# empty redo log from before MariaDB 10.2.2
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -25,24 +29,28 @@ COUNT(*)
|
||||
1
|
||||
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
|
||||
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err
|
||||
# distant future redo log format, with valid header checksum
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\./ in mysqld.1.err
|
||||
# valid header, but old-format checkpoint blocks
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err
|
||||
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -50,6 +58,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
|
||||
# same, but with current-version header
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -57,6 +66,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
|
||||
FOUND 2 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
|
||||
# --innodb-force-recovery=6 (skip the entire redo log)
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -64,11 +74,13 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
||||
FOUND 1 /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err
|
||||
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
# --innodb-force-recovery=6 (skip the entire redo log)
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -76,6 +88,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
||||
# Test a corrupted MLOG_FILE_NAME record.
|
||||
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -88,12 +101,14 @@ FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8
|
||||
FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
|
||||
# Test a corrupted MLOG_FILE_NAME record.
|
||||
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err
|
||||
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
|
||||
FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
|
||||
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
|
||||
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
|
||||
# Empty 10.3 redo log
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -120,6 +138,7 @@ COUNT(*)
|
||||
1
|
||||
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
|
||||
# Empty 10.2 redo log
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -127,11 +146,13 @@ COUNT(*)
|
||||
1
|
||||
FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
|
||||
# Minimal MariaDB 10.1.21 encrypted redo log
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
|
||||
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
1
|
||||
1
|
||||
FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
|
||||
# restart
|
||||
ib_buffer_pool
|
||||
ib_logfile0
|
||||
ib_logfile1
|
||||
|
@@ -146,6 +146,7 @@ variable_value > 0
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
|
||||
variable_value > 0
|
||||
1
|
||||
# restart
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
update innodb_page_compressed1 set c1 = c1 + 1;
|
||||
|
@@ -53,6 +53,7 @@ NAME
|
||||
innodb_system
|
||||
# Success!
|
||||
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||
Variable_name Value
|
||||
innodb_encrypt_log ON
|
||||
|
@@ -25,6 +25,7 @@ NOT FOUND /foobar/ in t1.ibd
|
||||
NOT FOUND /temp/ in t2.ibd
|
||||
# t3 ... on expecting NOT FOUND
|
||||
NOT FOUND /barfoo/ in t3.ibd
|
||||
# restart
|
||||
db.opt
|
||||
t1.frm
|
||||
t1.ibd
|
||||
@@ -72,6 +73,7 @@ NOT FOUND /foobar/ in t1.ibd
|
||||
NOT FOUND /temp/ in t2.ibd
|
||||
# t3 ... on expecting NOT FOUND
|
||||
NOT FOUND /barfoo/ in t3.ibd
|
||||
# restart
|
||||
ALTER TABLE t1 ENGINE InnoDB;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
@@ -97,6 +99,7 @@ t3 CREATE TABLE `t3` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes
|
||||
# Restarting server
|
||||
# restart
|
||||
# Done restarting server
|
||||
# Verify that tables are still usable
|
||||
SELECT COUNT(1) FROM t1;
|
||||
@@ -115,8 +118,10 @@ NOT FOUND /foobar/ in t1.ibd
|
||||
NOT FOUND /temp/ in t2.ibd
|
||||
# t3 ... on expecting NOT FOUND
|
||||
NOT FOUND /barfoo/ in t3.ibd
|
||||
# restart
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
# Success!
|
||||
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
DROP PROCEDURE innodb_insert_proc;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
@@ -15,6 +15,7 @@ insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
|
||||
insert into innodb_compressed2 select * from innodb_compressed1;
|
||||
insert into innodb_compressed3 select * from innodb_compressed1;
|
||||
insert into innodb_compressed4 select * from innodb_compressed1;
|
||||
# restart
|
||||
# t1 yes on expecting NOT FOUND
|
||||
NOT FOUND /private/ in innodb_compressed1.ibd
|
||||
# t2 yes on expecting NOT FOUND
|
||||
@@ -95,6 +96,7 @@ NOT FOUND /private/ in innodb_compressed2.ibd
|
||||
NOT FOUND /private/ in innodb_compressed3.ibd
|
||||
# t4 yes on expecting NOT FOUND
|
||||
NOT FOUND /private/ in innodb_compressed4.ibd
|
||||
# restart
|
||||
select * from innodb_compressed1 where d = 40;
|
||||
c1 d a b
|
||||
3 40 private evenmoreprivate
|
||||
|
@@ -101,6 +101,7 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
variable_value >= 0
|
||||
1
|
||||
# restart
|
||||
update innodb_normal set c1 = c1 + 1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
|
@@ -1,2 +1,4 @@
|
||||
# restart
|
||||
create table t1 (a int);
|
||||
# restart
|
||||
drop table t1;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
# restart
|
||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||
Variable_name Value
|
||||
innodb_encrypt_log OFF
|
||||
@@ -749,6 +750,7 @@ innodb_encrypted_3/t_98
|
||||
innodb_encrypted_3/t_99
|
||||
# Success!
|
||||
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
# Restart Success!
|
||||
use innodb_encrypted_1;
|
||||
use innodb_encrypted_2;
|
||||
|
@@ -40,6 +40,7 @@ NOT FOUND /author/ in t5.ibd
|
||||
NOT FOUND /mangled/ in t6.ibd
|
||||
# t7 ... on expecting NOT FOUND
|
||||
NOT FOUND /mysql/ in t7.ibd
|
||||
# restart
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
ALTER TABLE t1 ADD COLUMN b int default 2;
|
||||
ALTER TABLE t2 ADD COLUMN b int default 2;
|
||||
@@ -134,5 +135,6 @@ NOT FOUND /author/ in t5.ibd
|
||||
NOT FOUND /mangled/ in t6.ibd
|
||||
# t7 ... on expecting NOT FOUND
|
||||
NOT FOUND /mysql/ in t7.ibd
|
||||
# restart
|
||||
DROP PROCEDURE innodb_insert_proc;
|
||||
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Restart mysqld --loose-file-key-management-filename=keys2.txt
|
||||
# restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@@ -65,7 +65,7 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
# Restart mysqld --loose-file-key-management-filename=keys3.txt
|
||||
# restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
|
||||
select * from innodb_normal;
|
||||
c1 b
|
||||
1 test1
|
||||
|
@@ -11,7 +11,6 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.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]*\\]");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
@@ -61,13 +60,11 @@ let $cleanup= drop table t1,t2,t3,t4;
|
||||
--let CLEANUP_IF_CHECKPOINT= $cleanup;
|
||||
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
||||
|
||||
--echo # restart
|
||||
-- source include/start_mysqld.inc
|
||||
#
|
||||
# In above server does start but InnoDB refuses to start
|
||||
# thus we need to restart server with correct key file
|
||||
#
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
# embedded does not support restart
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--echo # Restart mysqld --loose-file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
@@ -43,7 +42,6 @@ select * from innodb_redundant;
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
|
||||
--echo # Restart mysqld --loose-file-key-management-filename=keys3.txt
|
||||
-- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
|
Reference in New Issue
Block a user