Commit b5615eff authored by Michael Widenius's avatar Michael Widenius Committed by Monty

Write information about restart in .result

Idea comes from MySQL which does something similar
parent 6fd7a4b6
# Include this script only after using shutdown_mysqld.inc # Include this script only after using shutdown_mysqld.inc
# where $_expect_file_name was initialized. # where $_expect_file_name was initialized.
# Write file to make mysql-test-run.pl start up the server again # Write file to make mysql-test-run.pl start up the server again
# restart_noprint defines how much is printed to the .result file
# if 0 (default) then '# result' and restart_parameters are printed
# if 1 then print #result but not the content of restart_parameters
# if 2 then nothing is printed
if (!$restart_noprint)
{
--let $restart_noprint=0
}
if ($restart_parameters) if ($restart_parameters)
{ {
--exec echo "restart: $restart_parameters" > $_expect_file_name --exec echo "restart: $restart_parameters" > $_expect_file_name
if (!$restart_noprint)
{
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec echo "# restart: $restart_parameters"
}
if ($restart_noprint == 1)
{
--exec echo "# restart: with restart_parameters"
}
} }
if (!$restart_parameters) if (!$restart_parameters)
{ {
--exec echo "restart" > $_expect_file_name --exec echo "restart" > $_expect_file_name
if ($restart_noprint < 2)
{
--exec echo "# restart"
}
} }
# Turn on reconnect # Turn on reconnect
...@@ -18,4 +42,3 @@ if (!$restart_parameters) ...@@ -18,4 +42,3 @@ if (!$restart_parameters)
# Turn off reconnect again # Turn off reconnect again
--disable_reconnect --disable_reconnect
drop table if exists t1; drop table if exists t1;
# Kill the server # Kill the server
# restart
drop table t1; drop table t1;
# Kill the server # Kill the server
# restart
drop table t1; drop table t1;
ERROR 42S02: Unknown table 'test.t1' ERROR 42S02: Unknown table 'test.t1'
# Kill the server # Kill the server
# restart
drop table t1; drop table t1;
End of 5.1 tests End of 5.1 tests
# #
...@@ -15,8 +18,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' ...@@ -15,8 +18,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
and SUPPORT='YES'; and SUPPORT='YES';
# Kill the server # Kill the server
# restart
End of 5.5 tests End of 5.5 tests
# Kill the server # Kill the server
# restart
flush tables; flush tables;
show create table t1; show create table t1;
Table Create Table Table Create Table
...@@ -29,3 +34,4 @@ name dl ...@@ -29,3 +34,4 @@ name dl
EXAMPLE ha_example.so EXAMPLE ha_example.so
truncate table mysql.plugin; truncate table mysql.plugin;
# Kill the server # Kill the server
# restart
...@@ -15,6 +15,7 @@ insert into event_like select * from mysql.event; ...@@ -15,6 +15,7 @@ insert into event_like select * from mysql.event;
alter table mysql.event alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin; change column body body longtext character set utf8 collate utf8_bin;
"Now we restart the server" "Now we restart the server"
# restart
use events_test; use events_test;
select @@event_scheduler; select @@event_scheduler;
@@event_scheduler @@event_scheduler
...@@ -75,6 +76,7 @@ events_test abc1 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 ...@@ -75,6 +76,7 @@ events_test abc1 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1
events_test abc2 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test abc2 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
events_test abc3 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test abc3 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
Now let's restart the server again Now let's restart the server again
# restart
use events_test; use events_test;
select @@event_scheduler; select @@event_scheduler;
@@event_scheduler @@event_scheduler
...@@ -95,6 +97,7 @@ SHOW EVENTS; ...@@ -95,6 +97,7 @@ SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
"Now we restart the server" "Now we restart the server"
# restart
USE test; USE test;
SELECT @@event_scheduler; SELECT @@event_scheduler;
@@event_scheduler @@event_scheduler
......
# Kill the server # Kill the server
# restart: --ssl-key=MYSQLTEST_VARDIR/tmp/ssl_key.pem --ssl-cert=MYSQLTEST_VARDIR/tmp/ssl_cert.pem
connect ssl_con,localhost,root,,,,,SSL; connect ssl_con,localhost,root,,,,,SSL;
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after'; SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
# Use a different certificate ("Not after" certificate field changed) # Use a different certificate ("Not after" certificate field changed)
...@@ -24,3 +25,4 @@ SSL_ACCEPTS 0 ...@@ -24,3 +25,4 @@ SSL_ACCEPTS 0
SSL_FINISHED_ACCEPTS 0 SSL_FINISHED_ACCEPTS 0
# Cleanup # Cleanup
# Kill the server # Kill the server
# restart
...@@ -5,9 +5,11 @@ Setting root password ...@@ -5,9 +5,11 @@ Setting root password
Creating my.ini file Creating my.ini file
Creation of the database was successful Creation of the database was successful
# Kill the server # Kill the server
# restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir --loose-innodb
connect root,localhost,root,foo; connect root,localhost,root,foo;
SELECT @@datadir; SELECT @@datadir;
@@datadir @@datadir
DATADIR/ DATADIR/
# Kill the server # Kill the server
connection default; connection default;
# restart
...@@ -581,6 +581,7 @@ GRANT USAGE ON *.* TO 'user3'@'%'; ...@@ -581,6 +581,7 @@ GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'; GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
alter table mysql.user drop column Delete_history_priv; alter table mysql.user drop column Delete_history_priv;
alter table mysql.db drop column Delete_history_priv; alter table mysql.db drop column Delete_history_priv;
# restart
Run mysql_upgrade with all privileges on a user Run mysql_upgrade with all privileges on a user
flush privileges; flush privileges;
SHOW GRANTS FOR 'user3'@'%'; SHOW GRANTS FOR 'user3'@'%';
......
...@@ -292,6 +292,7 @@ DROP DATABASE shared; ...@@ -292,6 +292,7 @@ DROP DATABASE shared;
CALL mtr.add_suppression("Missing system table mysql.proxies_priv."); CALL mtr.add_suppression("Missing system table mysql.proxies_priv.");
DROP TABLE mysql.proxies_priv; DROP TABLE mysql.proxies_priv;
# Must come back with mysql.proxies_priv absent. # Must come back with mysql.proxies_priv absent.
# restart
SELECT * FROM mysql.proxies_priv; SELECT * FROM mysql.proxies_priv;
ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist
CREATE USER u1@localhost; CREATE USER u1@localhost;
......
...@@ -3,6 +3,7 @@ create table t1(a int) engine=example; ...@@ -3,6 +3,7 @@ create table t1(a int) engine=example;
drop table t1; drop table t1;
alter table mysql.plugin engine=innodb; alter table mysql.plugin engine=innodb;
restart restart
# restart
create table t1(a int) engine=example; create table t1(a int) engine=example;
select * from t1; select * from t1;
a a
......
...@@ -31,6 +31,7 @@ Warnings: ...@@ -31,6 +31,7 @@ Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt; EXECUTE stmt;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo' ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
# restart
SELECT 'All done'; SELECT 'All done';
All done All done
All done All done
......
...@@ -111,3 +111,4 @@ CREATE USER for baz@baz ...@@ -111,3 +111,4 @@ CREATE USER for baz@baz
CREATE USER 'baz'@'baz' IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07' CREATE USER 'baz'@'baz' IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07'
drop user bar@foo; drop user bar@foo;
drop user baz@baz; drop user baz@baz;
# restart
...@@ -56,6 +56,7 @@ grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA"; ...@@ -56,6 +56,7 @@ grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
Variable_name Value Variable_name Value
Ssl_cipher AES256-SHA Ssl_cipher AES256-SHA
drop user mysqltest_1@localhost; drop user mysqltest_1@localhost;
# restart: --ssl-cipher=AES128-SHA
connect ssl_con,localhost,root,,,,,SSL; connect ssl_con,localhost,root,,,,,SSL;
SHOW STATUS LIKE 'Ssl_cipher'; SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value Variable_name Value
......
...@@ -27,6 +27,7 @@ FOUND 3 /was in the XA prepared state/ in mysqld.1.err ...@@ -27,6 +27,7 @@ FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
# restart
FOUND 3 /was in the XA prepared state/ in mysqld.1.err FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
......
...@@ -2,5 +2,6 @@ create function udf_sequence returns integer soname "UDF_EXAMPLE_LIB"; ...@@ -2,5 +2,6 @@ create function udf_sequence returns integer soname "UDF_EXAMPLE_LIB";
create table t1 (n int key not null auto_increment, msg int as (udf_sequence()) virtual); create table t1 (n int key not null auto_increment, msg int as (udf_sequence()) virtual);
select * from t1; select * from t1;
n msg n msg
# restart
drop table t1; drop table t1;
drop function udf_sequence; drop function udf_sequence;
...@@ -145,6 +145,7 @@ master-bin.000009 ...@@ -145,6 +145,7 @@ master-bin.000009
master-bin.000010 master-bin.000010
master-bin.000011 master-bin.000011
# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index; SELECT @index;
@index @index
...@@ -171,6 +172,7 @@ master-bin.000010 ...@@ -171,6 +172,7 @@ master-bin.000010
master-bin.000011 master-bin.000011
master-bin.000012 master-bin.000012
# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index; SELECT @index;
@index @index
......
...@@ -145,6 +145,7 @@ master-bin.000009 ...@@ -145,6 +145,7 @@ master-bin.000009
master-bin.000010 master-bin.000010
master-bin.000011 master-bin.000011
# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index; SELECT @index;
@index @index
...@@ -171,6 +172,7 @@ master-bin.000010 ...@@ -171,6 +172,7 @@ master-bin.000010
master-bin.000011 master-bin.000011
master-bin.000012 master-bin.000012
# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index; SELECT @index;
@index @index
......
...@@ -24,3 +24,4 @@ SET GLOBAL innodb_encryption_threads = 4; ...@@ -24,3 +24,4 @@ SET GLOBAL innodb_encryption_threads = 4;
# Success! # Success!
SET GLOBAL innodb_encryption_threads = 0; SET GLOBAL innodb_encryption_threads = 0;
SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encrypt_tables = OFF;
# restart
...@@ -18,6 +18,7 @@ SET GLOBAL debug_dbug = '+d,ib_log'; ...@@ -18,6 +18,7 @@ SET GLOBAL debug_dbug = '+d,ib_log';
SET GLOBAL innodb_log_checkpoint_now = 1; SET GLOBAL innodb_log_checkpoint_now = 1;
SET GLOBAL innodb_flush_log_at_trx_commit = 1; SET GLOBAL innodb_flush_log_at_trx_commit = 1;
INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES(NULL);
# restart
set global innodb_encrypt_tables=OFF; set global innodb_encrypt_tables=OFF;
set global debug_key_management_version=1; set global debug_key_management_version=1;
select * from t1; select * from t1;
......
...@@ -27,6 +27,7 @@ NOT FOUND /tempsecret/ in t2.ibd ...@@ -27,6 +27,7 @@ NOT FOUND /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND # ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1 NOT FOUND /foobarsecret/ in ibdata1
# restart
# Now turn off encryption and wait for threads to decrypt everything # Now turn off encryption and wait for threads to decrypt everything
SET GLOBAL innodb_encrypt_tables = off; SET GLOBAL innodb_encrypt_tables = off;
# Wait max 10 min for key encryption threads to decrypt all spaces # Wait max 10 min for key encryption threads to decrypt all spaces
...@@ -49,6 +50,7 @@ FOUND 12 /tempsecret/ in t2.ibd ...@@ -49,6 +50,7 @@ FOUND 12 /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND # ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1 NOT FOUND /foobarsecret/ in ibdata1
# restart
# Now turn on encryption and wait for threads to encrypt all spaces # Now turn on encryption and wait for threads to encrypt all spaces
SET GLOBAL innodb_encrypt_tables = on; SET GLOBAL innodb_encrypt_tables = on;
# Wait max 10 min for key encryption threads to encrypt all spaces # Wait max 10 min for key encryption threads to encrypt all spaces
...@@ -71,4 +73,5 @@ NOT FOUND /tempsecret/ in t2.ibd ...@@ -71,4 +73,5 @@ NOT FOUND /tempsecret/ in t2.ibd
FOUND 12 /dummysecret/ in t3.ibd FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND # ibdata1 expecting NOT FOUND
NOT FOUND /foobarsecret/ in ibdata1 NOT FOUND /foobarsecret/ in ibdata1
# restart
drop table t1, t2, t3; drop table t1, t2, t3;
...@@ -35,4 +35,5 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; ...@@ -35,4 +35,5 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
# Run innochecksum on t3 # Run innochecksum on t3
# Run innochecksum on t6 # Run innochecksum on t6
# Restore the original tables # Restore the original tables
# restart
DROP TABLE t1, t2, t3, t4, t5, t6; 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] ...@@ -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("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"); call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
# Start server with keys2.txt # Start server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2; CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar'); INSERT INTO t1 VALUES ('foobar');
...@@ -27,17 +28,21 @@ foobar 1 ...@@ -27,17 +28,21 @@ foobar 1
foobar 2 foobar 2
# Restart server with keysbad3.txt # Restart server with keysbad3.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine 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; DROP TABLE t1;
Warnings: 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. 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 # 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; 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; 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); INSERT INTO t2 VALUES ('foobar',1,2);
# Restart server with keys2.txt # Restart server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SELECT * FROM t2; SELECT * FROM t2;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SELECT * FROM t2 where id = 1; SELECT * FROM t2 where id = 1;
...@@ -67,3 +72,4 @@ ERROR 42S02: Table 'test.t2' doesn't exist in engine ...@@ -67,3 +72,4 @@ ERROR 42S02: Table 'test.t2' doesn't exist in engine
DROP TABLE t2; DROP TABLE t2;
# Start server with keys2.txt # 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 ...@@ -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("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("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: 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; SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4; ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); 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; SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
SHOW WARNINGS; SHOW WARNINGS;
...@@ -30,9 +32,11 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine ...@@ -30,9 +32,11 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
test.t1 check status Operation failed test.t1 check status Operation failed
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message 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; FLUSH TABLES t1 FOR EXPORT;
backup: t1 backup: t1
UNLOCK TABLES; 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; ALTER TABLE t1 DISCARD TABLESPACE;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
DROP TABLE t1; DROP TABLE t1;
...@@ -40,6 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ...@@ -40,6 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4; ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files 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; ALTER TABLE t1 IMPORT TABLESPACE;
Warnings: Warnings:
Warning 1814 Tablespace has been discarded for table `t1` Warning 1814 Tablespace has been discarded for table `t1`
...@@ -50,6 +55,7 @@ t1 CREATE TABLE `t1` ( ...@@ -50,6 +55,7 @@ t1 CREATE TABLE `t1` (
`f` varchar(8) DEFAULT NULL, `f` varchar(8) DEFAULT NULL,
PRIMARY KEY (`pk`) PRIMARY KEY (`pk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4 ) 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; 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: 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; ALTER TABLE t1 RENAME TO t1new;
......
...@@ -22,6 +22,7 @@ backup: t1 ...@@ -22,6 +22,7 @@ backup: t1
UNLOCK TABLES; UNLOCK TABLES;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files restore: t1 .ibd and .cfg files
# restart
ALTER TABLE t1 IMPORT TABLESPACE; 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 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; SHOW CREATE TABLE t1;
......
...@@ -2,10 +2,12 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root pa ...@@ -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("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("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("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; SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4; ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); 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; OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text 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. 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 ...@@ -19,4 +21,5 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
test.t1 check status Operation failed test.t1 check status Operation failed
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message 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; DROP TABLE t1;
...@@ -2,6 +2,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n ...@@ -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("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]+\\]"); 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 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_file_per_table = ON;
set GLOBAL innodb_default_encryption_key_id=4; 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; 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)); ...@@ -13,6 +14,7 @@ insert into t1 values (1, repeat('secret',6000));
insert into t2 values (1, repeat('secret',6000)); insert into t2 values (1, repeat('secret',6000));
insert into t3 values (1, repeat('secret',6000)); insert into t3 values (1, repeat('secret',6000));
# Restart mysqld --file-key-management-filename=keys3.txt # 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%'; 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 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%'; 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%'; ...@@ -21,4 +23,5 @@ select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
count(*) count(*)
1 1
# Restart mysqld --file-key-management-filename=keys2.txt # 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; drop table t1,t2,t3;
...@@ -96,6 +96,7 @@ connection default; ...@@ -96,6 +96,7 @@ connection default;
SET DEBUG_SYNC = 'now WAIT_FOR done'; SET DEBUG_SYNC = 'now WAIT_FOR done';
SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT; COMMIT;
# restart
disconnect con1; disconnect con1;
select * from t1; select * from t1;
f1 f2 f1 f2
......
...@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n ...@@ -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("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("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"); 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 ( create table t5 (
`intcol1` int(32) DEFAULT NULL, `intcol1` int(32) DEFAULT NULL,
`intcol2` int(32) DEFAULT NULL, `intcol2` int(32) DEFAULT NULL,
...@@ -20,9 +21,11 @@ CREATE TABLE `t1` ( ...@@ -20,9 +21,11 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption'); insert into t1 values (1,2,'maria','db','encryption');
alter table t1 encrypted='yes' `encryption_key_id`=1; alter table t1 encrypted='yes' `encryption_key_id`=1;
# restart: --innodb-encrypt-tables=OFF
select * from t1; select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
select * from t5; select * from t5;
ERROR 42S02: Table 'test.t5' doesn't exist in engine 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 t1;
drop table t5; drop table t5;
...@@ -14,6 +14,7 @@ INSERT INTO t3 select * from t1; ...@@ -14,6 +14,7 @@ INSERT INTO t3 select * from t1;
COMMIT; COMMIT;
# Backup tables before corrupting # Backup tables before corrupting
# Corrupt tables # Corrupt tables
# restart
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
SELECT * FROM t2; SELECT * FROM t2;
...@@ -21,4 +22,5 @@ ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be ...@@ -21,4 +22,5 @@ ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be
SELECT * FROM t3; SELECT * FROM t3;
ERROR 42S02: Table 'test.t3' doesn't exist in engine ERROR 42S02: Table 'test.t3' doesn't exist in engine
# Restore the original tables # Restore the original tables
# restart
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
...@@ -61,4 +61,5 @@ FOUND 1 /public/ in t7.ibd ...@@ -61,4 +61,5 @@ FOUND 1 /public/ in t7.ibd
FOUND 1 /public/ in t8.ibd FOUND 1 /public/ in t8.ibd
# t9 page compressed expecting NOT FOUND # t9 page compressed expecting NOT FOUND
NOT FOUND /public/ in t9.ibd NOT FOUND /public/ in t9.ibd
# restart
drop database enctests; drop database enctests;
...@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n ...@@ -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("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: 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 # 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 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 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; 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; ...@@ -22,6 +23,7 @@ INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t3 SELECT * FROM t1; INSERT INTO t3 SELECT * FROM t1;
# Restart server with keys3.txt # 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; set global innodb_encryption_rotate_key_age = 1;
use test; use test;
CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1; 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; ...@@ -42,6 +44,7 @@ SELECT COUNT(1) FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
# Start server with keys2.txt # Start server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SELECT COUNT(1) FROM t1; SELECT COUNT(1) FROM t1;
COUNT(1) COUNT(1)
2048 2048
......
...@@ -118,6 +118,7 @@ variable_value >= 0 ...@@ -118,6 +118,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0 variable_value >= 0
1 1
# restart
update innodb_normal set c1 = c1 +1; update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1;
...@@ -193,6 +194,7 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( ...@@ -193,6 +194,7 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL, `c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
# restart
show create table innodb_compact; show create table innodb_compact;
Table Create Table Table Create Table
innodb_compact CREATE TABLE `innodb_compact` ( innodb_compact CREATE TABLE `innodb_compact` (
......
...@@ -41,6 +41,7 @@ call innodb_insert_proc(2000); ...@@ -41,6 +41,7 @@ call innodb_insert_proc(2000);
insert into innodb_compact select * from innodb_normal; insert into innodb_compact select * from innodb_normal;
insert into innodb_dynamic select * from innodb_normal; insert into innodb_dynamic select * from innodb_normal;
commit; commit;
# restart: --innodb-encrypt-tables=OFF
set global innodb_compression_algorithm = 1; set global innodb_compression_algorithm = 1;
alter table innodb_normal engine=innodb page_compressed=DEFAULT; alter table innodb_normal engine=innodb page_compressed=DEFAULT;
show create table innodb_normal; show create table innodb_normal;
......
...@@ -60,6 +60,7 @@ variable_value > 0 ...@@ -60,6 +60,7 @@ variable_value > 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0 variable_value >= 0
1 1
# restart
update innodb_normal set c1 = c1 +1; update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1;
...@@ -115,6 +116,7 @@ drop table innodb_redundant; ...@@ -115,6 +116,7 @@ drop table innodb_redundant;
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ENCRYPTION_KEY_ID=2 ENCRYPTED=YES; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ENCRYPTION_KEY_ID=2 ENCRYPTED=YES;
INSERT INTO t1 VALUES (1),(2); INSERT INTO t1 VALUES (1),(2);
# Restarting server... # Restarting server...
# restart
SELECT * FROM t1; SELECT * FROM t1;
pk pk
1 1
......
# Wait max 10 min for key encryption threads to encrypt all spaces # Wait max 10 min for key encryption threads to encrypt all spaces
# Success! # Success!
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
# All done # All done
...@@ -5,7 +5,7 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\."); ...@@ -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("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("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]*\\]"); 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; 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 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; 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)); ...@@ -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)); insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
COMMIT; COMMIT;
# Kill the server # Kill the server
# restart # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
# 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,t4; drop table t1, t2,t3,t4;
...@@ -6,6 +6,7 @@ flush tables; ...@@ -6,6 +6,7 @@ flush tables;
create table t1(a int not null primary key, b char(200)) engine=innodb; create table t1(a int not null primary key, b char(200)) engine=innodb;
# Restart server with encryption # 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 # Wait until encryption threads have encrypted all tablespaces
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
NAME NAME
...@@ -31,6 +32,7 @@ NAME ...@@ -31,6 +32,7 @@ NAME
# Success! # Success!
# Restart server with no encryption setup, there should be no crashes # 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; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
NAME NAME
innodb_system innodb_system
......
--- innodb-spatial-index.result --- innodb-spatial-index.result
+++ 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, CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
ENCRYPTED=YES; ENCRYPTED=YES;
-Got one of the listed errors -Got one of the listed errors
+INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)')); +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)')); +INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
+DROP TABLE t1; +DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
......
--- innodb-spatial-index.result --- innodb-spatial-index.result
+++ 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, CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
ENCRYPTED=YES; ENCRYPTED=YES;
-Got one of the listed errors -Got one of the listed errors
+INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)')); +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)')); +INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
+DROP TABLE t1; +DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, 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 ...@@ -38,6 +38,7 @@ NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd
# ib_logfile0 expecting NOT FOUND # ib_logfile0 expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0 NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
# Restart without redo log encryption # Restart without redo log encryption
# restart: --skip-innodb-encrypt-log --innodb-log-files-in-group=1
SELECT COUNT(*) FROM t0; SELECT COUNT(*) FROM t0;
COUNT(*) COUNT(*)
1024 1024
...@@ -55,6 +56,7 @@ FOUND 1 /(public|gossip).*/ in ib_logfile0 ...@@ -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 NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
# t0.ibd expecting NOT FOUND # t0.ibd expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd
# restart
SELECT COUNT(*) FROM t0; SELECT COUNT(*) FROM t0;
COUNT(*) COUNT(*)
1025 1025
......
# redo log from before MariaDB 10.2.2/MySQL 5.7.9 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -12,12 +14,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -25,24 +29,28 @@ COUNT(*) ...@@ -25,24 +29,28 @@ COUNT(*)
1 1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err
# distant future redo log format, with valid header checksum # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -50,6 +58,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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: 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 FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# same, but with current-version header # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -57,6 +66,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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: 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 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) # --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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -64,11 +74,13 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# --innodb-force-recovery=6 (skip the entire redo log) # --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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -76,6 +88,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
# Test a corrupted MLOG_FILE_NAME record. # Test a corrupted MLOG_FILE_NAME record.
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -88,12 +101,14 @@ FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 ...@@ -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 FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record. # Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -120,6 +138,7 @@ COUNT(*) ...@@ -120,6 +138,7 @@ COUNT(*)
1 1
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
# Empty 10.2 redo log # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -127,11 +146,13 @@ COUNT(*) ...@@ -127,11 +146,13 @@ COUNT(*)
1 1
FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log # 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' SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
1 1
1 1
FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
# restart
ib_buffer_pool ib_buffer_pool
ib_logfile0 ib_logfile0
ib_logfile1 ib_logfile1
......
...@@ -146,6 +146,7 @@ variable_value > 0 ...@@ -146,6 +146,7 @@ variable_value > 0
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
variable_value > 0 variable_value > 0
1 1
# restart
SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = off; SET GLOBAL innodb_encrypt_tables = off;
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
......
...@@ -53,6 +53,7 @@ NAME ...@@ -53,6 +53,7 @@ NAME
innodb_system innodb_system
# Success! # Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0 # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
SHOW VARIABLES LIKE 'innodb_encrypt%'; SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name Value Variable_name Value
innodb_encrypt_log ON innodb_encrypt_log ON
......
...@@ -25,6 +25,7 @@ NOT FOUND /foobar/ in t1.ibd ...@@ -25,6 +25,7 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND # t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd NOT FOUND /barfoo/ in t3.ibd
# restart
db.opt db.opt
t1.frm t1.frm
t1.ibd t1.ibd
...@@ -72,6 +73,7 @@ NOT FOUND /foobar/ in t1.ibd ...@@ -72,6 +73,7 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND # t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd NOT FOUND /barfoo/ in t3.ibd
# restart
ALTER TABLE t1 ENGINE InnoDB; ALTER TABLE t1 ENGINE InnoDB;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
...@@ -97,6 +99,7 @@ t3 CREATE TABLE `t3` ( ...@@ -97,6 +99,7 @@ t3 CREATE TABLE `t3` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes
# Restarting server # Restarting server
# restart
# Done restarting server # Done restarting server
# Verify that tables are still usable # Verify that tables are still usable
SELECT COUNT(1) FROM t1; SELECT COUNT(1) FROM t1;
...@@ -115,8 +118,10 @@ NOT FOUND /foobar/ in t1.ibd ...@@ -115,8 +118,10 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND # t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd NOT FOUND /barfoo/ in t3.ibd
# restart
# Wait max 10 min for key encryption threads to encrypt all spaces # Wait max 10 min for key encryption threads to encrypt all spaces
# Success! # Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0 # 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 PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
...@@ -15,6 +15,7 @@ insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate'); ...@@ -15,6 +15,7 @@ insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed2 select * from innodb_compressed1; insert into innodb_compressed2 select * from innodb_compressed1;
insert into innodb_compressed3 select * from innodb_compressed1; insert into innodb_compressed3 select * from innodb_compressed1;
insert into innodb_compressed4 select * from innodb_compressed1; insert into innodb_compressed4 select * from innodb_compressed1;
# restart
# t1 yes on expecting NOT FOUND # t1 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed1.ibd NOT FOUND /private/ in innodb_compressed1.ibd
# t2 yes on expecting NOT FOUND # t2 yes on expecting NOT FOUND
...@@ -95,6 +96,7 @@ NOT FOUND /private/ in innodb_compressed2.ibd ...@@ -95,6 +96,7 @@ NOT FOUND /private/ in innodb_compressed2.ibd
NOT FOUND /private/ in innodb_compressed3.ibd NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND # t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd NOT FOUND /private/ in innodb_compressed4.ibd
# restart
select * from innodb_compressed1 where d = 40; select * from innodb_compressed1 where d = 40;
c1 d a b c1 d a b
3 40 private evenmoreprivate 3 40 private evenmoreprivate
......
...@@ -101,6 +101,7 @@ variable_value >= 0 ...@@ -101,6 +101,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
variable_value >= 0 variable_value >= 0
1 1
# restart
update innodb_normal set c1 = c1 + 1; update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1; update innodb_dynamic set c1 = c1 + 1;
......
# restart
create table t1 (a int); create table t1 (a int);
# restart
drop table t1; drop table t1;
SET GLOBAL innodb_fast_shutdown=0; SET GLOBAL innodb_fast_shutdown=0;
# restart
SHOW VARIABLES LIKE 'innodb_encrypt%'; SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name Value Variable_name Value
innodb_encrypt_log OFF innodb_encrypt_log OFF
...@@ -749,6 +750,7 @@ innodb_encrypted_3/t_98 ...@@ -749,6 +750,7 @@ innodb_encrypted_3/t_98
innodb_encrypted_3/t_99 innodb_encrypted_3/t_99
# Success! # Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0 # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
# Restart Success! # Restart Success!
use innodb_encrypted_1; use innodb_encrypted_1;
use innodb_encrypted_2; use innodb_encrypted_2;
......
...@@ -40,6 +40,7 @@ NOT FOUND /author/ in t5.ibd ...@@ -40,6 +40,7 @@ NOT FOUND /author/ in t5.ibd
NOT FOUND /mangled/ in t6.ibd NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND # t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd NOT FOUND /mysql/ in t7.ibd
# restart
SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 ADD COLUMN b int default 2; ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 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 ...@@ -134,5 +135,6 @@ NOT FOUND /author/ in t5.ibd
NOT FOUND /mangled/ in t6.ibd NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND # t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd NOT FOUND /mysql/ in t7.ibd
# restart
DROP PROCEDURE innodb_insert_proc; DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7; DROP TABLE t1, t2, t3, t4, t5, t6, t7;
# 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; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings; show warnings;
Level Code Message Level Code Message
...@@ -65,7 +65,7 @@ variable_value >= 0 ...@@ -65,7 +65,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0 variable_value >= 0
1 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; select * from innodb_normal;
c1 b c1 b
1 test1 1 test1
......
...@@ -11,7 +11,6 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile ...@@ -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("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]*\\]"); 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 -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
...@@ -61,13 +60,11 @@ let $cleanup= drop table t1,t2,t3,t4; ...@@ -61,13 +60,11 @@ let $cleanup= drop table t1,t2,t3,t4;
--let CLEANUP_IF_CHECKPOINT= $cleanup; --let CLEANUP_IF_CHECKPOINT= $cleanup;
--source ../../suite/innodb/include/no_checkpoint_end.inc --source ../../suite/innodb/include/no_checkpoint_end.inc
--echo # restart
-- source include/start_mysqld.inc -- source include/start_mysqld.inc
# #
# In above server does start but InnoDB refuses to start # In above server does start but InnoDB refuses to start
# thus we need to restart server with correct key file # 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 -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# embedded does not support restart # embedded does not support restart
-- source include/not_embedded.inc -- 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 -- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
...@@ -43,7 +42,6 @@ select * from innodb_redundant; ...@@ -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_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; 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 -- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
......
...@@ -18,6 +18,7 @@ connection='s1'; ...@@ -18,6 +18,7 @@ connection='s1';
select * from t1; select * from t1;
foo bar foo bar
connection slave; connection slave;
# restart
connection master; connection master;
drop table t1; drop table t1;
drop server s1; drop server s1;
......
...@@ -5,6 +5,7 @@ CREATE TABLE t2 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MAST ...@@ -5,6 +5,7 @@ CREATE TABLE t2 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MAST
ALTER TABLE t2 DISABLE KEYS; ALTER TABLE t2 DISABLE KEYS;
ERROR HY000: Storage engine FEDERATED of the table `test`.`t2` doesn't have this option ERROR HY000: Storage engine FEDERATED of the table `test`.`t2` doesn't have this option
CREATE TABLE t3 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1"; CREATE TABLE t3 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1";
# restart
SET GLOBAL query_cache_size= default; SET GLOBAL query_cache_size= default;
SET GLOBAL query_cache_type= default; SET GLOBAL query_cache_type= default;
drop table t1, t2, t3; drop table t1, t2, t3;
...@@ -5,6 +5,7 @@ create table t2 (i int) engine=federated ...@@ -5,6 +5,7 @@ create table t2 (i int) engine=federated
CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1"; CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1";
select * from t2; select * from t2;
i i
# restart
drop table t2; drop table t2;
drop table t1; drop table t1;
set global query_cache_type= default; set global query_cache_type= default;
......
...@@ -18,6 +18,7 @@ a b ...@@ -18,6 +18,7 @@ a b
9 9 9 9
BEGIN; BEGIN;
INSERT INTO t (a) VALUES (10); INSERT INTO t (a) VALUES (10);
# restart
SELECT * FROM t; SELECT * FROM t;
a b a b
9 9 9 9
......
...@@ -14,6 +14,7 @@ INSERT INTO u1 SET a=1; ...@@ -14,6 +14,7 @@ INSERT INTO u1 SET a=1;
INSERT INTO u2 SET b=1; INSERT INTO u2 SET b=1;
INSERT INTO t1(fld1) VALUES(1); INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t2(fld1, fld2) VALUES(1, 2); INSERT INTO t2(fld1, fld2) VALUES(1, 2);
# restart
UPDATE t1 SET fld1= 2; UPDATE t1 SET fld1= 2;
DELETE FROM u1; DELETE FROM u1;
SELECT * FROM u2; SELECT * FROM u2;
...@@ -37,6 +38,7 @@ FOREIGN KEY(fld1) REFERENCES t1(fld1) ...@@ -37,6 +38,7 @@ FOREIGN KEY(fld1) REFERENCES t1(fld1)
ON UPDATE CASCADE) engine=innodb; ON UPDATE CASCADE) engine=innodb;
INSERT INTO t1 VALUES(1), (2); INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1, DEFAULT), (2, default); INSERT INTO t2 VALUES(1, DEFAULT), (2, default);
# restart
CREATE TEMPORARY TABLE t2 (fld1 INT NOT NULL)ENGINE=INNODB; CREATE TEMPORARY TABLE t2 (fld1 INT NOT NULL)ENGINE=INNODB;
UPDATE t1 SET fld1= 3 WHERE fld1= 2; UPDATE t1 SET fld1= 3 WHERE fld1= 2;
connect con1,localhost,root,,test; connect con1,localhost,root,,test;
......
...@@ -26,6 +26,7 @@ INSERT INTO tdd VALUES(1); ...@@ -26,6 +26,7 @@ INSERT INTO tdd VALUES(1);
INSERT INTO tp VALUES(1); INSERT INTO tp VALUES(1);
INSERT INTO ti VALUES(1); INSERT INTO ti VALUES(1);
# Kill the server # Kill the server
# restart
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.tr check status OK test.tr check status OK
...@@ -35,6 +36,7 @@ test.tz check status OK ...@@ -35,6 +36,7 @@ test.tz check status OK
test.tdd check status OK test.tdd check status OK
test.tp check status OK test.tp check status OK
test.ti check status OK test.ti check status OK
# restart: --innodb-read-only
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.tr check status OK test.tr check status OK
...@@ -44,4 +46,5 @@ test.tz check status OK ...@@ -44,4 +46,5 @@ test.tz check status OK
test.tdd check status OK test.tdd check status OK
test.tp check status OK test.tp check status OK
test.ti check status OK test.ti check status OK
# restart
DROP TABLE tr,tc,td,tz,tdd,tp,ti; DROP TABLE tr,tc,td,tz,tdd,tp,ti;
...@@ -48,6 +48,7 @@ ADD INDEX(a,b,c), ADD INDEX(a,c,b), ADD INDEX(a,c,d), ADD INDEX(a,d,c), ...@@ -48,6 +48,7 @@ ADD INDEX(a,b,c), ADD INDEX(a,c,b), ADD INDEX(a,c,d), ADD INDEX(a,d,c),
ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c), ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c),
ALGORITHM=COPY; ALGORITHM=COPY;
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# restart: --innodb-force-recovery=3
#sql-temporary.frm #sql-temporary.frm
#sql-temporary.ibd #sql-temporary.ibd
FTS_INDEX_1.ibd FTS_INDEX_1.ibd
...@@ -116,6 +117,7 @@ t1 CREATE TABLE `t1` ( ...@@ -116,6 +117,7 @@ t1 CREATE TABLE `t1` (
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
# restart: --innodb-read-only
#sql-temporary.frm #sql-temporary.frm
#sql-temporary.ibd #sql-temporary.ibd
FTS_INDEX_1.ibd FTS_INDEX_1.ibd
...@@ -184,6 +186,7 @@ t1 CREATE TABLE `t1` ( ...@@ -184,6 +186,7 @@ t1 CREATE TABLE `t1` (
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
# restart
#sql-temporary.frm #sql-temporary.frm
FTS_INDEX_1.ibd FTS_INDEX_1.ibd
FTS_INDEX_2.ibd FTS_INDEX_2.ibd
......
...@@ -17,6 +17,7 @@ Table Op Msg_type Msg_text ...@@ -17,6 +17,7 @@ Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted test.t1 check Warning InnoDB: Index c2 is marked as corrupted
test.t1 check Warning InnoDB: Index c3 is marked as corrupted test.t1 check Warning InnoDB: Index c3 is marked as corrupted
test.t1 check error Corrupt test.t1 check error Corrupt
# restart
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted test.t1 check Warning InnoDB: Index c2 is marked as corrupted
...@@ -47,6 +48,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit'; ...@@ -47,6 +48,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1); ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect. # Restart mysqld after the crash and reconnect.
# restart
SELECT * FROM information_schema.innodb_sys_tables SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID; WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
...@@ -86,6 +88,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit'; ...@@ -86,6 +88,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1); ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# Startup the server after the crash # Startup the server after the crash
# restart
SELECT * FROM information_schema.innodb_sys_tables SELECT * FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test/#sql-%'; WHERE name LIKE 'test/#sql-%';
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
...@@ -124,6 +127,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit'; ...@@ -124,6 +127,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE; ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect. # Restart mysqld after the crash and reconnect.
# restart
SELECT * FROM information_schema.innodb_sys_tables SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID; WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
......
...@@ -15,6 +15,7 @@ ALTER TABLE child ROW_FORMAT=DYNAMIC, ALGORITHM=COPY; ...@@ -15,6 +15,7 @@ ALTER TABLE child ROW_FORMAT=DYNAMIC, ALGORITHM=COPY;
connection default; connection default;
SET DEBUG_SYNC='now WAIT_FOR s1'; SET DEBUG_SYNC='now WAIT_FOR s1';
SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1'; SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
# restart
disconnect con1; disconnect con1;
show tables; show tables;
Tables_in_bug Tables_in_bug
......
...@@ -14,24 +14,28 @@ disconnect con1; ...@@ -14,24 +14,28 @@ disconnect con1;
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd, # Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
# and recompute innodb_checksum_algorithm=crc32 # and recompute innodb_checksum_algorithm=crc32
# Restart mysqld # Restart mysqld
# restart
# This will succeed after a clean shutdown, due to # This will succeed after a clean shutdown, due to
# fil_open_single_table_tablespace(check_space_id=FALSE). # fil_open_single_table_tablespace(check_space_id=FALSE).
SELECT COUNT(*) FROM bug16720368; SELECT COUNT(*) FROM bug16720368;
COUNT(*) COUNT(*)
8 8
INSERT INTO bug16720368_1 VALUES(1); INSERT INTO bug16720368_1 VALUES(1);
# restart
# The table is unaccessible, because after a crash we will # The table is unaccessible, because after a crash we will
# validate the tablespace header. # validate the tablespace header.
SELECT COUNT(*) FROM bug16720368; SELECT COUNT(*) FROM bug16720368;
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
INSERT INTO bug16720368 VALUES(0,1); INSERT INTO bug16720368 VALUES(0,1);
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
# restart: --innodb-force-recovery=3
# The table is readable thanks to innodb-force-recovery. # The table is readable thanks to innodb-force-recovery.
SELECT COUNT(*) FROM bug16720368; SELECT COUNT(*) FROM bug16720368;
COUNT(*) COUNT(*)
8 8
INSERT INTO bug16720368 VALUES(0,1); INSERT INTO bug16720368 VALUES(0,1);
# Shut down the server cleanly to hide the corruption. # Shut down the server cleanly to hide the corruption.
# restart
# The table is accessible, because after a clean shutdown we will # The table is accessible, because after a clean shutdown we will
# NOT validate the tablespace header. # NOT validate the tablespace header.
# We can modify the existing pages, but we cannot allocate or free # We can modify the existing pages, but we cannot allocate or free
...@@ -41,6 +45,7 @@ COUNT(*) ...@@ -41,6 +45,7 @@ COUNT(*)
9 9
# Shut down the server to uncorrupt the data. # Shut down the server to uncorrupt the data.
# Restart the server after uncorrupting the file. # Restart the server after uncorrupting the file.
# restart
INSERT INTO bug16720368 VALUES(9,1); INSERT INTO bug16720368 VALUES(9,1);
SELECT COUNT(*) FROM bug16720368; SELECT COUNT(*) FROM bug16720368;
COUNT(*) COUNT(*)
...@@ -64,7 +69,9 @@ connection default; ...@@ -64,7 +69,9 @@ connection default;
# Kill the server # Kill the server
disconnect con1; disconnect con1;
# Attempt to start without an *.ibd file. # Attempt to start without an *.ibd file.
# restart
FOUND 1 /\[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test.bug16735660.ibd/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test.bug16735660.ibd/ in mysqld.1.err
# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM bug16735660; SELECT * FROM bug16735660;
a a
......
...@@ -7,6 +7,7 @@ CREATE TABLE t(a SERIAL)ENGINE=InnoDB; ...@@ -7,6 +7,7 @@ CREATE TABLE t(a SERIAL)ENGINE=InnoDB;
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB; CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1),(2),(3); INSERT INTO t1 VALUES(1),(2),(3);
# restart
SELECT * FROM t; SELECT * FROM t;
ERROR 42S02: Table 'test.t' doesn't exist in engine ERROR 42S02: Table 'test.t' doesn't exist in engine
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
......
...@@ -11,6 +11,7 @@ t1 CREATE TABLE `t1` ( ...@@ -11,6 +11,7 @@ t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
# restart
# SETTING auto_increment_increment IN CONNECTION1 # SETTING auto_increment_increment IN CONNECTION1
SET AUTO_INCREMENT_INCREMENT = 2; SET AUTO_INCREMENT_INCREMENT = 2;
SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1'; SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
......
...@@ -244,6 +244,7 @@ Expect 100000000000 ...@@ -244,6 +244,7 @@ Expect 100000000000
100000000000 100000000000
CREATE TABLE t13(a INT AUTO_INCREMENT PRIMARY KEY) ENGINE = InnoDB, CREATE TABLE t13(a INT AUTO_INCREMENT PRIMARY KEY) ENGINE = InnoDB,
AUTO_INCREMENT = 1234; AUTO_INCREMENT = 1234;
# restart
SHOW CREATE TABLE t13; SHOW CREATE TABLE t13;
Table Create Table Table Create Table
t13 CREATE TABLE `t13` ( t13 CREATE TABLE `t13` (
...@@ -394,6 +395,7 @@ INSERT INTO t9 VALUES(0); ...@@ -394,6 +395,7 @@ INSERT INTO t9 VALUES(0);
SELECT MAX(a) AS `Expect 100000000109` FROM t9; SELECT MAX(a) AS `Expect 100000000109` FROM t9;
Expect 100000000109 Expect 100000000109
100000000109 100000000109
# restart
INSERT INTO t1 VALUES(0), (0); INSERT INTO t1 VALUES(0), (0);
SELECT a AS `Expect 110, 111` FROM t1 ORDER BY a DESC LIMIT 2; SELECT a AS `Expect 110, 111` FROM t1 ORDER BY a DESC LIMIT 2;
Expect 110, 111 Expect 110, 111
...@@ -432,6 +434,7 @@ DELETE FROM t7 WHERE a = 100000200; ...@@ -432,6 +434,7 @@ DELETE FROM t7 WHERE a = 100000200;
set global innodb_flush_log_at_trx_commit=1; set global innodb_flush_log_at_trx_commit=1;
INSERT INTO t9 VALUES(100000000200); INSERT INTO t9 VALUES(100000000200);
DELETE FROM t9 WHERE a = 100000000200; DELETE FROM t9 WHERE a = 100000000200;
# restart
INSERT INTO t1 VALUES(0); INSERT INTO t1 VALUES(0);
SELECT a AS `Expect 126` FROM t1 ORDER BY a DESC LIMIT 1; SELECT a AS `Expect 126` FROM t1 ORDER BY a DESC LIMIT 1;
Expect 126 Expect 126
...@@ -497,6 +500,7 @@ SELECT * FROM t19; ...@@ -497,6 +500,7 @@ SELECT * FROM t19;
a a
1 1
2 2
# restart
INSERT INTO t1 VALUES(0), (0); INSERT INTO t1 VALUES(0), (0);
SELECT * FROM t1; SELECT * FROM t1;
a a
...@@ -637,6 +641,7 @@ BEGIN; ...@@ -637,6 +641,7 @@ BEGIN;
# Without the fix in page_create_empty() the counter value would be lost # Without the fix in page_create_empty() the counter value would be lost
# when ROLLBACK deletes the last row. # when ROLLBACK deletes the last row.
ROLLBACK; ROLLBACK;
# restart
INSERT INTO t3 VALUES(0); INSERT INTO t3 VALUES(0);
SELECT MAX(a) AS `Expect 120` FROM t3; SELECT MAX(a) AS `Expect 120` FROM t3;
Expect 120 Expect 120
...@@ -738,6 +743,7 @@ test.t_inplace optimize status OK ...@@ -738,6 +743,7 @@ test.t_inplace optimize status OK
DELETE FROM t_inplace WHERE a >= 123; DELETE FROM t_inplace WHERE a >= 123;
CREATE TABLE it_inplace(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB; CREATE TABLE it_inplace(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB;
CREATE UNIQUE INDEX idx_aa ON it_inplace(a); CREATE UNIQUE INDEX idx_aa ON it_inplace(a);
# restart
INSERT INTO t_inplace VALUES(0), (0); INSERT INTO t_inplace VALUES(0), (0);
INSERT INTO it_inplace VALUES(0), (0); INSERT INTO it_inplace VALUES(0), (0);
SELECT MAX(a) AS `Expect 126` FROM t_inplace; SELECT MAX(a) AS `Expect 126` FROM t_inplace;
...@@ -825,6 +831,7 @@ test.t_copy optimize status OK ...@@ -825,6 +831,7 @@ test.t_copy optimize status OK
DELETE FROM t_copy WHERE a >= 123; DELETE FROM t_copy WHERE a >= 123;
CREATE TABLE it_copy(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB; CREATE TABLE it_copy(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB;
CREATE UNIQUE INDEX idx_aa ON it_copy(a); CREATE UNIQUE INDEX idx_aa ON it_copy(a);
# restart
INSERT INTO t_copy VALUES(0), (0); INSERT INTO t_copy VALUES(0), (0);
INSERT INTO it_copy VALUES(0), (0); INSERT INTO it_copy VALUES(0), (0);
SELECT MAX(a) AS `Expect 126` FROM t_copy; SELECT MAX(a) AS `Expect 126` FROM t_copy;
...@@ -910,6 +917,7 @@ UPDATE t33 SET a = 10 WHERE a = 1; ...@@ -910,6 +917,7 @@ UPDATE t33 SET a = 10 WHERE a = 1;
INSERT INTO t33 VALUES(2, NULL); INSERT INTO t33 VALUES(2, NULL);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY' ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
COMMIT; COMMIT;
# restart
# This will not insert 0 # This will not insert 0
INSERT INTO t31(a) VALUES(6), (0); INSERT INTO t31(a) VALUES(6), (0);
SELECT * FROM t31; SELECT * FROM t31;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# PAGE OF SYSTEM TABLESPACE # PAGE OF SYSTEM TABLESPACE
# #
SET GLOBAL innodb_fast_shutdown = 0; SET GLOBAL innodb_fast_shutdown = 0;
# restart
show variables like 'innodb_doublewrite'; show variables like 'innodb_doublewrite';
Variable_name Value Variable_name Value
innodb_doublewrite ON innodb_doublewrite ON
...@@ -43,6 +44,7 @@ set global innodb_buf_flush_list_now = 1; ...@@ -43,6 +44,7 @@ set global innodb_buf_flush_list_now = 1;
# full of zeroes. # full of zeroes.
# #
# MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer. # MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -73,6 +75,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id; ...@@ -73,6 +75,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1; set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Corrupt the first page (page_no=0) of the user tablespace. # Corrupt the first page (page_no=0) of the user tablespace.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -103,6 +106,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id; ...@@ -103,6 +106,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1; set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Make the 2nd page (page_no=1) of the tablespace all zeroes. # Make the 2nd page (page_no=1) of the tablespace all zeroes.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -133,6 +137,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id; ...@@ -133,6 +137,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1; set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Corrupt the 2nd page (page_no=1) of the user tablespace. # Corrupt the 2nd page (page_no=1) of the user tablespace.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -159,6 +164,7 @@ set global innodb_buf_flush_list_now = 1; ...@@ -159,6 +164,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Make the first page (page_no=0) of the system tablespace # Make the first page (page_no=0) of the system tablespace
# all zeroes. # all zeroes.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -184,6 +190,7 @@ set global innodb_fil_make_page_dirty_debug = 0; ...@@ -184,6 +190,7 @@ set global innodb_fil_make_page_dirty_debug = 0;
set global innodb_buf_flush_list_now = 1; set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Corrupt the first page (page_no=0) of the system tablespace. # Corrupt the first page (page_no=0) of the system tablespace.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -210,6 +217,7 @@ set global innodb_buf_flush_list_now = 1; ...@@ -210,6 +217,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Make the 2nd page (page_no=1) of the system tablespace # Make the 2nd page (page_no=1) of the system tablespace
# all zeroes. # all zeroes.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -236,6 +244,7 @@ set global innodb_buf_flush_list_now = 1; ...@@ -236,6 +244,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server # Kill the server
# Make the 2nd page (page_no=1) of the system tablespace # Make the 2nd page (page_no=1) of the system tablespace
# all zeroes. # all zeroes.
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -252,8 +261,10 @@ drop table t1; ...@@ -252,8 +261,10 @@ drop table t1;
# MDEV-12600 crash during install_db with innodb_page_size=32K # MDEV-12600 crash during install_db with innodb_page_size=32K
# and ibdata1=3M # and ibdata1=3M
# #
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Cannot create doublewrite buffer/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Cannot create doublewrite buffer/ in mysqld.1.err
# restart
...@@ -11,6 +11,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY' ...@@ -11,6 +11,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT * from target; SELECT * from target;
ERROR 42S02: Table 'test.target' doesn't exist ERROR 42S02: Table 'test.target' doesn't exist
DROP TABLE t; DROP TABLE t;
# restart
CREATE TABLE t (a INT) ENGINE=InnoDB; CREATE TABLE t (a INT) ENGINE=InnoDB;
DROP TABLE t; DROP TABLE t;
DROP TABLE target; DROP TABLE target;
......
...@@ -137,6 +137,7 @@ SELECT unique_constraint_name FROM information_schema.referential_constraints ...@@ -137,6 +137,7 @@ SELECT unique_constraint_name FROM information_schema.referential_constraints
WHERE table_name = 't2'; WHERE table_name = 't2';
unique_constraint_name unique_constraint_name
PRIMARY PRIMARY
# restart
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SELECT unique_constraint_name FROM information_schema.referential_constraints SELECT unique_constraint_name FROM information_schema.referential_constraints
......
...@@ -18,8 +18,10 @@ INSERT INTO t1 SELECT 0,b,c FROM t1; ...@@ -18,8 +18,10 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
# restart: --innodb-force-recovery=6
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index 'b' contains #### entries, should be 4096. test.t1 check Warning InnoDB: Index 'b' contains #### entries, should be 4096.
test.t1 check error Corrupt test.t1 check error Corrupt
# restart
DROP TABLE t1; DROP TABLE t1;
...@@ -119,6 +119,7 @@ BEGIN; ...@@ -119,6 +119,7 @@ BEGIN;
INSERT INTO t1 SELECT * from t2; INSERT INTO t1 SELECT * from t2;
BEGIN; BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e; UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
# restart
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f, UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,
v=@f,w=@f,x=@b,y=@f,z=@f, v=@f,w=@f,x=@b,y=@f,z=@f,
......
...@@ -653,6 +653,7 @@ insert into t2 values( ...@@ -653,6 +653,7 @@ insert into t2 values(
@a,@a,@a,@a,@a,@a,@a,@a,@a,@a, @a,@a,@a,@a,@a,@a,@a,@a,@a,@a,
@a,@a,@a,@a,@a,@a,@a); @a,@a,@a,@a,@a,@a,@a);
update t2 set col190=@b; update t2 set col190=@b;
# restart
set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650); set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650);
set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000); set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000);
show create table t2; show create table t2;
......
...@@ -271,6 +271,7 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c, ...@@ -271,6 +271,7 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c,
ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c, ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c,
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
# restart
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e, UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
v=@e,w=@e,x=@e,y=@e,z=@e, v=@e,w=@e,x=@e,y=@e,z=@e,
......
...@@ -719,6 +719,7 @@ insert into t2 values( ...@@ -719,6 +719,7 @@ insert into t2 values(
@a,@a,@a,@a,@a,@a,@a,@a,@a,@a, @a,@a,@a,@a,@a,@a,@a,@a,@a,@a,
@a,@a,@a,@a,@a,@a,@a); @a,@a,@a,@a,@a,@a,@a);
update t2 set col190=@b; update t2 set col190=@b;
# restart
set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650); set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650);
set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000); set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000);
update t2 set col189 = @b; update t2 set col189 = @b;
......
...@@ -8,6 +8,7 @@ CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb; ...@@ -8,6 +8,7 @@ CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit'; SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1); ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# restart
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -816,6 +816,7 @@ ADD FOREIGN KEY(dd) REFERENCES t1(d), ...@@ -816,6 +816,7 @@ ADD FOREIGN KEY(dd) REFERENCES t1(d),
ALGORITHM=INPLACE; ALGORITHM=INPLACE;
ALTER TABLE t1 CHANGE b B INT, ALGORITHM=INPLACE; ALTER TABLE t1 CHANGE b B INT, ALGORITHM=INPLACE;
ALTER TABLE t2 CHANGE aa AA INT, ALGORITHM=INPLACE; ALTER TABLE t2 CHANGE aa AA INT, ALGORITHM=INPLACE;
# restart
ALTER TABLE t1 CHANGE d D INT, ALGORITHM=INPLACE; ALTER TABLE t1 CHANGE d D INT, ALGORITHM=INPLACE;
ALTER TABLE t2 CHANGE bb BB INT, ALGORITHM=INPLACE; ALTER TABLE t2 CHANGE bb BB INT, ALGORITHM=INPLACE;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
......
...@@ -9,6 +9,7 @@ SELECT * FROM t1; ...@@ -9,6 +9,7 @@ SELECT * FROM t1;
d1 d1
1 1
2 2
# restart
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -1110,6 +1110,7 @@ Warnings: ...@@ -1110,6 +1110,7 @@ Warnings:
Note 1051 Unknown table 'test.t1' Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
# restart
INSERT INTO t1(C2) VALUES ('innodb'); INSERT INTO t1(C2) VALUES ('innodb');
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
...@@ -1121,6 +1122,7 @@ t1 CREATE TABLE `t1` ( ...@@ -1121,6 +1122,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB; CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb'); INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
# restart
INSERT INTO t1(C2) VALUES ('innodb'); INSERT INTO t1(C2) VALUES ('innodb');
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
...@@ -1258,6 +1260,7 @@ Note 1051 Unknown table 'test.t1' ...@@ -1258,6 +1260,7 @@ Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (18446744073709551615); INSERT INTO t1 VALUES (18446744073709551615);
# restart
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -43,6 +43,7 @@ a ...@@ -43,6 +43,7 @@ a
3 3
BEGIN; BEGIN;
INSERT INTO t2 VALUES (42); INSERT INTO t2 VALUES (42);
# restart
disconnect con1; disconnect con1;
disconnect con2; disconnect con2;
connection default; connection default;
...@@ -103,6 +104,7 @@ DELETE FROM t1; ...@@ -103,6 +104,7 @@ DELETE FROM t1;
ROLLBACK; ROLLBACK;
disconnect con3; disconnect con3;
connection con2; connection con2;
# restart
disconnect con2; disconnect con2;
connection default; connection default;
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
...@@ -134,6 +136,7 @@ SELECT info FROM information_schema.processlist ...@@ -134,6 +136,7 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern'; WHERE state = 'debug sync point: after_row_upd_extern';
info info
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2 UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2
# restart
disconnect con2; disconnect con2;
connection default; connection default;
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
......
...@@ -39,6 +39,7 @@ ERROR HY000: Lost connection to MySQL server during query ...@@ -39,6 +39,7 @@ ERROR HY000: Lost connection to MySQL server during query
disconnect con1; disconnect con1;
connection default; connection default;
FOUND 1 /Wrote log record for ibuf update in place operation/ in my_restart.err FOUND 1 /Wrote log record for ibuf update in place operation/ in my_restart.err
# restart
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
......
...@@ -6,6 +6,7 @@ create table t1 (f1 int primary key) engine=innodb; ...@@ -6,6 +6,7 @@ create table t1 (f1 int primary key) engine=innodb;
insert into t1 values (5); insert into t1 values (5);
insert into t1 values (2882); insert into t1 values (2882);
insert into t1 values (10); insert into t1 values (10);
# restart
update t1 set f1 = 28 where f1 = 2882; update t1 set f1 = 28 where f1 = 2882;
select * from fk_120; select * from fk_120;
f1 f1
...@@ -27,6 +28,7 @@ drop table t1; ...@@ -27,6 +28,7 @@ drop table t1;
# Check if restrict is working fine. # Check if restrict is working fine.
# #
create table t1 (f1 int primary key) engine=innodb; create table t1 (f1 int primary key) engine=innodb;
# restart
delete from t1 where f1 = 29; delete from t1 where f1 = 29;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`fk_29`, CONSTRAINT `pc29` FOREIGN KEY (`f1`) REFERENCES `t1` (`f1`)) ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`fk_29`, CONSTRAINT `pc29` FOREIGN KEY (`f1`) REFERENCES `t1` (`f1`))
select * from fk_29; select * from fk_29;
......
...@@ -26,6 +26,7 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`), ...@@ -26,6 +26,7 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB COMMENT="This is a comment about tables"; ) ENGINE=InnoDB COMMENT="This is a comment about tables";
# restart: --innodb-read-only
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only'; ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
ERROR HY000: Table 'crew_role_assigned' is read only ERROR HY000: Table 'crew_role_assigned' is read only
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
...@@ -43,6 +44,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( ...@@ -43,6 +44,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
SET GLOBAL innodb_buffer_pool_load_now = ON; SET GLOBAL innodb_buffer_pool_load_now = ON;
SET GLOBAL innodb_buffer_pool_dump_now = ON; SET GLOBAL innodb_buffer_pool_dump_now = ON;
SET GLOBAL innodb_buffer_pool_load_abort = ON; SET GLOBAL innodb_buffer_pool_load_abort = ON;
# restart
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables"; ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table Table Create Table
...@@ -56,6 +58,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( ...@@ -56,6 +58,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
# restart: --innodb-read-only
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table Table Create Table
crew_role_assigned CREATE TABLE `crew_role_assigned` ( crew_role_assigned CREATE TABLE `crew_role_assigned` (
...@@ -68,6 +71,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( ...@@ -68,6 +71,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
# restart
DROP TABLE `repro`.`crew_role_assigned`; DROP TABLE `repro`.`crew_role_assigned`;
DROP TABLE `repro`.`pilot`; DROP TABLE `repro`.`pilot`;
DROP TABLE `repro`.`crew`; DROP TABLE `repro`.`crew`;
......
...@@ -1887,11 +1887,13 @@ CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB; ...@@ -1887,11 +1887,13 @@ CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB; CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB;
# Kill the server # Kill the server
# Wrong space_id in a dirty file and a missing file # Wrong space_id in a dirty file and a missing file
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# Restore t1 and t2 # Restore t1 and t2
# restart
SELECT * FROM t1; SELECT * FROM t1;
f1 f1
SELECT * FROM t2; SELECT * FROM t2;
......
...@@ -53,6 +53,7 @@ i2 ...@@ -53,6 +53,7 @@ i2
DROP TABLE t1, t2; DROP TABLE t1, t2;
disconnect con1; disconnect con1;
# "restart: --loose-innodb-lock-schedule-algorithm=FCFS" # "restart: --loose-innodb-lock-schedule-algorithm=FCFS"
# restart: --loose_innodb_lock_schedule_algorithm=FCFS
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB; CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2); INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (i2 int) ENGINE=MyISAM; CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
......
...@@ -199,6 +199,7 @@ text197 TEXT ...@@ -199,6 +199,7 @@ text197 TEXT
) ENGINE = InnoDB; ) ENGINE = InnoDB;
INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef'); INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef');
DELETE FROM t1 WHERE text1 = 'abcdef'; DELETE FROM t1 WHERE text1 = 'abcdef';
# restart
SELECT * from t1; SELECT * from t1;
text1 text2 text3 text4 text5 text6 text7 text8 text9 text10 text11 text12 text13 text14 text15 text16 text17 text18 text19 text20 text21 text22 text23 text24 text25 text26 text27 text28 text29 text30 text31 text32 text33 text34 text35 text36 text37 text38 text39 text40 text41 text42 text43 text44 text45 text46 text47 text48 text49 text50 text51 text52 text53 text54 text55 text56 text57 text58 text59 text60 text61 text62 text63 text64 text65 text66 text67 text68 text69 text70 text71 text72 text73 text74 text75 text76 text77 text78 text79 text80 text81 text82 text83 text84 text85 text86 text87 text88 text89 text90 text91 text92 text93 text94 text95 text96 text97 text98 text99 text100 text101 text102 text103 text104 text105 text106 text107 text108 text109 text110 text111 text112 text113 text114 text115 text116 text117 text118 text119 text120 text121 text122 text123 text124 text125 text126 text127 text128 text129 text130 text131 text132 text133 text134 text135 text136 text137 text138 text139 text140 text141 text142 text143 text144 text145 text146 text147 text148 text149 text150 text151 text152 text153 text154 text155 text156 text157 text158 text159 text160 text161 text162 text163 text164 text165 text166 text167 text168 text169 text170 text171 text172 text173 text174 text175 text176 text177 text178 text179 text180 text181 text182 text183 text184 text185 text186 text187 text188 text189 text190 text191 text192 text193 text194 text195 text196 text197 text1 text2 text3 text4 text5 text6 text7 text8 text9 text10 text11 text12 text13 text14 text15 text16 text17 text18 text19 text20 text21 text22 text23 text24 text25 text26 text27 text28 text29 text30 text31 text32 text33 text34 text35 text36 text37 text38 text39 text40 text41 text42 text43 text44 text45 text46 text47 text48 text49 text50 text51 text52 text53 text54 text55 text56 text57 text58 text59 text60 text61 text62 text63 text64 text65 text66 text67 text68 text69 text70 text71 text72 text73 text74 text75 text76 text77 text78 text79 text80 text81 text82 text83 text84 text85 text86 text87 text88 text89 text90 text91 text92 text93 text94 text95 text96 text97 text98 text99 text100 text101 text102 text103 text104 text105 text106 text107 text108 text109 text110 text111 text112 text113 text114 text115 text116 text117 text118 text119 text120 text121 text122 text123 text124 text125 text126 text127 text128 text129 text130 text131 text132 text133 text134 text135 text136 text137 text138 text139 text140 text141 text142 text143 text144 text145 text146 text147 text148 text149 text150 text151 text152 text153 text154 text155 text156 text157 text158 text159 text160 text161 text162 text163 text164 text165 text166 text167 text168 text169 text170 text171 text172 text173 text174 text175 text176 text177 text178 text179 text180 text181 text182 text183 text184 text185 text186 text187 text188 text189 text190 text191 text192 text193 text194 text195 text196 text197
DROP TABLE t1; DROP TABLE t1;
...@@ -213,6 +213,7 @@ count(*) ...@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -299,6 +300,7 @@ count(*) ...@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -385,6 +387,7 @@ count(*) ...@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
......
...@@ -55,6 +55,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd ...@@ -55,6 +55,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd
NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd
# innodb_page_compressed9 page compressed expected NOT FOUND # innodb_page_compressed9 page compressed expected NOT FOUND
NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd
# restart
select count(*) from innodb_page_compressed1; select count(*) from innodb_page_compressed1;
count(*) count(*)
10000 10000
......
...@@ -213,6 +213,7 @@ count(*) ...@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -299,6 +300,7 @@ count(*) ...@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -385,6 +387,7 @@ count(*) ...@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
......
...@@ -213,6 +213,7 @@ count(*) ...@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -299,6 +300,7 @@ count(*) ...@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -385,6 +387,7 @@ count(*) ...@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
......
...@@ -213,6 +213,7 @@ count(*) ...@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -299,6 +300,7 @@ count(*) ...@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
......
...@@ -56,6 +56,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd ...@@ -56,6 +56,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd
NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd
# innodb_page_compressed9 page compressed expected NOT FOUND # innodb_page_compressed9 page compressed expected NOT FOUND
NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd
# restart
select count(*) from innodb_page_compressed1; select count(*) from innodb_page_compressed1;
count(*) count(*)
10000 10000
......
...@@ -79,6 +79,7 @@ count(*) ...@@ -79,6 +79,7 @@ count(*)
select count(*) from innodb_dynamic where c1 < 1500000; select count(*) from innodb_dynamic where c1 < 1500000;
count(*) count(*)
5000 5000
# restart
update innodb_compact set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1; update innodb_dynamic set c1 = c1 + 1;
select count(*) from innodb_compact where c1 < 1500000; select count(*) from innodb_compact where c1 < 1500000;
......
...@@ -212,6 +212,7 @@ count(*) ...@@ -212,6 +212,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
...@@ -298,6 +299,7 @@ count(*) ...@@ -298,6 +299,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*) count(*)
5000 5000
# restart
update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1; update innodb_page_compressed3 set c1 = c1 + 1;
......
...@@ -36,6 +36,7 @@ t1.frm ...@@ -36,6 +36,7 @@ t1.frm
t1.ibd t1.ibd
t2.frm t2.frm
t2.ibd t2.ibd
# restart
FLUSH TABLE t1, t2 FOR EXPORT; FLUSH TABLE t1, t2 FOR EXPORT;
# List before copying files # List before copying files
db.opt db.opt
...@@ -61,6 +62,7 @@ a b c ...@@ -61,6 +62,7 @@ a b c
1462 Devotion asdfuihknaskdf 1462 Devotion asdfuihknaskdf
1461 Cavalry ..asdasdfaeraf 1461 Cavalry ..asdasdfaeraf
# Restarting server # Restarting server
# restart
# Done restarting server # Done restarting server
# List before t1 DISCARD # List before t1 DISCARD
db.opt db.opt
......
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
insert t1 values (1),(2); insert t1 values (1),(2);
create database ib_logfile2; create database ib_logfile2;
# restart
select * from t1; select * from t1;
a a
1 1
......
call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition."); call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
# restart
create table t1 (f1 integer primary key) engine innodb; create table t1 (f1 integer primary key) engine innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1); alter table t1 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed") ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
......
...@@ -9,6 +9,7 @@ INSERT INTO t1 (b) VALUES ('corrupt me'); ...@@ -9,6 +9,7 @@ INSERT INTO t1 (b) VALUES ('corrupt me');
# Corrupt the table # Corrupt the table
Munged a string. Munged a string.
Munged a string. Munged a string.
# restart
# Now t1 is corrupted but we should not crash # Now t1 is corrupted but we should not crash
SELECT * FROM t1; SELECT * FROM t1;
Got one of the listed errors Got one of the listed errors
......
...@@ -77,6 +77,7 @@ pk c1 ...@@ -77,6 +77,7 @@ pk c1
4 44 4 44
START TRANSACTION; START TRANSACTION;
INSERT INTO bug_53756 VALUES (666,666); INSERT INTO bug_53756 VALUES (666,666);
# restart
disconnect con1; disconnect con1;
disconnect con2; disconnect con2;
disconnect con3; disconnect con3;
......
...@@ -17,6 +17,7 @@ UPDATE t SET b=4*a WHERE a=32; ...@@ -17,6 +17,7 @@ UPDATE t SET b=4*a WHERE a=32;
XA END '789'; XA END '789';
XA PREPARE '789'; XA PREPARE '789';
CONNECT con3,localhost,root,,; CONNECT con3,localhost,root,,;
# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t; SELECT * FROM t;
a b a b
...@@ -29,6 +30,7 @@ a b ...@@ -29,6 +30,7 @@ a b
16 16 16 16
32 128 32 128
COMMIT; COMMIT;
# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t; SELECT * FROM t;
a b a b
......
...@@ -6,3 +6,4 @@ SELECT @@innodb_fast_shutdown; ...@@ -6,3 +6,4 @@ SELECT @@innodb_fast_shutdown;
0 0
Last record of ID_IND root page (9): Last record of ID_IND root page (9):
18080000180500c0000000000000000c5359535f464f524549474e5f434f4c53 18080000180500c0000000000000000c5359535f464f524549474e5f434f4c53
# restart
...@@ -19,6 +19,7 @@ main ...@@ -19,6 +19,7 @@ main
ref_table1 ref_table1
ref_table2 ref_table2
# restart and see if we can still access the main table # restart and see if we can still access the main table
# restart
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`); ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`);
SHOW CREATE TABLE `main`; SHOW CREATE TABLE `main`;
......
...@@ -59,6 +59,7 @@ delete from t1 where a between 100 * 4 and 100 * 4 + 30; ...@@ -59,6 +59,7 @@ delete from t1 where a between 100 * 4 and 100 * 4 + 30;
delete from t1 where a between 100 * 3 and 100 * 3 + 30; delete from t1 where a between 100 * 3 and 100 * 3 + 30;
delete from t1 where a between 100 * 2 and 100 * 2 + 30; delete from t1 where a between 100 * 2 and 100 * 2 + 30;
delete from t1 where a between 100 * 1 and 100 * 1 + 30; delete from t1 where a between 100 * 1 and 100 * 1 + 30;
# restart
# Server Restarted # Server Restarted
# Confirm persistent stats still there after restart. # Confirm persistent stats still there after restart.
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_page_split'); select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_page_split');
...@@ -143,6 +144,7 @@ count(stat_value) > 0 ...@@ -143,6 +144,7 @@ count(stat_value) > 0
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t2%' and index_name = 'SECOND' and stat_name in ('n_leaf_pages_defrag'); select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t2%' and index_name = 'SECOND' and stat_name in ('n_leaf_pages_defrag');
count(stat_value) > 0 count(stat_value) > 0
1 1
# restart
Server Restarted Server Restarted
select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_page_split'); select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_page_split');
count(stat_value) = 0 count(stat_value) = 0
......
...@@ -40,6 +40,7 @@ disconnect con1; ...@@ -40,6 +40,7 @@ disconnect con1;
optimize table t1; optimize table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
# restart
select count(*) from t1; select count(*) from t1;
count(*) count(*)
7904 7904
...@@ -68,6 +69,7 @@ SET @@global.innodb_defragment_n_pages = 3; ...@@ -68,6 +69,7 @@ SET @@global.innodb_defragment_n_pages = 3;
optimize table t1; optimize table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
# restart
select count(stat_value) < 3 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed'); select count(stat_value) < 3 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed');
count(stat_value) < 3 count(stat_value) < 3
1 1
...@@ -105,6 +107,7 @@ SET @@global.innodb_defragment_n_pages = 10; ...@@ -105,6 +107,7 @@ SET @@global.innodb_defragment_n_pages = 10;
optimize table t1; optimize table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
# restart
select count(stat_value) > 1 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed'); select count(stat_value) > 1 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed');
count(stat_value) > 1 count(stat_value) > 1
1 1
......
...@@ -12,6 +12,7 @@ INSERT INTO t1 (b) SELECT b from t1; ...@@ -12,6 +12,7 @@ INSERT INTO t1 (b) SELECT b from t1;
INSERT INTO t1 (b) SELECT b from t1; INSERT INTO t1 (b) SELECT b from t1;
INSERT INTO t1 (b) SELECT b from t1; INSERT INTO t1 (b) SELECT b from t1;
SET GLOBAL innodb_fast_shutdown = 0; SET GLOBAL innodb_fast_shutdown = 0;
# restart
optimize table t1; optimize table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
...@@ -57,6 +58,7 @@ DROP TABLE t1; ...@@ -57,6 +58,7 @@ DROP TABLE t1;
Testing table with small records Testing table with small records
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(16), c VARCHAR(32), KEY SECOND(a,b,c)) ENGINE=INNODB; CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(16), c VARCHAR(32), KEY SECOND(a,b,c)) ENGINE=INNODB;
SET GLOBAL innodb_fast_shutdown = 0; SET GLOBAL innodb_fast_shutdown = 0;
# restart
optimize table t2; optimize table t2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t2 optimize status OK test.t2 optimize status OK
......
...@@ -4,6 +4,7 @@ insert into t1 values(1, 2); ...@@ -4,6 +4,7 @@ insert into t1 values(1, 2);
insert into t2 values(1, 2); insert into t2 values(1, 2);
SET GLOBAL innodb_fast_shutdown = 0; SET GLOBAL innodb_fast_shutdown = 0;
# Restart the server with innodb_force_recovery as 4. # Restart the server with innodb_force_recovery as 4.
# restart: --innodb-force-recovery=4
select * from t1; select * from t1;
f1 f2 f1 f2
1 2 1 2
...@@ -32,6 +33,7 @@ show tables; ...@@ -32,6 +33,7 @@ show tables;
Tables_in_test Tables_in_test
t2 t2
# Restart the server with innodb_force_recovery as 5. # Restart the server with innodb_force_recovery as 5.
# restart: --innodb-force-recovery=5
select * from t2; select * from t2;
f1 f2 f1 f2
1 2 1 2
...@@ -59,6 +61,7 @@ show tables; ...@@ -59,6 +61,7 @@ show tables;
Tables_in_test Tables_in_test
t2 t2
# Restart the server with innodb_force_recovery as 6. # Restart the server with innodb_force_recovery as 6.
# restart: --innodb-force-recovery=6
select * from t2; select * from t2;
f1 f2 f1 f2
1 2 1 2
...@@ -86,6 +89,7 @@ show tables; ...@@ -86,6 +89,7 @@ show tables;
Tables_in_test Tables_in_test
t2 t2
# Restart the server with innodb_force_recovery=2 # Restart the server with innodb_force_recovery=2
# restart: --innodb-force-recovery=2
select * from t2; select * from t2;
f1 f2 f1 f2
1 2 1 2
...@@ -100,6 +104,7 @@ disconnect con1; ...@@ -100,6 +104,7 @@ disconnect con1;
connection default; connection default;
# Kill the server # Kill the server
# Restart the server with innodb_force_recovery=3 # Restart the server with innodb_force_recovery=3
# restart: --innodb-force-recovery=3
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select * from t2; select * from t2;
f1 f2 f1 f2
...@@ -112,6 +117,7 @@ SET GLOBAL innodb_lock_wait_timeout=1; ...@@ -112,6 +117,7 @@ SET GLOBAL innodb_lock_wait_timeout=1;
insert into t2 values(1,2); insert into t2 values(1,2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert into t2 values(9,10); insert into t2 values(9,10);
# restart
select * from t2; select * from t2;
f1 f2 f1 f2
1 2 1 2
......
...@@ -29,6 +29,7 @@ COUNT(*) ...@@ -29,6 +29,7 @@ COUNT(*)
START TRANSACTION; START TRANSACTION;
connection default; connection default;
SET GLOBAL innodb_fast_shutdown=3; SET GLOBAL innodb_fast_shutdown=3;
# restart
SELECT COUNT(*) FROM worklog5743; SELECT COUNT(*) FROM worklog5743;
COUNT(*) COUNT(*)
1 1
...@@ -55,6 +56,7 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) ...@@ -55,6 +56,7 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1 1 1
connection default; connection default;
SET GLOBAL innodb_fast_shutdown=3; SET GLOBAL innodb_fast_shutdown=3;
# restart
SELECT COUNT(*) FROM worklog5743; SELECT COUNT(*) FROM worklog5743;
COUNT(*) COUNT(*)
1 1
...@@ -79,6 +81,7 @@ col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500) ...@@ -79,6 +81,7 @@ col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500)
1 1 1 1
connection default; connection default;
SET GLOBAL innodb_fast_shutdown=3; SET GLOBAL innodb_fast_shutdown=3;
# restart
SELECT COUNT(*) FROM worklog5743; SELECT COUNT(*) FROM worklog5743;
COUNT(*) COUNT(*)
1 1
......
...@@ -17,6 +17,7 @@ avg_row_length 0 ...@@ -17,6 +17,7 @@ avg_row_length 0
max_data_length 0 max_data_length 0
index_length 0 index_length 0
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats; ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
# restart
SELECT seq_in_index, column_name, cardinality SELECT seq_in_index, column_name, cardinality
FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted' FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted'
ORDER BY index_name, seq_in_index; ORDER BY index_name, seq_in_index;
......
...@@ -33,3 +33,4 @@ max_data_length 0 ...@@ -33,3 +33,4 @@ max_data_length 0
index_length 0 index_length 0
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats; ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
DROP TABLE test_ps_fetch_corrupted; DROP TABLE test_ps_fetch_corrupted;
# restart
...@@ -18,6 +18,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -18,6 +18,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t2 VALUES(3,4,'accusantium doloremque laudantium'); INSERT INTO t2 VALUES(3,4,'accusantium doloremque laudantium');
# Kill the server # Kill the server
disconnect ddl; disconnect ddl;
# restart
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1; SELECT * FROM t1;
id c2 id c2
...@@ -41,6 +42,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -41,6 +42,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
UPDATE t1 SET c2=c2+1; UPDATE t1 SET c2=c2+1;
# Kill the server # Kill the server
disconnect ddl; disconnect ddl;
# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1; SELECT * FROM t1;
...@@ -68,6 +70,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -68,6 +70,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t1; DELETE FROM t1;
# Kill the server # Kill the server
disconnect ddl; disconnect ddl;
# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
......
...@@ -46,6 +46,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -46,6 +46,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server # Kill the server
disconnect to_be_killed; disconnect to_be_killed;
# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1; SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo; DROP TABLE foo;
......
...@@ -157,6 +157,7 @@ alter table t3 drop column f2, add column f3 int default 1, add column f4 int de ...@@ -157,6 +157,7 @@ alter table t3 drop column f2, add column f3 int default 1, add column f4 int de
create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb; create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
insert into t4 values('4',5,6); insert into t4 values('4',5,6);
alter table t4 drop column c; alter table t4 drop column c;
# restart
select * from t1; select * from t1;
f5 f3 f5 f3
10 19 10 19
...@@ -193,6 +194,7 @@ a b ...@@ -193,6 +194,7 @@ a b
4 5 4 5
alter table t4 add column d varchar(5) default 'fubar'; alter table t4 add column d varchar(5) default 'fubar';
insert into t4 values('',0,'snafu'); insert into t4 values('',0,'snafu');
# restart
select * from t3; select * from t3;
f1 f3 f4 f5 f1 f3 f4 f5
1 1 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1 1 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
......
# restart
# #
# Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN # Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
# FILES ARE CREATED # FILES ARE CREATED
...@@ -10,9 +11,11 @@ INSERT INTO t1 VALUES (1,2); ...@@ -10,9 +11,11 @@ INSERT INTO t1 VALUES (1,2);
ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE; ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
ALTER TABLE t1 DROP INDEX b, ADD INDEX (b); ALTER TABLE t1 DROP INDEX b, ADD INDEX (b);
# Kill the server # Kill the server
# restart: --debug=d,ib_log
FOUND 1 /scan .*: multi-log rec MLOG_FILE_CREATE2.*page .*:0/ in mysqld.1.err FOUND 1 /scan .*: multi-log rec MLOG_FILE_CREATE2.*page .*:0/ in mysqld.1.err
FOUND 1 /scan .*: log rec MLOG_INDEX_LOAD/ in mysqld.1.err FOUND 1 /scan .*: log rec MLOG_INDEX_LOAD/ in mysqld.1.err
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
# restart
DROP TABLE t1; DROP TABLE t1;
# redo log from before MariaDB 10.2.2/MySQL 5.7.9 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -12,12 +14,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -25,24 +29,28 @@ COUNT(*) ...@@ -25,24 +29,28 @@ COUNT(*)
1 1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err
# distant future redo log format, with valid header checksum # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -50,6 +58,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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: 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 FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# same, but with current-version header # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -57,6 +66,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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: 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 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) # --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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -64,11 +74,13 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# --innodb-force-recovery=6 (skip the entire redo log) # --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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -76,6 +88,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -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 InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
# Test a corrupted MLOG_FILE_NAME record. # Test a corrupted MLOG_FILE_NAME record.
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -88,12 +101,14 @@ FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 ...@@ -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 FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record. # Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS 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 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 # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -120,6 +138,7 @@ COUNT(*) ...@@ -120,6 +138,7 @@ COUNT(*)
1 1
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
# Empty 10.2 redo log # 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 SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -127,6 +146,7 @@ COUNT(*) ...@@ -127,6 +146,7 @@ COUNT(*)
1 1
FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log # 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 * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -137,3 +157,4 @@ ib_buffer_pool ...@@ -137,3 +157,4 @@ ib_buffer_pool
ib_logfile0 ib_logfile0
ib_logfile1 ib_logfile1
ibdata1 ibdata1
# restart
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST # Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES # Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
# Start mysqld without the possibility to create innodb_undo_tablespaces # Start mysqld without the possibility to create innodb_undo_tablespaces
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -9,6 +10,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -9,6 +10,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err
# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101 # Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
# Start mysqld with non existent innodb_log_group_home_dir # Start mysqld with non existent innodb_log_group_home_dir
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend --innodb_log_group_home_dir=/path/to/non-existent/
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -16,6 +18,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -16,6 +18,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err
# Remove ibdata1 & ibdata2 # Remove ibdata1 & ibdata2
# Successfully let InnoDB create tablespaces # Successfully let InnoDB create tablespaces
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb' WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -23,6 +26,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); ...@@ -23,6 +26,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
1 1
# Backup tmp/logfile/* # Backup tmp/logfile/*
# 1. With ibdata2, Without ibdata1 # 1. With ibdata2, Without ibdata1
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -45,6 +49,7 @@ undo001 ...@@ -45,6 +49,7 @@ undo001
undo002 undo002
undo003 undo003
# 2. With ibdata1, without ibdata2 # 2. With ibdata1, without ibdata2
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -84,6 +89,7 @@ ib_logfile2 ...@@ -84,6 +89,7 @@ ib_logfile2
undo001 undo001
undo002 undo002
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -117,6 +123,7 @@ ib_buffer_pool ...@@ -117,6 +123,7 @@ ib_buffer_pool
undo001 undo001
undo002 undo002
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -145,6 +152,7 @@ bak_undo003 ...@@ -145,6 +152,7 @@ bak_undo003
ib_buffer_pool ib_buffer_pool
undo001 undo001
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -171,6 +179,7 @@ bak_undo002 ...@@ -171,6 +179,7 @@ bak_undo002
bak_undo003 bak_undo003
ib_buffer_pool ib_buffer_pool
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -203,6 +212,7 @@ ibdata1 ...@@ -203,6 +212,7 @@ ibdata1
ibdata2 ibdata2
undo001 undo001
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -240,6 +250,7 @@ ib_logfile2 ...@@ -240,6 +250,7 @@ ib_logfile2
ibdata1 ibdata1
ibdata2 ibdata2
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -272,6 +283,7 @@ bak_undo003 ...@@ -272,6 +283,7 @@ bak_undo003
ib_buffer_pool ib_buffer_pool
ib_logfile0 ib_logfile0
ib_logfile2 ib_logfile2
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -296,6 +308,7 @@ undo001 ...@@ -296,6 +308,7 @@ undo001
undo002 undo002
undo003 undo003
# 10. With ibdata*, without ib_logfile0 # 10. With ibdata*, without ib_logfile0
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -335,12 +348,14 @@ ibdata2 ...@@ -335,12 +348,14 @@ ibdata2
undo001 undo001
undo002 undo002
undo003 undo003
# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb' WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
1 1
1 1
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
# restart
# Cleanup # Cleanup
bak_ib_logfile0 bak_ib_logfile0
bak_ib_logfile1 bak_ib_logfile1
......
...@@ -11,12 +11,14 @@ COMMIT; ...@@ -11,12 +11,14 @@ COMMIT;
# Kill the server # Kill the server
# Fault 0 (no real fault): Orphan file with duplicate space_id. # Fault 0 (no real fault): Orphan file with duplicate space_id.
# Fault 1: Two dirty files with the same space_id. # Fault 1: Two dirty files with the same space_id.
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID/ in mysqld.1.err FOUND 1 /InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID/ in mysqld.1.err
# Fault 2: Wrong space_id in a dirty file, and a missing file. # Fault 2: Wrong space_id in a dirty file, and a missing file.
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -24,6 +26,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -24,6 +26,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Ignoring data file '.*t1.ibd' with space ID/ in mysqld.1.err FOUND 1 /InnoDB: Ignoring data file '.*t1.ibd' with space ID/ in mysqld.1.err
FOUND 1 /InnoDB: Tablespace \d+ was not found at.*t3.ibd/ in mysqld.1.err FOUND 1 /InnoDB: Tablespace \d+ was not found at.*t3.ibd/ in mysqld.1.err
# Fault 3: Wrong space_id in a dirty file, and no missing file. # Fault 3: Wrong space_id in a dirty file, and no missing file.
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -33,6 +36,7 @@ FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t1.ibd/ in mysqld.1.err ...@@ -33,6 +36,7 @@ FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t3.ibd/ in mysqld.1.err FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t3.ibd/ in mysqld.1.err
FOUND 2 /InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err FOUND 2 /InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err
# Fault 4: Missing data file # Fault 4: Missing data file
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -40,16 +44,19 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -40,16 +44,19 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t[12].ibd. FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
.*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err .*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err
# Fault 5: Wrong type of data file # Fault 5: Wrong type of data file
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*t2.ibd/ in mysqld.1.err NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*t2.ibd/ in mysqld.1.err
FOUND 1 /\[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err
# restart
SELECT * FROM t2; SELECT * FROM t2;
a a
9 9
...@@ -78,6 +85,7 @@ RENAME TABLE u5 TO u6; ...@@ -78,6 +85,7 @@ RENAME TABLE u5 TO u6;
INSERT INTO u6 VALUES(2); INSERT INTO u6 VALUES(2);
# Kill the server # Kill the server
# Fault 6: All-zero data file and innodb_force_recovery # Fault 6: All-zero data file and innodb_force_recovery
# restart: --innodb-force-recovery=1
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -86,6 +94,7 @@ FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.i ...@@ -86,6 +94,7 @@ FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.i
FOUND 1 /\[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err
NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*u2.ibd/ in mysqld.1.err NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*u2.ibd/ in mysqld.1.err
# Fault 7: Missing or wrong data file and innodb_force_recovery # Fault 7: Missing or wrong data file and innodb_force_recovery
# restart: --innodb-force-recovery=1
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
...@@ -93,9 +102,11 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ...@@ -93,9 +102,11 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' because the target file exists/ in mysqld.1.err FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' because the target file exists/ in mysqld.1.err
# restart: --innodb-force-recovery=1
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
FOUND 1 /\[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!/ in mysqld.1.err FOUND 1 /\[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!/ in mysqld.1.err
# restart
DROP TABLE u1,u2,u3,u6; DROP TABLE u1,u2,u3,u6;
# List of files: # List of files:
db.opt db.opt
......
...@@ -5,10 +5,14 @@ ...@@ -5,10 +5,14 @@
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus'; SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server # Kill the server
# restart: --debug=d,innodb_log_abort_1 --innodb-log-files-in-group=1 --innodb-log-file-size=4M
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=1 --innodb-log-file-size=4M
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /srv_prepare_to_delete_redo_log_files: ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err FOUND 1 /srv_prepare_to_delete_redo_log_files: ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err
# restart
# restart
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
SELECT * FROM INFORMATION_SCHEMA.ENGINES SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
BEGIN; BEGIN;
INSERT INTO t1 VALUES (42); INSERT INTO t1 VALUES (42);
# restart: --innodb-log-file-size=6M
SELECT * FROM t1; SELECT * FROM t1;
a a
INSERT INTO t1 VALUES (42); INSERT INTO t1 VALUES (42);
BEGIN; BEGIN;
DELETE FROM t1; DELETE FROM t1;
# restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M
SELECT * FROM t1; SELECT * FROM t1;
a a
42 42
...@@ -28,50 +33,66 @@ DELETE FROM t1 WHERE a=0; ...@@ -28,50 +33,66 @@ DELETE FROM t1 WHERE a=0;
disconnect con1; disconnect con1;
connection default; connection default;
# Kill the server # Kill the server
# restart: --innodb-log-group-home-dir=foo\;bar
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_1
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=.*/ in mysqld.1.err FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=.*/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_3
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
# restart: --innodb-read-only
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_4
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_5
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
# restart: --innodb-read-only
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_6
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_7
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
# restart: --innodb-read-only
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err FOUND 1 /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_8
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_10
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB' ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
FOUND 1 /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err FOUND 1 /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err
# restart
SELECT * FROM t1; SELECT * FROM t1;
a a
42 42
......
...@@ -33,4 +33,5 @@ set global innodb_fast_shutdown=0; ...@@ -33,4 +33,5 @@ set global innodb_fast_shutdown=0;
ERROR 42000: Variable 'innodb_fast_shutdown' can't be set to the value of '0' ERROR 42000: Variable 'innodb_fast_shutdown' can't be set to the value of '0'
kill ID; kill ID;
ERROR 70100: Connection was killed ERROR 70100: Connection was killed
# restart
drop table t1; drop table t1;
...@@ -20,6 +20,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -20,6 +20,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
BEGIN; BEGIN;
INSERT INTO t VALUES(-10000); INSERT INTO t VALUES(-10000);
ROLLBACK; ROLLBACK;
# restart: --innodb-force-recovery=3
disconnect con1; disconnect con1;
disconnect con2; disconnect con2;
SELECT * FROM t; SELECT * FROM t;
...@@ -31,6 +32,7 @@ a ...@@ -31,6 +32,7 @@ a
1 1
20 20
UPDATE t SET a=3 WHERE a=1; UPDATE t SET a=3 WHERE a=1;
# restart: --innodb-read-only
# Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED. # Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED.
# In earlier versions, this would return the last committed version # In earlier versions, this would return the last committed version
# (only a=3; no record for a=20)! # (only a=3; no record for a=20)!
...@@ -43,6 +45,7 @@ SELECT * FROM t; ...@@ -43,6 +45,7 @@ SELECT * FROM t;
a a
3 3
20 20
# restart: --innodb-force-recovery=5
# #
# MDEV-15418 innodb_force_recovery=5 displays bogus warnings # MDEV-15418 innodb_force_recovery=5 displays bogus warnings
# about too new transaction identifier # about too new transaction identifier
...@@ -62,6 +65,7 @@ SELECT * FROM t; ...@@ -62,6 +65,7 @@ SELECT * FROM t;
a a
3 3
20 20
# restart
SELECT * FROM t; SELECT * FROM t;
a a
3 3
......
...@@ -14,6 +14,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -14,6 +14,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
BEGIN; BEGIN;
INSERT INTO t VALUES(0); INSERT INTO t VALUES(0);
ROLLBACK; ROLLBACK;
# restart: --innodb-force-recovery=3
disconnect con1; disconnect con1;
SELECT * FROM t; SELECT * FROM t;
a a
...@@ -23,6 +24,7 @@ SELECT * FROM t; ...@@ -23,6 +24,7 @@ SELECT * FROM t;
a a
1 1
UPDATE t SET a=3 WHERE a=1; UPDATE t SET a=3 WHERE a=1;
# restart: --innodb-read-only
# Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED. # Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED.
# In earlier versions, this would return the last committed version # In earlier versions, this would return the last committed version
# (empty table)! # (empty table)!
...@@ -33,6 +35,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ...@@ -33,6 +35,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t; SELECT * FROM t;
a a
3 3
# restart
SELECT * FROM t; SELECT * FROM t;
a a
3 3
......
# Bug#25330449 ASSERT SIZE==SPACE->SIZE DURING BUF_READ_AHEAD_RANDOM # Bug#25330449 ASSERT SIZE==SPACE->SIZE DURING BUF_READ_AHEAD_RANDOM
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=INNODB ROW_FORMAT=COMPRESSED; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=INNODB ROW_FORMAT=COMPRESSED;
# restart
SET @saved = @@GLOBAL.innodb_random_read_ahead; SET @saved = @@GLOBAL.innodb_random_read_ahead;
SET GLOBAL innodb_random_read_ahead = 1; SET GLOBAL innodb_random_read_ahead = 1;
DROP TABLE t1; DROP TABLE t1;
......
...@@ -63,4 +63,7 @@ connection default; ...@@ -63,4 +63,7 @@ connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE u(a SERIAL) ENGINE=INNODB; CREATE TABLE u(a SERIAL) ENGINE=INNODB;
FLUSH TABLES; FLUSH TABLES;
# restart
# restart
# restart
DROP TABLE t,u; DROP TABLE t,u;
...@@ -7,6 +7,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%'; ...@@ -7,6 +7,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%';
path path
./test_jfg2/test.ibd ./test_jfg2/test.ibd
DROP DATABASE test_jfg; DROP DATABASE test_jfg;
# restart
DROP DATABASE test_jfg2; DROP DATABASE test_jfg2;
CREATE DATABASE abc_def; CREATE DATABASE abc_def;
CREATE DATABASE abc_def2; CREATE DATABASE abc_def2;
...@@ -17,6 +18,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%'; ...@@ -17,6 +18,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%';
path path
./abc_def2/test1.ibd ./abc_def2/test1.ibd
DROP DATABASE abc_def; DROP DATABASE abc_def;
# restart
DROP DATABASE abc_def2; DROP DATABASE abc_def2;
call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)");
CREATE TABLE t1 (a INT) ENGINE=InnoDB; CREATE TABLE t1 (a INT) ENGINE=InnoDB;
......
...@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_rename_table_commit SIGNAL renamed WAIT_FOR ever'; ...@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_rename_table_commit SIGNAL renamed WAIT_FOR ever';
RENAME TABLE t1 TO t2; RENAME TABLE t1 TO t2;
connection default; connection default;
SET DEBUG_SYNC='now WAIT_FOR renamed'; SET DEBUG_SYNC='now WAIT_FOR renamed';
# restart
disconnect con1; disconnect con1;
SELECT * FROM t1; SELECT * FROM t1;
a b c d a b c d
......
...@@ -14,11 +14,13 @@ CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT ...@@ -14,11 +14,13 @@ CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC
STATS_PERSISTENT=0 DATA DIRECTORY='MYSQL_TMP_DIR'; STATS_PERSISTENT=0 DATA DIRECTORY='MYSQL_TMP_DIR';
# restart: --skip-innodb-buffer-pool-load-at-startup
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*) COUNT(*)
1 1
# restart
SELECT * FROM tr; SELECT * FROM tr;
a a
SELECT * FROM tc; SELECT * FROM tc;
......
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
SET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_file_per_table=1;
# #
# Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE == # Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE ==
...@@ -33,6 +34,7 @@ row_format=redundant; ...@@ -33,6 +34,7 @@ row_format=redundant;
insert into t3 values(444, 'dddd', 'bbbbb', 'aaaaa'); insert into t3 values(444, 'dddd', 'bbbbb', 'aaaaa');
insert into t3 values(555, 'eeee', 'ccccc', 'aaaaa'); insert into t3 values(555, 'eeee', 'ccccc', 'aaaaa');
SET GLOBAL innodb_fast_shutdown=0; SET GLOBAL innodb_fast_shutdown=0;
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0 --innodb-read-only
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
4096 4096
...@@ -48,12 +50,14 @@ TRUNCATE TABLE t2; ...@@ -48,12 +50,14 @@ TRUNCATE TABLE t2;
ERROR HY000: Table 't2' is read only ERROR HY000: Table 't2' is read only
TRUNCATE TABLE t3; TRUNCATE TABLE t3;
ERROR HY000: Table 't3' is read only ERROR HY000: Table 't3' is read only
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
TRUNCATE TABLE t3; TRUNCATE TABLE t3;
corrupted SYS_TABLES.MIX_LEN for test/t1 corrupted SYS_TABLES.MIX_LEN for test/t1
corrupted SYS_TABLES.MIX_LEN for test/t2 corrupted SYS_TABLES.MIX_LEN for test/t2
corrupted SYS_TABLES.MIX_LEN for test/t3 corrupted SYS_TABLES.MIX_LEN for test/t3
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
...@@ -73,6 +77,7 @@ Warnings: ...@@ -73,6 +77,7 @@ Warnings:
Warning 1932 Table 'test.t1' doesn't exist in engine Warning 1932 Table 'test.t1' doesn't exist in engine
DROP TABLE t2,t3; DROP TABLE t2,t3;
FOUND 50 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err FOUND 50 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
# restart
ib_buffer_pool ib_buffer_pool
ib_logfile0 ib_logfile0
ib_logfile1 ib_logfile1
......
alter table mysql.time_zone_name engine=InnoDB; alter table mysql.time_zone_name engine=InnoDB;
create table envois3 (starttime datetime) engine=InnoDB; create table envois3 (starttime datetime) engine=InnoDB;
insert envois3 values ('2008-08-11 22:43:00'); insert envois3 values ('2008-08-11 22:43:00');
# restart
select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3; select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3;
starttime starttime
2008-08-12 02:43:00 2008-08-12 02:43:00
......
# restart: with restart_parameters
SET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_file_per_table=1;
CREATE TABLE tr(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; CREATE TABLE tr(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE tc(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPACT; CREATE TABLE tc(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPACT;
...@@ -112,6 +113,7 @@ header=0x000050150074 (NAME='test/tz', ...@@ -112,6 +113,7 @@ header=0x000050150074 (NAME='test/tz',
CLUSTER_NAME=NULL(0 bytes), CLUSTER_NAME=NULL(0 bytes),
SPACE=0x00000004) SPACE=0x00000004)
header=0x070008030000 (NAME=0x73757072656d756d00) header=0x070008030000 (NAME=0x73757072656d756d00)
# restart: with restart_parameters
SHOW CREATE TABLE tr; SHOW CREATE TABLE tr;
ERROR 42S02: Table 'test.tr' doesn't exist in engine ERROR 42S02: Table 'test.tr' doesn't exist in engine
SHOW CREATE TABLE tc; SHOW CREATE TABLE tc;
...@@ -143,6 +145,7 @@ ERROR 42S02: Table 'test.tp' doesn't exist in engine ...@@ -143,6 +145,7 @@ ERROR 42S02: Table 'test.tp' doesn't exist in engine
FOUND 5 /InnoDB: Table `test`.`t[cp]` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=(129|289|3873|1232[13]) SYS_TABLES\.N_COLS=2147483649/ in mysqld.1.err FOUND 5 /InnoDB: Table `test`.`t[cp]` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=(129|289|3873|1232[13]) SYS_TABLES\.N_COLS=2147483649/ in mysqld.1.err
FOUND 2 /InnoDB: Table `test`\.`tr` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=65 SYS_TABLES\.MIX_LEN=4294967295\b/ in mysqld.1.err FOUND 2 /InnoDB: Table `test`\.`tr` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=65 SYS_TABLES\.MIX_LEN=4294967295\b/ in mysqld.1.err
Restoring SYS_TABLES clustered index root page (8) Restoring SYS_TABLES clustered index root page (8)
# restart: with restart_parameters
SHOW CREATE TABLE tr; SHOW CREATE TABLE tr;
Table Create Table Table Create Table
tr CREATE TABLE `tr` ( tr CREATE TABLE `tr` (
...@@ -188,6 +191,7 @@ a ...@@ -188,6 +191,7 @@ a
SELECT * FROM tp; SELECT * FROM tp;
a a
DROP TABLE tr,tc,td,tz,tp; DROP TABLE tr,tc,td,tz,tp;
# restart
ib_logfile0 ib_logfile0
ib_logfile1 ib_logfile1
ibdata1 ibdata1
......
...@@ -121,6 +121,7 @@ truncate table t1; ...@@ -121,6 +121,7 @@ truncate table t1;
select * from t1; select * from t1;
keyc c1 c2 keyc c1 c2
# test condition of full-temp-tablespace # test condition of full-temp-tablespace
# restart: --innodb_temp_data_file_path=ibtmp1:12M
create temporary table t1 create temporary table t1
(keyc int, c1 char(100), c2 char(100), (keyc int, c1 char(100), c2 char(100),
primary key(keyc)) engine = innodb; primary key(keyc)) engine = innodb;
...@@ -129,6 +130,7 @@ call populate_t1(); ...@@ -129,6 +130,7 @@ call populate_t1();
ERROR HY000: The table 't1' is full ERROR HY000: The table 't1' is full
drop procedure populate_t1; drop procedure populate_t1;
# test read-only mode # test read-only mode
# restart: --innodb-read-only
# files in MYSQL_DATA_DIR # files in MYSQL_DATA_DIR
select * from t1; select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
...@@ -138,22 +140,27 @@ create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb ...@@ -138,22 +140,27 @@ create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only") ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
# test various bad start-up parameters # test various bad start-up parameters
FOUND 2 /InnoDB: Unable to create temporary file/ in mysqld.1.err FOUND 2 /InnoDB: Unable to create temporary file/ in mysqld.1.err
# restart: --innodb_data_file_path=ibdata1:12M:autoextend --innodb_temp_data_file_path=ibdata1:12M:autoextend
FOUND 1 /innodb_temporary and innodb_system file names seem to be the same/ in mysqld.1.err FOUND 1 /innodb_temporary and innodb_system file names seem to be the same/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# restart: --innodb_temp_data_file_path=foobar:3Gnewraw
FOUND 1 /support raw device/ in mysqld.1.err FOUND 1 /support raw device/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# restart: --innodb_temp_data_file_path=barbar:3Graw
FOUND 2 /support raw device/ in mysqld.1.err FOUND 2 /support raw device/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# restart: --innodb_temp_data_file_path=
FOUND 1 /InnoDB: syntax error in file path/ in mysqld.1.err FOUND 1 /InnoDB: syntax error in file path/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# restart
create temporary table t ( create temporary table t (
i int) i int)
engine = innodb row_format = compressed; engine = innodb row_format = compressed;
......
...@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever'; ...@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever';
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
connection default; connection default;
SET DEBUG_SYNC='now WAIT_FOR c'; SET DEBUG_SYNC='now WAIT_FOR c';
# restart
disconnect wait; disconnect wait;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
......
...@@ -10,6 +10,7 @@ t CREATE TABLE `t` ( ...@@ -10,6 +10,7 @@ t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`) UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
# restart
SELECT * FROM t; SELECT * FROM t;
ERROR 42S02: Table 'test.t' doesn't exist in engine ERROR 42S02: Table 'test.t' doesn't exist in engine
TRUNCATE TABLE t; TRUNCATE TABLE t;
......
...@@ -12,4 +12,5 @@ commit; ...@@ -12,4 +12,5 @@ commit;
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces"); call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
SET GLOBAL innodb_fast_shutdown=0; SET GLOBAL innodb_fast_shutdown=0;
FOUND 1 /ib_undo_trunc/ in mysqld.1.err FOUND 1 /ib_undo_trunc/ in mysqld.1.err
# restart: with restart_parameters
drop table t1; drop table t1;
...@@ -43,6 +43,7 @@ XA PREPARE 'xatrx'; ...@@ -43,6 +43,7 @@ XA PREPARE 'xatrx';
CONNECT con1,localhost,root,,; CONNECT con1,localhost,root,,;
call mtr.add_suppression("Found 1 prepared XA transactions"); call mtr.add_suppression("Found 1 prepared XA transactions");
FLUSH TABLES; FLUSH TABLES;
# restart
SELECT update_time FROM information_schema.tables WHERE table_name = 't'; SELECT update_time FROM information_schema.tables WHERE table_name = 't';
update_time update_time
NULL NULL
......
...@@ -69,6 +69,7 @@ table_name COUNT(update_time) ...@@ -69,6 +69,7 @@ table_name COUNT(update_time)
tab7 1 tab7 1
tab8 1 tab8 1
#restart the server #restart the server
# restart
SELECT table_name,update_time SELECT table_name,update_time
FROM information_schema.tables FROM information_schema.tables
WHERE table_name IN ('tab1','tab2','tab3','tab4','tab5','tab7','tab8') WHERE table_name IN ('tab1','tab2','tab3','tab4','tab5','tab7','tab8')
......
...@@ -6,10 +6,12 @@ UPDATE t1 set a=2; ...@@ -6,10 +6,12 @@ UPDATE t1 set a=2;
XA END 'x'; XA END 'x';
XA PREPARE 'x'; XA PREPARE 'x';
connection default; connection default;
# restart: --innodb-force-recovery=2
disconnect con1; disconnect con1;
connect con1,localhost,root; connect con1,localhost,root;
SELECT * FROM t1 LOCK IN SHARE MODE; SELECT * FROM t1 LOCK IN SHARE MODE;
connection default; connection default;
# restart
disconnect con1; disconnect con1;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t1; SELECT * FROM t1;
......
...@@ -1139,7 +1139,9 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); ...@@ -1139,7 +1139,9 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
if ($have_debug) { if ($have_debug) {
# Initiate shutdown in order to issue a redo log checkpoint and to discard # Initiate shutdown in order to issue a redo log checkpoint and to discard
# the redo log record that was emitted due to '+d,fil_names_write_bogus'. # the redo log record that was emitted due to '+d,fil_names_write_bogus'.
--let $restart_noprint=2
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
--let $restart_noprint=0
} }
SELECT * FROM t1; SELECT * FROM t1;
......
...@@ -57,6 +57,7 @@ for (my $d = $d1; $d < $d2 + 64; $d++) { ...@@ -57,6 +57,7 @@ for (my $d = $d1; $d < $d2 + 64; $d++) {
close FILE; close FILE;
open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die; open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die;
print FILE "--let \$restart_parameters=$restart\n" if $restart; print FILE "--let \$restart_parameters=$restart\n" if $restart;
print FILE "--let \$restart_noprint=2\n";
print FILE "--source include/start_mysqld.inc\n"; print FILE "--source include/start_mysqld.inc\n";
close FILE; close FILE;
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd4.ibd") or die; open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd4.ibd") or die;
......
...@@ -34,6 +34,7 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags; ...@@ -34,6 +34,7 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags;
if ($have_debug) { if ($have_debug) {
--let $d=$d --debug=d,create_and_drop_garbage --let $d=$d --debug=d,create_and_drop_garbage
} }
--let $restart_noprint=1
--let $restart_parameters=$d --innodb-stats-persistent=0 --let $restart_parameters=$d --innodb-stats-persistent=0
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
......
...@@ -44,6 +44,7 @@ SET GLOBAL innodb_fast_shutdown=0; ...@@ -44,6 +44,7 @@ SET GLOBAL innodb_fast_shutdown=0;
--source include/shutdown_mysqld.inc --source include/shutdown_mysqld.inc
--source include/search_pattern_in_file.inc --source include/search_pattern_in_file.inc
--let $restart_parameters= --innodb-undo-tablespaces=1 --let $restart_parameters= --innodb-undo-tablespaces=1
--let $restart_noprint=1
if ($checksum_algorithm == "strict_full_crc32") if ($checksum_algorithm == "strict_full_crc32")
{ {
let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_crc32; let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_crc32;
......
...@@ -24,6 +24,7 @@ DELETE FROM articles LIMIT 1; ...@@ -24,6 +24,7 @@ DELETE FROM articles LIMIT 1;
ROLLBACK; ROLLBACK;
disconnect flush_redo_log; disconnect flush_redo_log;
connection default; connection default;
# restart
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
CREATE FULLTEXT INDEX idx ON articles (title,body); CREATE FULLTEXT INDEX idx ON articles (title,body);
...@@ -52,6 +53,7 @@ DELETE FROM articles LIMIT 1; ...@@ -52,6 +53,7 @@ DELETE FROM articles LIMIT 1;
ROLLBACK; ROLLBACK;
disconnect flush_redo_log; disconnect flush_redo_log;
connection default; connection default;
# restart
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles SELECT * FROM articles
...@@ -82,6 +84,7 @@ INSERT INTO articles VALUES ...@@ -82,6 +84,7 @@ INSERT INTO articles VALUES
BEGIN; BEGIN;
INSERT INTO articles VALUES INSERT INTO articles VALUES
(100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...');
# restart
INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...'); INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles WHERE MATCH (title, body) SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
......
...@@ -122,6 +122,7 @@ INSERT INTO articles (title, body) VALUES ...@@ -122,6 +122,7 @@ INSERT INTO articles (title, body) VALUES
('Optimizing MySQL','In this tutorial we will show ...'), ('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'), ('1001 MySQL Tricks','How to use full-text search engine'),
('Go MySQL Tricks','How to use full text search engine'); ('Go MySQL Tricks','How to use full text search engine');
# restart
SELECT COUNT(*) FROM articles; SELECT COUNT(*) FROM articles;
COUNT(*) COUNT(*)
0 0
...@@ -134,6 +135,7 @@ INSERT INTO articles (title, body) VALUES ...@@ -134,6 +135,7 @@ INSERT INTO articles (title, body) VALUES
('Optimizing MySQL','In this tutorial we will show ...'), ('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'), ('1001 MySQL Tricks','How to use full-text search engine'),
('Go MariaDB Tricks','How to use full text search engine'); ('Go MariaDB Tricks','How to use full text search engine');
# restart
SELECT * FROM articles WHERE SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('MySQL'); MATCH(title, body) AGAINST('MySQL');
id title body id title body
......
...@@ -256,6 +256,7 @@ SELECT * FROM articles WHERE MATCH (title) ...@@ -256,6 +256,7 @@ SELECT * FROM articles WHERE MATCH (title)
AGAINST ('love' IN NATURAL LANGUAGE MODE); AGAINST ('love' IN NATURAL LANGUAGE MODE);
id title id title
# Shutdown and restart mysqld # Shutdown and restart mysqld
# restart
SET NAMES utf8; SET NAMES utf8;
INSERT IGNORE INTO articles (title) VALUES INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
...@@ -297,6 +298,7 @@ AGAINST ('love' IN NATURAL LANGUAGE MODE); ...@@ -297,6 +298,7 @@ AGAINST ('love' IN NATURAL LANGUAGE MODE);
id title id title
DROP TABLE user_stopword; DROP TABLE user_stopword;
# Shutdown and restart mysqld # Shutdown and restart mysqld
# restart
SET NAMES utf8; SET NAMES utf8;
INSERT IGNORE INTO articles (title) VALUES INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
......
...@@ -98,6 +98,7 @@ INSERT INTO t1(title) VALUES('database'); ...@@ -98,6 +98,7 @@ INSERT INTO t1(title) VALUES('database');
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash'; SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
INSERT INTO t1(title) VALUES('mysql'); INSERT INTO t1(title) VALUES('mysql');
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
# restart
After restart After restart
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database'); SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
FTS_DOC_ID title FTS_DOC_ID title
...@@ -120,6 +121,7 @@ PRIMARY KEY(id)) ENGINE=InnoDB; ...@@ -120,6 +121,7 @@ PRIMARY KEY(id)) ENGINE=InnoDB;
SET debug_dbug = '+d,fts_instrument_sync'; SET debug_dbug = '+d,fts_instrument_sync';
INSERT INTO t1(title) VALUES('mysql'); INSERT INTO t1(title) VALUES('mysql');
SET debug_dbug = @old_dbug; SET debug_dbug = @old_dbug;
# restart
SET @old_global_dbug = @@GLOBAL.debug_dbug; SET @old_global_dbug = @@GLOBAL.debug_dbug;
SET @old_dbug = @@SESSION.debug_dbug; SET @old_dbug = @@SESSION.debug_dbug;
SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted'; SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted';
......
...@@ -19,4 +19,5 @@ COMMIT; ...@@ -19,4 +19,5 @@ COMMIT;
disconnect purge_control; disconnect purge_control;
connection default; connection default;
set global innodb_fast_shutdown = 0; set global innodb_fast_shutdown = 0;
# restart
drop table t1; drop table t1;
# restart
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb; create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
create procedure insert_t1(IN total int) create procedure insert_t1(IN total int)
begin begin
...@@ -17,6 +18,7 @@ end while; ...@@ -17,6 +18,7 @@ end while;
end| end|
CALL insert_t1(367); CALL insert_t1(367);
COMMIT; COMMIT;
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
...@@ -27,6 +29,7 @@ CALL update_t1(367); ...@@ -27,6 +29,7 @@ CALL update_t1(367);
SET @poly1 = ST_GeomFromText('POLYGON((10000 10000, 10000 10350, 10350 10350, 10350 10000, 10000 10000))'); SET @poly1 = ST_GeomFromText('POLYGON((10000 10000, 10000 10350, 10350 10350, 10350 10000, 10000 10000))');
delete from t1 where ST_Contains(@poly1, c2); delete from t1 where ST_Contains(@poly1, c2);
COMMIT; COMMIT;
# restart
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
......
...@@ -51,6 +51,7 @@ FLUSH TABLES; ...@@ -51,6 +51,7 @@ FLUSH TABLES;
INSERT INTO t_wl6455 VALUES(11, POINT(11,11)); INSERT INTO t_wl6455 VALUES(11, POINT(11,11));
BEGIN; BEGIN;
INSERT INTO t_wl6455 VALUES(1, POINT(1,1)); INSERT INTO t_wl6455 VALUES(1, POINT(1,1));
# restart
CHECK TABLE t_wl6455; CHECK TABLE t_wl6455;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t_wl6455 check status OK test.t_wl6455 check status OK
......
...@@ -116,6 +116,7 @@ DF ...@@ -116,6 +116,7 @@ DF
CHECK TABLE bug56680_2; CHECK TABLE bug56680_2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.bug56680_2 check status OK test.bug56680_2 check status OK
# restart
CHECK TABLE bug56680_2; CHECK TABLE bug56680_2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.bug56680_2 check status OK test.bug56680_2 check status OK
......
...@@ -72,6 +72,7 @@ index_name PRIMARY ...@@ -72,6 +72,7 @@ index_name PRIMARY
compress_ops 65 compress_ops 65
compress_ops_ok 65 compress_ops_ok 65
uncompress_ops 0 uncompress_ops 0
# restart
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table t Table t
Create Table CREATE TABLE `t` ( Create Table CREATE TABLE `t` (
......
...@@ -47,6 +47,7 @@ FOUND 1 /Error while setting value \'no\' to \'strict-check\'/ in my_restart.err ...@@ -47,6 +47,7 @@ FOUND 1 /Error while setting value \'no\' to \'strict-check\'/ in my_restart.err
[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum [14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
# Also check the long form of write option. # Also check the long form of write option.
# start the server with innodb_checksum_algorithm=InnoDB # start the server with innodb_checksum_algorithm=InnoDB
# restart: --innodb_checksum_algorithm=innodb
INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32'); INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
SELECT c1,c2 FROM tab1 order by c1,c2; SELECT c1,c2 FROM tab1 order by c1,c2;
c1 c2 c1 c2
...@@ -56,6 +57,7 @@ c1 c2 ...@@ -56,6 +57,7 @@ c1 c2
[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum [15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
# Also check the short form of write option. # Also check the short form of write option.
# Start the server with checksum algorithm=none # Start the server with checksum algorithm=none
# restart: --innodb_checksum_algorithm=none
INSERT INTO tab1 VALUES(3, 'Innochecksum None'); INSERT INTO tab1 VALUES(3, 'Innochecksum None');
SELECT c1,c2 FROM tab1 order by c1,c2; SELECT c1,c2 FROM tab1 order by c1,c2;
c1 c2 c1 c2
...@@ -66,6 +68,7 @@ DROP TABLE t1; ...@@ -66,6 +68,7 @@ DROP TABLE t1;
# Stop the server # Stop the server
[16]: rewrite into new checksum=crc32 with innochecksum [16]: rewrite into new checksum=crc32 with innochecksum
# Restart the DB server with innodb_checksum_algorithm=crc32 # Restart the DB server with innodb_checksum_algorithm=crc32
# restart: --innodb_checksum_algorithm=crc32
SELECT * FROM tab1; SELECT * FROM tab1;
c1 c2 c1 c2
1 Innochecksum InnoDB1 1 Innochecksum InnoDB1
...@@ -79,6 +82,7 @@ c1 c2 ...@@ -79,6 +82,7 @@ c1 c2
# Stop server # Stop server
[17]: rewrite into new checksum=InnoDB [17]: rewrite into new checksum=InnoDB
# Restart the DB server with innodb_checksum_algorithm=InnoDB # Restart the DB server with innodb_checksum_algorithm=InnoDB
# restart: --innodb_checksum_algorithm=innodb
DELETE FROM tab1 where c1=2; DELETE FROM tab1 where c1=2;
SELECT * FROM tab1; SELECT * FROM tab1;
c1 c2 c1 c2
...@@ -88,4 +92,5 @@ c1 c2 ...@@ -88,4 +92,5 @@ c1 c2
FOUND 1 /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err FOUND 1 /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err
FOUND 1 /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err FOUND 1 /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err
FOUND 1 /Error while setting value \'crc23\' to \'write\'/ in my_restart.err FOUND 1 /Error while setting value \'crc23\' to \'write\'/ in my_restart.err
# restart
DROP TABLE tab1; DROP TABLE tab1;
...@@ -39,6 +39,7 @@ SELECT * FROM tab2 ORDER BY col_7; ...@@ -39,6 +39,7 @@ SELECT * FROM tab2 ORDER BY col_7;
# stop the server # stop the server
[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1 [1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
: start the server with innodb_checksum_algorithm=strict_innodb : start the server with innodb_checksum_algorithm=strict_innodb
# restart: --innodb_checksum_algorithm=strict_innodb
INSERT INTO tab1 (pk, linestring_key, linestring_nokey) INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)')); VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
SET @col_1 = repeat('a', 5); SET @col_1 = repeat('a', 5);
...@@ -55,6 +56,7 @@ SELECT * FROM tab2 ORDER BY col_7; ...@@ -55,6 +56,7 @@ SELECT * FROM tab2 ORDER BY col_7;
# stop the server # stop the server
[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1 [1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
# start the server with innodb_checksum_algorithm=strict_crc32 # start the server with innodb_checksum_algorithm=strict_crc32
# restart: --innodb_checksum_algorithm=strict_crc32
INSERT INTO tab1 (pk, linestring_key, linestring_nokey) INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'), VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))')); ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
...@@ -71,6 +73,7 @@ FROM tab1 ORDER BY pk; ...@@ -71,6 +73,7 @@ FROM tab1 ORDER BY pk;
SELECT * FROM tab2 ORDER BY col_7; SELECT * FROM tab2 ORDER BY col_7;
# stop the server # stop the server
[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1 [1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
# restart: --innodb_checksum_algorithm=strict_none
INSERT INTO tab1 (pk, linestring_key, linestring_nokey) INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) ')); VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
SET @col_1 = repeat('m', 5); SET @col_1 = repeat('m', 5);
...@@ -224,4 +227,5 @@ NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_resta ...@@ -224,4 +227,5 @@ NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_resta
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
# restart
DROP TABLE tab1,tab2; DROP TABLE tab1,tab2;
...@@ -11,6 +11,7 @@ insert into a select null, uuid() from a a, a b, a c; ...@@ -11,6 +11,7 @@ insert into a select null, uuid() from a a, a b, a c;
insert into a select null, uuid() from a a, a b, a c; insert into a select null, uuid() from a a, a b, a c;
SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT; COMMIT;
# restart
SELECT COUNT(*) from a; SELECT COUNT(*) from a;
COUNT(*) COUNT(*)
1010 1010
......
...@@ -263,6 +263,7 @@ t7_restart#p#p1#sp#s3.ibd ...@@ -263,6 +263,7 @@ t7_restart#p#p1#sp#s3.ibd
# #
# Start the server and show that tables are still visible and accessible. # Start the server and show that tables are still visible and accessible.
# #
# restart
SHOW VARIABLES LIKE 'innodb_file_per_table'; SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value Variable_name Value
innodb_file_per_table ON innodb_file_per_table ON
...@@ -517,6 +518,7 @@ t7_restart#p#p1#sp#s3.ibd ...@@ -517,6 +518,7 @@ t7_restart#p#p1#sp#s3.ibd
# #
# Start the server and show the tablespaces. # Start the server and show the tablespaces.
# #
# restart
SHOW VARIABLES LIKE 'innodb_file_per_table'; SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value Variable_name Value
innodb_file_per_table ON innodb_file_per_table ON
...@@ -715,6 +717,7 @@ t77_restart#p#p1#sp#s3.ibd ...@@ -715,6 +717,7 @@ t77_restart#p#p1#sp#s3.ibd
# #
# Restart the server # Restart the server
# #
# restart
SHOW VARIABLES LIKE 'innodb_file_per_table'; SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value Variable_name Value
innodb_file_per_table ON innodb_file_per_table ON
...@@ -851,6 +854,7 @@ t77_restart#p#p1#sp#s3.ibd ...@@ -851,6 +854,7 @@ t77_restart#p#p1#sp#s3.ibd
# #
# Start the server and check tablespaces. # Start the server and check tablespaces.
# #
# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
...@@ -988,6 +992,7 @@ t77_restart.par ...@@ -988,6 +992,7 @@ t77_restart.par
# #
# Start the server and check tablespaces. # Start the server and check tablespaces.
# #
# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
......
...@@ -33,6 +33,7 @@ db.opt ...@@ -33,6 +33,7 @@ db.opt
t1.frm t1.frm
t1.ibd t1.ibd
# Restarting server # Restarting server
# restart
# Done restarting server # Done restarting server
FLUSH TABLE t1 FOR EXPORT; FLUSH TABLE t1 FOR EXPORT;
# List before copying files # List before copying files
...@@ -56,6 +57,7 @@ a b c ...@@ -56,6 +57,7 @@ a b c
1462 Devotion asdfuihknaskdf 1462 Devotion asdfuihknaskdf
1461 Cavalry ..asdasdfaeraf 1461 Cavalry ..asdasdfaeraf
# Restarting server # Restarting server
# restart
# Done restarting server # Done restarting server
# List before t1 DISCARD # List before t1 DISCARD
db.opt db.opt
......
...@@ -320,6 +320,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -320,6 +320,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 5242880 The size of the tab5.ibd file: 5242880
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
...@@ -665,6 +666,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -665,6 +666,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 2097152 The size of the tab5.ibd file: 2097152
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
...@@ -1962,6 +1964,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -1962,6 +1964,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 65536 The size of the tab5.ibd file: 65536
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
...@@ -2309,6 +2312,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -2309,6 +2312,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 65536 The size of the tab5.ibd file: 65536
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
...@@ -5109,6 +5113,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -5109,6 +5113,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 65536 The size of the tab5.ibd file: 65536
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
...@@ -6729,6 +6734,7 @@ AND table_name='tab5' AND database_name='test' ...@@ -6729,6 +6734,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ; AND index_name like 'idx%' ;
compress_stat 1 compress_stat 1
The size of the tab5.ibd file: 65536 The size of the tab5.ibd file: 65536
# restart
# set the flag on (default off) # set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON; SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags # set the flags
......
CREATE TABLE t(i INT) ENGINE INNODB; CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1); INSERT INTO t VALUES(1);
# restart
# xtrabackup backup # xtrabackup backup
# remove datadir # remove datadir
# xtrabackup copy back # xtrabackup copy back
# restart server # restart server
# restart
SELECT * from t; SELECT * from t;
i i
1 1
......
...@@ -22,7 +22,7 @@ count(*) ...@@ -22,7 +22,7 @@ count(*)
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart: --innodb-force-recovery=3
SELECT COUNT(*) FROM t; SELECT COUNT(*) FROM t;
COUNT(*) COUNT(*)
1 1
...@@ -30,6 +30,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ...@@ -30,6 +30,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) FROM t; SELECT COUNT(*) FROM t;
COUNT(*) COUNT(*)
201 201
# restart
SELECT * FROM t; SELECT * FROM t;
a a
0 0
......
...@@ -5,5 +5,5 @@ FLUSH PRIVILEGES; ...@@ -5,5 +5,5 @@ FLUSH PRIVILEGES;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
DROP USER backup_user; DROP USER backup_user;
...@@ -9,7 +9,8 @@ t.ibd.qp ...@@ -9,7 +9,8 @@ t.ibd.qp
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
# restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
COUNT(*) COUNT(*)
10000 10000
......
...@@ -4,7 +4,7 @@ DROP TABLE t; ...@@ -4,7 +4,7 @@ DROP TABLE t;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
DROP TABLE t; DROP TABLE t;
...@@ -6,7 +6,7 @@ DROP TABLE t; ...@@ -6,7 +6,7 @@ DROP TABLE t;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
a a
1 1
......
...@@ -7,7 +7,7 @@ CREATE TABLE t5 (i int) ENGINE=INNODB; ...@@ -7,7 +7,7 @@ CREATE TABLE t5 (i int) ENGINE=INNODB;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
CREATE TABLE t1(i int); CREATE TABLE t1(i int);
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t2(i int); CREATE TABLE t2(i int);
......
...@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: Encrypted page .* in file .*test.t1\\.ibd look ...@@ -3,6 +3,7 @@ call mtr.add_suppression("InnoDB: Encrypted page .* in file .*test.t1\\.ibd look
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes; CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
insert into t1(b, c) values("mariadb", "mariabackup"); insert into t1(b, c) values("mariadb", "mariabackup");
# Corrupt the table # Corrupt the table
# restart
# xtrabackup backup # xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1; drop table t1;
...@@ -3,6 +3,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Table `test`\\.`t1` has an unreada ...@@ -3,6 +3,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Table `test`\\.`t1` has an unreada
CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB, encrypted=yes; CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB, encrypted=yes;
insert into t1 select repeat('a',100); insert into t1 select repeat('a',100);
# Corrupt the table # Corrupt the table
# restart
# xtrabackup backup # xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1; drop table t1;
...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(2); ...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(2);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
# #
# MDEV-13416 mariabackup fails with EFAULT "Bad Address" # MDEV-13416 mariabackup fails with EFAULT "Bad Address"
# #
# restart
FOUND 1 /InnoDB: New log files created, LSN=175964\d{8}/ in mysqld.1.err FOUND 1 /InnoDB: New log files created, LSN=175964\d{8}/ in mysqld.1.err
CREATE TABLE t(i INT) ENGINE INNODB; CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1); INSERT INTO t VALUES(1);
...@@ -11,7 +12,7 @@ INSERT INTO t VALUES(2); ...@@ -11,7 +12,7 @@ INSERT INTO t VALUES(2);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -5,5 +5,4 @@ echo # remove datadir; ...@@ -5,5 +5,4 @@ echo # remove datadir;
rmdir $_datadir; rmdir $_datadir;
echo # xtrabackup move back; echo # xtrabackup move back;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2 --throttle=1; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2 --throttle=1;
echo # restart server;
--source include/start_mysqld.inc --source include/start_mysqld.inc
...@@ -21,7 +21,7 @@ disconnect con1; ...@@ -21,7 +21,7 @@ disconnect con1;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -25,7 +25,7 @@ count(*) ...@@ -25,7 +25,7 @@ count(*)
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
select count(*) from t7; select count(*) from t7;
count(*) count(*)
7168 7168
......
...@@ -9,7 +9,7 @@ INSERT into t1 values(1); ...@@ -9,7 +9,7 @@ INSERT into t1 values(1);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
CREATE TABLE t1(i int); CREATE TABLE t1(i int);
DROP TABLE t1; DROP TABLE t1;
SELECT * from t1_renamed; SELECT * from t1_renamed;
......
...@@ -13,7 +13,7 @@ i ...@@ -13,7 +13,7 @@ i
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -10,7 +10,7 @@ INSERT INTO t2 VALUES(2); ...@@ -10,7 +10,7 @@ INSERT INTO t2 VALUES(2);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t2; SELECT * FROM t2;
i i
2 2
......
...@@ -18,7 +18,7 @@ call a(); ...@@ -18,7 +18,7 @@ call a();
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
DROP PROCEDURE a; DROP PROCEDURE a;
CHECK TABLE tz,tr,td; CHECK TABLE tz,tr,td;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
......
...@@ -7,7 +7,7 @@ INSERT INTO t VALUES(2); ...@@ -7,7 +7,7 @@ INSERT INTO t VALUES(2);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -14,6 +14,7 @@ FOUND 1 /Checksum mismatch in datafile/ in backup.log ...@@ -14,6 +14,7 @@ FOUND 1 /Checksum mismatch in datafile/ in backup.log
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart server
# restart
SELECT count(*) FROM t; SELECT count(*) FROM t;
count(*) count(*)
100000 100000
......
create table t1(c1 int) engine=InnoDB; create table t1(c1 int) engine=InnoDB;
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
# restart
# xtrabackup backup # xtrabackup backup
select * from t1; select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
......
...@@ -8,7 +8,7 @@ t1.new ...@@ -8,7 +8,7 @@ t1.new
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
COUNT(*) COUNT(*)
10000 10000
......
...@@ -11,7 +11,7 @@ DROP TABLE t; ...@@ -11,7 +11,7 @@ DROP TABLE t;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -7,7 +7,7 @@ INSERT INTO t3 SELECT UUID() FROM seq_1_to_1000; ...@@ -7,7 +7,7 @@ INSERT INTO t3 SELECT UUID() FROM seq_1_to_1000;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
COUNT(*) COUNT(*)
100 100
......
...@@ -18,7 +18,7 @@ INSERT INTO b1 VALUES('b1'); ...@@ -18,7 +18,7 @@ INSERT INTO b1 VALUES('b1');
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
CREATE TABLE t1(i int); CREATE TABLE t1(i int);
DROP TABLE t1; DROP TABLE t1;
SELECT * from t1_renamed; SELECT * from t1_renamed;
......
...@@ -3,7 +3,7 @@ CREATE TABLE t1(i int) ENGINE INNODB; ...@@ -3,7 +3,7 @@ CREATE TABLE t1(i int) ENGINE INNODB;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
CREATE TABLE t1(i int); CREATE TABLE t1(i int);
DROP TABLE t1; DROP TABLE t1;
SELECT * from t2; SELECT * from t2;
......
...@@ -3,7 +3,7 @@ INSERT INTO t VALUES(1); ...@@ -3,7 +3,7 @@ INSERT INTO t VALUES(1);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * from t; SELECT * from t;
i i
1 1
......
...@@ -5,7 +5,7 @@ insert into t values (3); ...@@ -5,7 +5,7 @@ insert into t values (3);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -30,7 +30,7 @@ insert into t values (3); ...@@ -30,7 +30,7 @@ insert into t values (3);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
......
...@@ -4,6 +4,7 @@ CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=I ...@@ -4,6 +4,7 @@ CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=I
insert into t1(b, c) values("mariadb", "mariabackup"); insert into t1(b, c) values("mariadb", "mariabackup");
InnoDB 0 transactions not purged InnoDB 0 transactions not purged
# Corrupt the table # Corrupt the table
# restart: --skip-innodb-buffer-pool-load-at-startup
# xtrabackup backup # xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1; drop table t1;
......
...@@ -4,7 +4,7 @@ INSERT INTO t VALUES('foobar1'); ...@@ -4,7 +4,7 @@ INSERT INTO t VALUES('foobar1');
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * from t; SELECT * from t;
c c
foobar1 foobar1
......
...@@ -7,7 +7,7 @@ drop table t1; ...@@ -7,7 +7,7 @@ drop table t1;
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
select sum(c1) from t1; select sum(c1) from t1;
sum(c1) sum(c1)
12497500 12497500
......
...@@ -8,7 +8,7 @@ INSERT INTO t VALUES('foobar2'); ...@@ -8,7 +8,7 @@ INSERT INTO t VALUES('foobar2');
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
ib_logfile0 ib_logfile0
SELECT * FROM t; SELECT * FROM t;
c c
......
...@@ -10,5 +10,5 @@ FULLTEXT KEY (title) ...@@ -10,5 +10,5 @@ FULLTEXT KEY (title)
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
drop table film_text; drop table film_text;
...@@ -45,7 +45,7 @@ INSERT INTO isam_p VALUES (401), (501); ...@@ -45,7 +45,7 @@ INSERT INTO isam_p VALUES (401), (501);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * from p; SELECT * from p;
a a
201 201
......
...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(2); ...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(2);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
...@@ -16,6 +16,7 @@ i ...@@ -16,6 +16,7 @@ i
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart server
# restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1); ...@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1);
# xtrabackup backup # xtrabackup backup
INSERT INTO t VALUES(2); INSERT INTO t VALUES(2);
# xtrabackup prepare # xtrabackup prepare
# restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1); ...@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1);
# xtrabackup backup # xtrabackup backup
INSERT INTO t VALUES(2); INSERT INTO t VALUES(2);
# xtrabackup prepare # xtrabackup prepare
# restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(1); ...@@ -6,7 +6,7 @@ INSERT INTO t VALUES(1);
# shutdown server # shutdown server
# remove datadir # remove datadir
# xtrabackup move back # xtrabackup move back
# restart server # restart
SELECT * FROM t; SELECT * FROM t;
i i
1 1
......
# Kill the server # Kill the server
Found: unknown variable 'performance-schema-enabled=maybe' Found: unknown variable 'performance-schema-enabled=maybe'
Found: Aborting Found: Aborting
# restart
# Kill the server # Kill the server
FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt
# restart
# Kill the server # Kill the server
Found: unknown option '-x' Found: unknown option '-x'
Found: Aborting Found: Aborting
# restart
# Kill the server # Kill the server
Found: Can't change dir to.*bad_option_h_param Found: Can't change dir to.*bad_option_h_param
Found: Aborting Found: Aborting
# restart
# Kill the server # Kill the server
Found: unknown option '-X' Found: unknown option '-X'
Found: Aborting Found: Aborting
# restart
# restart
drop table if exists test.marker; drop table if exists test.marker;
create table test.marker(a int); create table test.marker(a int);
update performance_schema.setup_consumers set enabled='NO'; update performance_schema.setup_consumers set enabled='NO';
......
...@@ -68,6 +68,7 @@ i ...@@ -68,6 +68,7 @@ i
1 1
2 2
# Now restart server # Now restart server
# restart
# Done restarting server # Done restarting server
# Reset setting that were lost in restart # Reset setting that were lost in restart
SET @@global.rpl_semi_sync_master_timeout = 60000; SET @@global.rpl_semi_sync_master_timeout = 60000;
...@@ -141,6 +142,7 @@ i ...@@ -141,6 +142,7 @@ i
2 2
3 3
# Now restart server # Now restart server
# restart
# Done restarting server # Done restarting server
# Reset setting that were lost in restart # Reset setting that were lost in restart
SET @@global.rpl_semi_sync_master_timeout = 60000; SET @@global.rpl_semi_sync_master_timeout = 60000;
......
create sequence s1 cache 2 engine=innodb; create sequence s1 cache 2 engine=innodb;
# restart: --innodb-read-only
connection default; connection default;
show global variables like 'innodb_read_only'; show global variables like 'innodb_read_only';
Variable_name Value Variable_name Value
...@@ -26,6 +27,7 @@ ERROR HY000: Table 's1' is read only ...@@ -26,6 +27,7 @@ ERROR HY000: Table 's1' is read only
select * from s1; select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0 1 1 9223372036854775806 1 1 2 0 0
# restart
select * from s1; select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0 1 1 9223372036854775806 1 1 2 0 0
......
...@@ -40,6 +40,7 @@ INSERT INTO t1 VALUES (@a,@a,@a,@a,@a, ...@@ -40,6 +40,7 @@ INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,
SET GLOBAL innodb_buffer_pool_dump_now=1; SET GLOBAL innodb_buffer_pool_dump_now=1;
# Restart server # Restart server
# restart
# Abort after 16 pages # Abort after 16 pages
SET GLOBAL innodb_buffer_pool_load_pages_abort=16, SET GLOBAL innodb_buffer_pool_load_pages_abort=16,
...@@ -54,6 +55,7 @@ INNODB_BUFFER_POOL_LOAD_INCOMPLETE ON ...@@ -54,6 +55,7 @@ INNODB_BUFFER_POOL_LOAD_INCOMPLETE ON
INNODB_BUFFER_POOL_LOAD_STATUS Buffer pool(s) load aborted on request INNODB_BUFFER_POOL_LOAD_STATUS Buffer pool(s) load aborted on request
# Restart server # Restart server
# restart
# Load buffer pool # Load buffer pool
SET GLOBAL innodb_buffer_pool_load_now=1; SET GLOBAL innodb_buffer_pool_load_now=1;
...@@ -82,6 +84,7 @@ INNODB_BUFFER_POOL_DUMP_STATUS Buffer pool(s) dump completed at ...@@ -82,6 +84,7 @@ INNODB_BUFFER_POOL_DUMP_STATUS Buffer pool(s) dump completed at
INNODB_BUFFER_POOL_LOAD_INCOMPLETE OFF INNODB_BUFFER_POOL_LOAD_INCOMPLETE OFF
# Restart server # Restart server
# restart
# Load buffer pool # Load buffer pool
SET GLOBAL innodb_buffer_pool_load_now=1; SET GLOBAL innodb_buffer_pool_load_now=1;
......
...@@ -16,4 +16,5 @@ SET GLOBAL innodb_buffer_pool_dump_at_shutdown = "string"; ...@@ -16,4 +16,5 @@ SET GLOBAL innodb_buffer_pool_dump_at_shutdown = "string";
Got one of the listed errors Got one of the listed errors
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = 5; SET GLOBAL innodb_buffer_pool_dump_at_shutdown = 5;
Got one of the listed errors Got one of the listed errors
# restart
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = default; SET GLOBAL innodb_buffer_pool_dump_at_shutdown = default;
...@@ -4,11 +4,13 @@ select @@innodb_flush_method; ...@@ -4,11 +4,13 @@ select @@innodb_flush_method;
fsync fsync
create table t(a serial) engine=innodb; create table t(a serial) engine=innodb;
FLUSH TABLES; FLUSH TABLES;
# restart: --innodb-flush-method=5
select @@innodb_flush_method; select @@innodb_flush_method;
@@innodb_flush_method @@innodb_flush_method
O_DIRECT_NO_FSYNC O_DIRECT_NO_FSYNC
insert into t values(0); insert into t values(0);
FLUSH TABLES; FLUSH TABLES;
# restart: --innodb-flush-method=0
select @@innodb_flush_method; select @@innodb_flush_method;
@@innodb_flush_method @@innodb_flush_method
fsync fsync
......
...@@ -67,6 +67,7 @@ change a a int with system versioning, ...@@ -67,6 +67,7 @@ change a a int with system versioning,
add primary key pk (a); add primary key pk (a);
affected rows: 0 affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 0 Duplicates: 0 Warnings: 0
# restart
update t1 set a=2; update t1 set a=2;
select count(*) from t1 for system_time all; select count(*) from t1 for system_time all;
count(*) count(*)
......
...@@ -7,6 +7,7 @@ SELECT @@GLOBAL.WSREP_ON; ...@@ -7,6 +7,7 @@ SELECT @@GLOBAL.WSREP_ON;
1 1
SET GLOBAL WSREP_ON= 0; SET GLOBAL WSREP_ON= 0;
Restart the node. Restart the node.
# restart
SELECT @@GLOBAL.WSREP_ON; SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON @@GLOBAL.WSREP_ON
1 1
......
...@@ -391,6 +391,7 @@ set global rocksdb_force_flush_memtable_now=1; ...@@ -391,6 +391,7 @@ set global rocksdb_force_flush_memtable_now=1;
ALTER TABLE t1 ADD INDEX kj(j), ALGORITHM=INPLACE; ALTER TABLE t1 ADD INDEX kj(j), ALGORITHM=INPLACE;
larger larger
1 1
# restart
larger larger
1 1
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
...@@ -398,6 +399,7 @@ test.t1 analyze status Engine-independent statistics collected ...@@ -398,6 +399,7 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK test.t1 analyze status OK
larger larger
1 1
# restart
larger larger
1 1
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
......
...@@ -62,6 +62,7 @@ a b ...@@ -62,6 +62,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -171,6 +172,7 @@ a b ...@@ -171,6 +172,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -254,6 +256,7 @@ SHOW COLUMNS IN t1; ...@@ -254,6 +256,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) YES NULL a int(11) YES NULL
b char(8) YES NULL b char(8) YES NULL
# restart
INSERT INTO t1 (a,b) VALUES (35,'foo'); INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (35,'foo'); INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (36,'foo'); INSERT INTO t1 (a,b) VALUES (36,'foo');
......
...@@ -63,6 +63,7 @@ a b ...@@ -63,6 +63,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -147,6 +148,7 @@ a b ...@@ -147,6 +148,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -228,6 +230,7 @@ a b ...@@ -228,6 +230,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -311,6 +314,7 @@ a b ...@@ -311,6 +314,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -401,6 +405,7 @@ a b ...@@ -401,6 +405,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -484,6 +489,7 @@ a b ...@@ -484,6 +489,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -568,6 +574,7 @@ a b ...@@ -568,6 +574,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -747,6 +754,7 @@ a b ...@@ -747,6 +754,7 @@ a b
123 bbb 123 bbb
321 ccc 321 ccc
321 ccc 321 ccc
# restart
INSERT INTO t1 (a,b) VALUES (45,'bob'); INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1; SELECT * FROM t1;
a b a b
...@@ -788,6 +796,7 @@ t1 CREATE TABLE `t1` ( ...@@ -788,6 +796,7 @@ t1 CREATE TABLE `t1` (
`i` int(11) NOT NULL AUTO_INCREMENT, `i` int(11) NOT NULL AUTO_INCREMENT,
KEY `i` (`i`) KEY `i` (`i`)
) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 ) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
# restart
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -6,6 +6,7 @@ pk a ...@@ -6,6 +6,7 @@ pk a
3 1 3 1
2 2 2 2
1 3 1 3
# restart
INSERT INTO t1 (pk) VALUES (4); INSERT INTO t1 (pk) VALUES (4);
SELECT * FROM t1; SELECT * FROM t1;
pk a pk a
......
# restart
CREATE TABLE `linktable` ( CREATE TABLE `linktable` (
`id1` bigint(20) unsigned NOT NULL DEFAULT '0', `id1` bigint(20) unsigned NOT NULL DEFAULT '0',
`id1_type` int(10) unsigned NOT NULL DEFAULT '0', `id1_type` int(10) unsigned NOT NULL DEFAULT '0',
...@@ -74,6 +75,7 @@ select case when variable_value-@c = 0 then 'true' else 'false' end from informa ...@@ -74,6 +75,7 @@ select case when variable_value-@c = 0 then 'true' else 'false' end from informa
case when variable_value-@c = 0 then 'true' else 'false' end case when variable_value-@c = 0 then 'true' else 'false' end
true true
DROP TABLE linktable; DROP TABLE linktable;
# restart
# #
# bloom filter prefix is 20 byte # bloom filter prefix is 20 byte
# Create a key which is longer than that, so that we see that # Create a key which is longer than that, so that we see that
...@@ -98,6 +100,7 @@ insert into t1 values (10,1,1,0x12FFFFFFFFFF,1); ...@@ -98,6 +100,7 @@ insert into t1 values (10,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (11,1,1,0x12FFFFFFFFFF,1); insert into t1 values (11,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (20,2,2,0x12FFFFFFFFFF,1); insert into t1 values (20,2,2,0x12FFFFFFFFFF,1);
insert into t1 values (21,2,2,0x12FFFFFFFFFF,1); insert into t1 values (21,2,2,0x12FFFFFFFFFF,1);
# restart
explain explain
select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc; select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
......
...@@ -86,6 +86,7 @@ INSERT INTO t1 VALUES(51479+0.333333333,1); ...@@ -86,6 +86,7 @@ INSERT INTO t1 VALUES(51479+0.333333333,1);
DROP TABLE t1; DROP TABLE t1;
SET @@global.table_open_cache=@orig_table_open_cache; SET @@global.table_open_cache=@orig_table_open_cache;
FOUND 1 /RocksDB: Error [0-9]+ finalizing bulk load while closing handler/ in rocksdb.bulk_load_errors.3.err FOUND 1 /RocksDB: Error [0-9]+ finalizing bulk load while closing handler/ in rocksdb.bulk_load_errors.3.err
# restart
CREATE TABLE t1 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB; CREATE TABLE t1 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
CREATE TABLE t2 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB; CREATE TABLE t2 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
SET rocksdb_bulk_load=1; SET rocksdb_bulk_load=1;
......
# restart
CREATE TABLE t0 (id int PRIMARY KEY, a int, INDEX ix_a (a)) engine=rocksdb; CREATE TABLE t0 (id int PRIMARY KEY, a int, INDEX ix_a (a)) engine=rocksdb;
insert into t0 values (0, 0),(1, 1),(2, 2),(3, 3),(4, 4), insert into t0 values (0, 0),(1, 1),(2, 2),(3, 3),(4, 4),
(5, 4),(6, 4),(7, 4),(8, 4),(9, 4); (5, 4),(6, 4),(7, 4),(8, 4),(9, 4);
...@@ -66,6 +67,7 @@ SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema ...@@ -66,6 +67,7 @@ SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema
table_name table_rows table_name table_rows
t1 100000 t1 100000
restarting... restarting...
# restart
show index in t1; show index in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 id A 100000 NULL NULL LSMTREE t1 0 PRIMARY 1 id A 100000 NULL NULL LSMTREE
......
# restart: --rocksdb_default_cf_options=compression_per_level=kZSTDNotFinalCompression;compression_opts=-14:4:0;
create table t (id int primary key) engine=rocksdb; create table t (id int primary key) engine=rocksdb;
drop table t; drop table t;
...@@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` ( ...@@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `kc` (`c`) KEY `kc` (`c`)
) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 ) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
# restart
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -117,6 +118,7 @@ SHOW INDEX IN t1; ...@@ -117,6 +118,7 @@ SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 a A 0 NULL NULL LSMTREE t1 0 PRIMARY 1 a A 0 NULL NULL LSMTREE
t1 0 kc 1 c A 0 NULL NULL YES LSMTREE t1 0 kc 1 c A 0 NULL NULL YES LSMTREE
# restart
INSERT INTO t1 (b,c) VALUES (1,2); INSERT INTO t1 (b,c) VALUES (1,2);
INSERT INTO t1 (b,c) VALUES (3,4); INSERT INTO t1 (b,c) VALUES (3,4);
INSERT INTO t1 (b,c) VALUES (5,6); INSERT INTO t1 (b,c) VALUES (5,6);
......
...@@ -10,6 +10,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found"); ...@@ -10,6 +10,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1'; set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2'; set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1; set global rocksdb_signal_drop_index_thread = 1;
# restart
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
b int not null, b int not null,
...@@ -38,10 +39,12 @@ DELETE FROM t1; ...@@ -38,10 +39,12 @@ DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
DELETE FROM t3; DELETE FROM t3;
DELETE FROM t4; DELETE FROM t4;
# restart
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t4; DELETE FROM t4;
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t4; DELETE FROM t4;
# restart
CREATE TABLE t5 ( CREATE TABLE t5 (
a int not null, a int not null,
b int not null, b int not null,
......
...@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found"); ...@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1'; set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2'; set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1; set global rocksdb_signal_drop_index_thread = 1;
# restart
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
b int not null, b int not null,
......
...@@ -19,3 +19,4 @@ SELECT @@global.rocksdb_max_open_files; ...@@ -19,3 +19,4 @@ SELECT @@global.rocksdb_max_open_files;
SELECT FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files; SELECT FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files;
FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files
1 1
# restart
# restart
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
i INT, i INT,
......
...@@ -1399,6 +1399,7 @@ create table t1 (i int primary key auto_increment) engine=RocksDB; ...@@ -1399,6 +1399,7 @@ create table t1 (i int primary key auto_increment) engine=RocksDB;
insert into t1 values (null); insert into t1 values (null);
insert into t1 values (null); insert into t1 values (null);
SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = @ORIG_PAUSE_BACKGROUND_WORK; SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = @ORIG_PAUSE_BACKGROUND_WORK;
# restart
SET @ORIG_PAUSE_BACKGROUND_WORK = @@ROCKSDB_PAUSE_BACKGROUND_WORK; SET @ORIG_PAUSE_BACKGROUND_WORK = @@ROCKSDB_PAUSE_BACKGROUND_WORK;
SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = 1; SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = 1;
insert into t1 values (null); insert into t1 values (null);
......
...@@ -7,6 +7,7 @@ primary key (a) comment 'z') engine=rocksdb; ...@@ -7,6 +7,7 @@ primary key (a) comment 'z') engine=rocksdb;
insert into t1 values (1); insert into t1 values (1);
insert into t2 values (2); insert into t2 values (2);
insert into t3 values (2); insert into t3 values (2);
# restart
Default options for all column families: Default options for all column families:
...@@ -32,6 +33,7 @@ z WRITE_BUFFER_SIZE 12582912 ...@@ -32,6 +33,7 @@ z WRITE_BUFFER_SIZE 12582912
__system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000 __system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000
__system__ TARGET_FILE_SIZE_BASE 1048576 __system__ TARGET_FILE_SIZE_BASE 1048576
__system__ WRITE_BUFFER_SIZE 12582912 __system__ WRITE_BUFFER_SIZE 12582912
# restart: --rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m};
Individualized options for column families: Individualized options for column families:
...@@ -57,5 +59,6 @@ z WRITE_BUFFER_SIZE 12582912 ...@@ -57,5 +59,6 @@ z WRITE_BUFFER_SIZE 12582912
__system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000 __system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000
__system__ TARGET_FILE_SIZE_BASE 1048576 __system__ TARGET_FILE_SIZE_BASE 1048576
__system__ WRITE_BUFFER_SIZE 12582912 __system__ WRITE_BUFFER_SIZE 12582912
# restart: --rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m};
drop table t1,t2,t3; drop table t1,t2,t3;
...@@ -125,4 +125,5 @@ set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1"; ...@@ -125,4 +125,5 @@ set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
set @@global.rocksdb_store_row_debug_checksums=@save_rocksdb_store_row_debug_checksums; set @@global.rocksdb_store_row_debug_checksums=@save_rocksdb_store_row_debug_checksums;
set @@global.rocksdb_verify_row_debug_checksums=@save_rocksdb_verify_row_debug_checksums; set @@global.rocksdb_verify_row_debug_checksums=@save_rocksdb_verify_row_debug_checksums;
set @@global.rocksdb_checksums_pct=@save_rocksdb_checksums_pct; set @@global.rocksdb_checksums_pct=@save_rocksdb_checksums_pct;
# restart
drop table t2,t3,t4; drop table t2,t3,t4;
...@@ -131,6 +131,7 @@ DROP DATABASE db3; ...@@ -131,6 +131,7 @@ DROP DATABASE db3;
CREATE TABLE t1 (a INT) ENGINE=RocksDB PARTITION BY HASH(a) PARTITIONS 2; CREATE TABLE t1 (a INT) ENGINE=RocksDB PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 (a) VALUES (1),(2); INSERT INTO t1 (a) VALUES (1),(2);
ALTER TABLE t1 ADD PARTITION PARTITIONS 2; ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
# restart
SELECT 1; SELECT 1;
1 1
1 1
......
create table t1 (pk int primary key) engine=rocksdb; create table t1 (pk int primary key) engine=rocksdb;
# restart
show tables; show tables;
Tables_in_test Tables_in_test
#mysql50#t1#sql-test #mysql50#t1#sql-test
...@@ -11,6 +12,7 @@ show tables; ...@@ -11,6 +12,7 @@ show tables;
Tables_in_test Tables_in_test
#mysql50#t1#sql-test #mysql50#t1#sql-test
t2 t2
# restart
show tables; show tables;
Tables_in_test Tables_in_test
create table t2 (pk int primary key) engine=rocksdb; create table t2 (pk int primary key) engine=rocksdb;
......
...@@ -37,6 +37,7 @@ table_name data_length>0 index_length>0 ...@@ -37,6 +37,7 @@ table_name data_length>0 index_length>0
t1 1 1 t1 1 1
t2 1 1 t2 1 1
t3 1 1 t3 1 1
# restart
SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE(); SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE();
table_name table_rows table_name table_rows
t1 100000 t1 100000
......
...@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found"); ...@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1'; set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2'; set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1; set global rocksdb_signal_drop_index_thread = 1;
# restart
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
b int not null, b int not null,
......
...@@ -5,10 +5,13 @@ select plugin_name, plugin_type from information_schema.plugins where plugin_nam ...@@ -5,10 +5,13 @@ select plugin_name, plugin_type from information_schema.plugins where plugin_nam
plugin_name plugin_type plugin_name plugin_type
ROCKSDB STORAGE ENGINE ROCKSDB STORAGE ENGINE
Checking direct reads Checking direct reads
# restart
FOUND 1 /enable both use_direct_reads/ in use_direct_reads_writes.err FOUND 1 /enable both use_direct_reads/ in use_direct_reads_writes.err
Checking direct writes Checking direct writes
# restart
FOUND 1 /enable both use_direct_io_for_flush_and_compaction/ in use_direct_reads_writes.err FOUND 1 /enable both use_direct_io_for_flush_and_compaction/ in use_direct_reads_writes.err
Checking rocksdb_flush_log_at_trx_commit Checking rocksdb_flush_log_at_trx_commit
# restart
FOUND 1 /rocksdb_flush_log_at_trx_commit needs to be/ in use_direct_reads_writes.err FOUND 1 /rocksdb_flush_log_at_trx_commit needs to be/ in use_direct_reads_writes.err
Validate flush_log settings when direct writes is enabled Validate flush_log settings when direct writes is enabled
set global rocksdb_flush_log_at_trx_commit=0; set global rocksdb_flush_log_at_trx_commit=0;
...@@ -16,3 +19,4 @@ set global rocksdb_flush_log_at_trx_commit=1; ...@@ -16,3 +19,4 @@ set global rocksdb_flush_log_at_trx_commit=1;
ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '1' ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '1'
set global rocksdb_flush_log_at_trx_commit=2; set global rocksdb_flush_log_at_trx_commit=2;
ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '2' ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '2'
# restart
...@@ -18,6 +18,7 @@ XA PREPARE 'xa2'; ...@@ -18,6 +18,7 @@ XA PREPARE 'xa2';
connection default; connection default;
SELECT * FROM t1; SELECT * FROM t1;
a a
# restart
connect con3,localhost,root,,test; connect con3,localhost,root,,test;
XA RECOVER; XA RECOVER;
formatID gtrid_length bqual_length data formatID gtrid_length bqual_length data
......
...@@ -8,4 +8,5 @@ FOUND 1 /compression_method=7/ in dump ...@@ -8,4 +8,5 @@ FOUND 1 /compression_method=7/ in dump
FOUND 1 /compression_method=9/ in dump FOUND 1 /compression_method=9/ in dump
FOUND 1 /compression_method=10/ in dump FOUND 1 /compression_method=10/ in dump
FOUND 1 /compression_method=11/ in dump FOUND 1 /compression_method=11/ in dump
# restart
DROP TABLE t1, t2, t3, t4, t5; DROP TABLE t1, t2, t3, t4, t5;
...@@ -21,6 +21,7 @@ CALL mtr.add_suppression("because destination db does not exist"); ...@@ -21,6 +21,7 @@ CALL mtr.add_suppression("because destination db does not exist");
ALTER TABLE test.t1 RENAME foo.t1; ALTER TABLE test.t1 RENAME foo.t1;
ERROR HY000: Error on rename of './test/t1' to './foo/t1' (errno: 2 "No such file or directory") ERROR HY000: Error on rename of './test/t1' to './foo/t1' (errno: 2 "No such file or directory")
DROP TABLE t1; DROP TABLE t1;
# restart
SELECT @@tokudb_data_dir; SELECT @@tokudb_data_dir;
@@tokudb_data_dir @@tokudb_data_dir
NULL NULL
......
# restart: --log-error=MYSQLTEST_VARDIR/tmp/tokudb.bugs.PS-3773.log
CREATE TABLE t1(a INT, b INT, c INT, PRIMARY KEY(a), KEY(b)) ENGINE=TokuDB; CREATE TABLE t1(a INT, b INT, c INT, PRIMARY KEY(a), KEY(b)) ENGINE=TokuDB;
SET tokudb_auto_analyze=0; SET tokudb_auto_analyze=0;
INSERT INTO t1 VALUES(0,0,0), (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); INSERT INTO t1 VALUES(0,0,0), (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5);
...@@ -6,3 +7,4 @@ SELECT * FROM t1 WHERE b = 2; ...@@ -6,3 +7,4 @@ SELECT * FROM t1 WHERE b = 2;
ERROR HY000: Index for table 't1' is corrupt; try to repair it ERROR HY000: Index for table 't1' is corrupt; try to repair it
DROP TABLE t1; DROP TABLE t1;
FOUND 1 /ha_tokudb::read_full_row on table/ in tokudb.bugs.PS-3773.log FOUND 1 /ha_tokudb::read_full_row on table/ in tokudb.bugs.PS-3773.log
# restart
...@@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE = 'tokudb'; ...@@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE = 'tokudb';
DROP TABLE IF EXISTS foo,bar; DROP TABLE IF EXISTS foo,bar;
create table foo (a int, b int); create table foo (a int, b int);
create table bar (a int, key(a)); create table bar (a int, key(a));
# restart
show create table foo; show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
......
...@@ -5,6 +5,7 @@ create table foo (a bigint, b bigint); ...@@ -5,6 +5,7 @@ create table foo (a bigint, b bigint);
create table bar (a int); create table bar (a int);
alter table foo drop column a; alter table foo drop column a;
alter table bar add column b int, add column c int; alter table bar add column b int, add column c int;
# restart
show create table foo; show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
......
...@@ -4,6 +4,7 @@ create table foo (a int, b int, key(b,a), primary key (a))engine=TokuDB; ...@@ -4,6 +4,7 @@ create table foo (a int, b int, key(b,a), primary key (a))engine=TokuDB;
create table bar (a bigint)engine=TokuDB; create table bar (a bigint)engine=TokuDB;
alter table foo drop index b; alter table foo drop index b;
alter table bar add index (a); alter table bar add index (a);
# restart
show create table foo; show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment