summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t')
-rw-r--r--mysql-test/suite/innodb/t/alter_key_block_size-11757.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k-crash.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k-crash.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-blob.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14676111.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53756.test61
9 files changed, 41 insertions, 93 deletions
diff --git a/mysql-test/suite/innodb/t/alter_key_block_size-11757.test b/mysql-test/suite/innodb/t/alter_key_block_size-11757.test
new file mode 100644
index 00000000000..c11da6e8cc5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_key_block_size-11757.test
@@ -0,0 +1,25 @@
+#
+# MDEV-11757 KEY_BLOCK_SIZE strangeness when UNCOMPRESSing COMPRESSed InnoDB tables
+#
+source include/have_innodb.inc;
+
+create table t1 (
+ id1 bigint(20) not null,
+ id2 bigint(20) not null,
+ primary key (id1),
+ unique key id2 (id2)
+) engine=innodb row_format=compressed key_block_size=8;
+show create table t1;
+SET innodb_strict_mode=ON;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+alter table t1 row_format=dynamic;
+SET innodb_strict_mode=OFF;
+alter table t1 row_format=dynamic;
+show create table t1;
+SET innodb_strict_mode=ON;
+alter table t1 key_block_size=0;
+show create table t1;
+alter table t1 drop primary key, add primary key (id1),
+ drop key id2, add unique (id2);
+show create table t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test
index 42d2b5adc9f..c77e44ce9d6 100644
--- a/mysql-test/suite/innodb/t/innodb-32k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test
@@ -139,6 +139,7 @@ UPDATE t2 SET qa=@l,ra=@l,sa=@l,ta=@l,ua=@l;
UPDATE t2 SET va=@l,wa=@l,xa=@l,ya=@l,za=@l;
COMMIT;
+BEGIN;
INSERT INTO t1 SELECT * from t2;
BEGIN;
diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test
index 39fbf974efe..78f14d539a5 100644
--- a/mysql-test/suite/innodb/t/innodb-64k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test
@@ -299,6 +299,7 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@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,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
+
--source include/kill_and_restart_mysqld.inc
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test
index c1f9ee5992f..ea50af4a7fc 100644
--- a/mysql-test/suite/innodb/t/innodb-blob.test
+++ b/mysql-test/suite/innodb/t/innodb-blob.test
@@ -9,12 +9,8 @@
# DEBUG_SYNC must be compiled in.
--source include/have_debug_sync.inc
-# Valgrind would complain about memory leaks when we crash on purpose.
---source include/not_valgrind.inc
-# Embedded server does not support crashing
+# Embedded server does not support restarting
--source include/not_embedded.inc
-# Avoid CrashReporter popup on Mac
---source include/not_crashrep.inc
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
@@ -71,12 +67,11 @@ SELECT a, RIGHT(b,20) FROM t1;
SELECT a FROM t1;
# Request a crash, and restart the server.
-SET DEBUG='+d,crash_commit_before';
-# Write file to make mysql-test-run.pl restart the server
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---error 2013
+BEGIN;
INSERT INTO t2 VALUES (42);
+--source include/kill_and_restart_mysqld.inc
+
disconnect con1;
disconnect con2;
connection default;
@@ -143,12 +138,7 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch';
SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
-# Request a crash, and restart the server.
-SET DEBUG='+d,crash_commit_before';
-# Write file to make mysql-test-run.pl restart the server
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---error 2013
-COMMIT;
+--source include/kill_and_restart_mysqld.inc
disconnect con2;
connection default;
@@ -187,12 +177,7 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch';
SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
-# Request a crash, and restart the server.
-SET DEBUG='+d,crash_commit_before';
-# Write file to make mysql-test-run.pl restart the server
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---error 2013
-COMMIT;
+--source include/kill_and_restart_mysqld.inc
disconnect con2;
connection default;
@@ -203,7 +188,6 @@ reap;
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
-
CHECK TABLE t1,t2,t3;
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
SELECT a FROM t3;
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 3e330ffeda3..339a7968623 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -33,10 +33,11 @@ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repr
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";
---echo # Restart mysqld --innodb_read_only=1
--- let $restart_parameters=--innodb-read-only=1
+-- let $restart_parameters=--innodb-read-only
-- source include/restart_mysqld.inc
+--error ER_OPEN_AS_READONLY
+ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
-- let $restart_parameters=
@@ -45,8 +46,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`;
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
---echo # Restart mysqld --innodb_read_only=1
--- let $restart_parameters=--innodb-read-only=1
+-- let $restart_parameters=--innodb-read-only
-- source include/restart_mysqld.inc
#
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index b57ac62e1d8..68c5d3000cb 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -33,9 +33,7 @@ let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/;
let $strerrfix=/ (\(.+\))//;
SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-DROP DATABASE IF EXISTS test_wl5522;
CREATE DATABASE test_wl5522;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB;
@@ -68,7 +66,6 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
# Create the table that we will use for crash recovery (during IMPORT)
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index c73571af6dd..c848d24294d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -22,7 +22,6 @@ CALL mtr.add_suppression("\\[ERROR\\] \\[FATAL\\] InnoDB: Unable to read page \\
CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Database page corruption on disk or a failed");
--enable_query_log
-
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
@@ -94,8 +93,5 @@ SLEEP 1;
--source include/start_mysqld.inc
-# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
-# because the session information is lost after server restart
-
--echo # Cleanup
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14676111.test b/mysql-test/suite/innodb/t/innodb_bug14676111.test
index d8b78394cc2..3abc574a8d2 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14676111.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14676111.test
@@ -82,7 +82,7 @@ select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME
#
#disable the artificial limitation of records in a page
-set global innodb_limit_optimistic_insert_debug = 0;
+set global innodb_limit_optimistic_insert_debug = 10000;
--connection con2
rollback;
--disconnect con2
@@ -117,7 +117,6 @@ insert into t1 values (2);
#current tree form
# (1)
# (1, 2, 3) <- lift up this level next, because the father is root
-
rollback;
#current tree form
# (1, 3)
diff --git a/mysql-test/suite/innodb/t/innodb_bug53756.test b/mysql-test/suite/innodb/t/innodb_bug53756.test
index 4aee0f87746..d6bccf70147 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53756.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53756.test
@@ -6,24 +6,8 @@
# metadata in the function dict_load_table_on_id() during crash recovery.
#
-# innobackup needs to connect to the server. Not supported in embedded.
+# The embedded server test does not support restarting.
--source include/not_embedded.inc
-#
-# This test case needs to crash the server. Needs a debug server.
---source include/have_debug.inc
-#
-# Don't test this under valgrind, memory leaks will occur.
---source include/not_valgrind.inc
-
-# Avoid CrashReporter popup on Mac
---source include/not_crashrep.inc
-
-#
-# Precautionary clean up.
-#
---disable_warnings
-DROP TABLE IF EXISTS bug_53756 ;
---enable_warnings
#
# Create test data.
@@ -34,9 +18,6 @@ INSERT INTO bug_53756 VALUES(1, 11), (2, 22), (3, 33), (4, 44);
--echo
--echo # Select a less restrictive isolation level.
-# Don't use user variables. They won't survive server crash.
---let $global_isolation= `SELECT @@global.tx_isolation`
---let $session_isolation= `SELECT @@session.tx_isolation`
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
COMMIT;
@@ -100,45 +81,16 @@ ROLLBACK;
--connection default
SELECT * FROM bug_53756;
---connection default
---echo #
---echo # Crash server.
-#
-# Write file to make mysql-test-run.pl expect the "crash", but don't start
-# it until it's told to
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-#
START TRANSACTION;
INSERT INTO bug_53756 VALUES (666,666);
-#
-# Request a crash on next execution of commit.
-SET SESSION debug_dbug="+d,crash_commit_before";
-#
-# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-#
-# Execute the statement that causes the crash.
---error 2013
-COMMIT;
---echo
+
+--source include/kill_and_restart_mysqld.inc
--disconnect con1
--disconnect con2
--disconnect con3
--disconnect con4
--disconnect con5
--disconnect con6
---echo #
---echo # Restart server.
-#
-# Turn on reconnect
---enable_reconnect
-#
-# Call script that will poll the server waiting for it to be back online again
---source include/wait_until_connected_again.inc
-#
-# Turn off reconnect again
---disable_reconnect
---echo
--echo #
--echo # Select recovered data.
@@ -149,11 +101,4 @@ COMMIT;
--echo # Delete of row 2 and insert of row 5 should be rolled back
SELECT * FROM bug_53756;
---echo
---echo # Clean up.
DROP TABLE bug_53756;
-
---disable_query_log
-eval SET GLOBAL tx_isolation= '$global_isolation';
-eval SET SESSION tx_isolation= '$session_isolation';
---enable_query_log