diff options
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result | 23 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/xa_recovery.result | 17 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/foreign-keys.test | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-autoinc.test | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test | 55 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/insert_debug.test | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/sp_temp_table.test | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/strict_mode.test | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/xa_recovery.test | 47 |
9 files changed, 142 insertions, 25 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result b/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result new file mode 100644 index 00000000000..9f6b7ca6a23 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result @@ -0,0 +1,23 @@ +call mtr.add_suppression("InnoDB: The total blob data length"); +SET GLOBAL max_allowed_packet = 100*1024*1024; +# Connection big_packets: +CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB; +INSERT INTO t1 (a, b) VALUES (1, '1'); +INSERT INTO t1 (a, b) VALUES (2, '2'); +INSERT INTO t1 (a, b) VALUES (3, '3'); +INSERT INTO t1 (a, b) VALUES (4, '4'); +INSERT INTO t1 (a, b) VALUES (5, '5'); +start transaction; +INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024)); +ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size. +# Connection default: +# Quick shutdown and restart server +# Connection default: +SELECT a FROM t1; +a +1 +2 +3 +4 +5 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result new file mode 100644 index 00000000000..84cb37ef7c9 --- /dev/null +++ b/mysql-test/suite/innodb/r/xa_recovery.result @@ -0,0 +1,17 @@ +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +XA START 'x'; +UPDATE t1 set a=2; +XA END 'x'; +XA PREPARE 'x'; +call mtr.add_suppression("Found 1 prepared XA transactions"); +SELECT * FROM t1 LOCK IN SHARE MODE; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +a +2 +XA ROLLBACK 'x'; +SELECT * FROM t1; +a +1 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index 8ee96347208..2d586e2d6be 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -1,11 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc -if (`select plugin_auth_version <= "5.5.39-MariaDB-36.0" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in XtraDB as of 5.5.39-MariaDB-36.0 or earlier -} - --echo # --echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE --echo # ADD FOREIGN KEY diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index 415ada2939a..ffe4ac9c3ae 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -1,8 +1,3 @@ -if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier -} - --source include/have_innodb.inc # embedded server ignores 'delayed', so skip this -- source include/not_embedded.inc diff --git a/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test b/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test new file mode 100644 index 00000000000..16fb570737d --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test @@ -0,0 +1,55 @@ +--source include/not_embedded.inc +--source include/not_crashrep.inc +--source include/have_innodb.inc + +call mtr.add_suppression("InnoDB: The total blob data length"); + +let $old_max_allowed_packet = `select @@max_allowed_packet`; +SET GLOBAL max_allowed_packet = 100*1024*1024; + +--echo # Connection big_packets: +connect(big_packets,localhost,root,,); +connection big_packets; + +CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB; + +# Insert a few rows (it doesn't really matter how many). These transactions +# are committed once they are acked, so they should not be lost. +INSERT INTO t1 (a, b) VALUES (1, '1'); +INSERT INTO t1 (a, b) VALUES (2, '2'); +INSERT INTO t1 (a, b) VALUES (3, '3'); +INSERT INTO t1 (a, b) VALUES (4, '4'); +INSERT INTO t1 (a, b) VALUES (5, '5'); + +# The BLOB insert will fail, and should disappear. However all data committed +# up to this point should not be lost. +start transaction; +--replace_regex /\(> [0-9]*\)/(> ####)/ +--error ER_TOO_BIG_ROWSIZE +INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024)); + +--echo # Connection default: +connection default; + +# We expect a restart. +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + +--echo # Quick shutdown and restart server +--shutdown_server 0 + +# Wait for the server to come back up, and reconnect. +--enable_reconnect +--source include/wait_until_connected_again.inc + +--echo # Connection default: +connection default; + +# We should see (1,2,3,4,5) here. +SELECT a FROM t1; + +# Clean up. +DROP TABLE t1; + +--disable_query_log +eval set global max_allowed_packet = $old_max_allowed_packet; +--enable_query_log diff --git a/mysql-test/suite/innodb/t/insert_debug.test b/mysql-test/suite/innodb/t/insert_debug.test index 666b634bef9..36ceba2ee8b 100644 --- a/mysql-test/suite/innodb/t/insert_debug.test +++ b/mysql-test/suite/innodb/t/insert_debug.test @@ -2,11 +2,6 @@ --source include/have_debug.inc --source include/have_partition.inc -if (`select plugin_auth_version < "5.6.22" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB/XtraDB as of 5.6.21 or earlier -} - --echo # --echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 --echo # CAUSES INFINITE PAGE SPLIT diff --git a/mysql-test/suite/innodb/t/sp_temp_table.test b/mysql-test/suite/innodb/t/sp_temp_table.test index 9a6be85fd7e..b2883f551b9 100644 --- a/mysql-test/suite/innodb/t/sp_temp_table.test +++ b/mysql-test/suite/innodb/t/sp_temp_table.test @@ -1,11 +1,6 @@ --source include/have_innodb.inc --source include/big_test.inc -if (`select plugin_auth_version < "5.6.22" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB/XtraDB as of 5.6.21 or earlier -} - --echo # --echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE --echo # CALLED FROM A FUNCTION diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test index 9b115091f84..86b56a09c0e 100644 --- a/mysql-test/suite/innodb/t/strict_mode.test +++ b/mysql-test/suite/innodb/t/strict_mode.test @@ -1,10 +1,5 @@ --source include/have_innodb.inc -if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier -} - --echo # --echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN --echo # INNODB_STRICT_MODE = 1 diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test new file mode 100644 index 00000000000..837b33cb3c4 --- /dev/null +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -0,0 +1,47 @@ +if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in InnoDB as of 5.6.24 or earlier +} +--source include/have_innodb.inc +# Embedded server does not support restarting. +--source include/not_embedded.inc + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +connect (con1,localhost,root); +XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; +connection default; + +call mtr.add_suppression("Found 1 prepared XA transactions"); + +# Kill and restart the server. +-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- shutdown_server 0 +-- source include/wait_until_disconnected.inc + +-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- enable_reconnect +-- source include/wait_until_connected_again.inc +-- disable_reconnect + +disconnect con1; +connect (con1,localhost,root); +--send SELECT * FROM t1 LOCK IN SHARE MODE + +connection default; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = 'Sending data' and + info = 'SELECT * FROM t1 LOCK IN SHARE MODE'; +--source include/wait_condition.inc + +--source include/restart_mysqld.inc + +disconnect con1; + +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +XA ROLLBACK 'x'; +SELECT * FROM t1; + +DROP TABLE t1; |