summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-09-06 11:53:10 +0200
committerSergei Golubchik <serg@mariadb.org>2019-09-06 11:53:10 +0200
commit244f0e6dd815b388282c15db4fe7f15533f4c8fc (patch)
treeaf138f2b3739a742c0c38173cdc86ec176fc0edd /mysql-test/suite/innodb
parent18af13b88ba580562981a190c25da128a2e9db26 (diff)
parent2842c369851a8afc2a944ce6f4f60fa052f20969 (diff)
downloadmariadb-git-244f0e6dd815b388282c15db4fe7f15533f4c8fc.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev7046.result4
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_charset.result4
-rw-r--r--mysql-test/suite/innodb/r/recovery_shutdown.result8
-rw-r--r--mysql-test/suite/innodb/r/trx_id_future.result3
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-fkcheck.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb-system-table-view.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt1
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_charset.test4
-rw-r--r--mysql-test/suite/innodb/t/log_alter_table.opt1
-rw-r--r--mysql-test/suite/innodb/t/recovery_shutdown.test15
-rw-r--r--mysql-test/suite/innodb/t/trx_id_future.test7
18 files changed, 66 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 0015882690e..288b6bb835d 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -177,7 +177,7 @@ SET FOREIGN_KEY_CHECKS=1;
# MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE DATABASE best;
+CREATE DATABASE best default character set latin1;
CREATE TABLE t3 (a INT PRIMARY KEY,
CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB;
CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b),
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 56f80a4de3e..f5cb95b7cf2 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -953,6 +953,7 @@ DROP TABLE t1, parent;
#BUG#21514135 SCHEMA MISMATCH ERROR WHEN IMPORTING TABLESPACE AFTER
#DROPPING AN INDEX
#
+SET NAMES utf8mb4;
CREATE DATABASE source_db;
CREATE DATABASE dest_db;
CREATE TABLE source_db.t1 (
diff --git a/mysql-test/suite/innodb/r/innodb-mdev7046.result b/mysql-test/suite/innodb/r/innodb-mdev7046.result
index d00491fd7e5..08f0ac24f9c 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev7046.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev7046.result
@@ -1 +1,3 @@
-1
+show create database test;
+Database Create Database
+test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
diff --git a/mysql-test/suite/innodb/r/instant_alter_charset.result b/mysql-test/suite/innodb/r/instant_alter_charset.result
index be15b02a8c6..f8c21978327 100644
--- a/mysql-test/suite/innodb/r/instant_alter_charset.result
+++ b/mysql-test/suite/innodb/r/instant_alter_charset.result
@@ -50,7 +50,7 @@ drop table supported_types;
create table various_cases (
a char(150) charset ascii,
b varchar(150) as (a) virtual,
-c varchar(150) as (a) persistent
+c char(150) as (a) persistent
) engine=innodb;
alter table various_cases
change a a char(150) charset ascii collate ascii_bin,
@@ -63,7 +63,7 @@ alter table various_cases
change b b varchar(150) as (a) virtual,
algorithm=inplace;
alter table various_cases
-change c c varchar(150) as (a) persistent,
+change c c char(150) as (a) persistent,
algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
alter table various_cases
diff --git a/mysql-test/suite/innodb/r/recovery_shutdown.result b/mysql-test/suite/innodb/r/recovery_shutdown.result
index b21beecc24b..dc785d580fe 100644
--- a/mysql-test/suite/innodb/r/recovery_shutdown.result
+++ b/mysql-test/suite/innodb/r/recovery_shutdown.result
@@ -1,4 +1,5 @@
FLUSH TABLES;
+call mtr.add_suppression("Found 1 prepared XA transactions");
#
# MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
# while rolling back recovered incomplete transactions
@@ -8,10 +9,12 @@ BEGIN;
COMMIT;
connect con$c,localhost,root,,;
CREATE TABLE t8 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
-BEGIN;
+XA START 'x';
INSERT INTO t8 (a) SELECT NULL FROM t;
UPDATE t8 SET a=a+100, b=a;
DELETE FROM t8;
+XA END 'x';
+XA PREPARE 'x';
connect con$c,localhost,root,,;
CREATE TABLE t7 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
BEGIN;
@@ -65,5 +68,8 @@ CREATE TABLE u(a SERIAL) ENGINE=INNODB;
FLUSH TABLES;
# restart
# restart
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 1 0 x
# restart
DROP TABLE t,u;
diff --git a/mysql-test/suite/innodb/r/trx_id_future.result b/mysql-test/suite/innodb/r/trx_id_future.result
index 17b76b4b1c1..1ddc0e64f8b 100644
--- a/mysql-test/suite/innodb/r/trx_id_future.result
+++ b/mysql-test/suite/innodb/r/trx_id_future.result
@@ -8,8 +8,11 @@ INSERT INTO t1 VALUES(1);
InnoDB 0 transactions not purged
NOT FOUND /\[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum/ in mysqld.1.err
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+SET @save_count = @@max_error_count;
+SET max_error_count = 1;
SELECT * FROM t1;
a
Warnings:
Warning 1642 InnoDB: Transaction id in a record of table `test`.`t1` is newer than system-wide maximum.
+SET max_error_count = @save_count;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index e7ba5530b19..06cab983656 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/count_sessions.inc
+--source include/default_charset.inc
--echo #
--echo # Bug #19027905 ASSERT RET.SECOND DICT_CREATE_FOREIGN_CONSTRAINTS_LOW
@@ -155,7 +156,7 @@ call mtr.add_suppression("InnoDB: Cannot delete/update rows with cascading forei
--enable_query_log
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE DATABASE best;
+CREATE DATABASE best default character set latin1;
CREATE TABLE t3 (a INT PRIMARY KEY,
CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB;
CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b),
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index 961d8653e90..d383b3bf55e 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/default_charset.inc
SET NAMES utf8mb4;
@@ -585,6 +586,9 @@ DROP TABLE t1, parent;
let $source_db = source_db;
let $dest_db = dest_db;
+--source include/default_charset.inc
+SET NAMES utf8mb4;
+
eval CREATE DATABASE $source_db;
eval CREATE DATABASE $dest_db;
diff --git a/mysql-test/suite/innodb/t/innodb-fkcheck.test b/mysql-test/suite/innodb/t/innodb-fkcheck.test
index 51e36ae6984..4657edc4d65 100644
--- a/mysql-test/suite/innodb/t/innodb-fkcheck.test
+++ b/mysql-test/suite/innodb/t/innodb-fkcheck.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/default_charset.inc
#
# MDEV-10083: Orphan ibd file when playing with foreign keys
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 46eb7dd0273..47db92a0c6d 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -1,6 +1,7 @@
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
# need to restart server
--- source include/not_embedded.inc
+--source include/not_embedded.inc
CREATE SCHEMA `repro`;
CREATE TABLE `repro`.`crew` (
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index 4e32c13ee50..27c140689c1 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -2,6 +2,7 @@
--source include/have_partition.inc
# Test causes OS error printout
--source include/not_windows.inc
+--source include/default_charset.inc
--disable_query_log
--disable_result_log
@@ -30,7 +31,10 @@ RENAME TABLE t1 TO `t2_new..............................................end`;
show warnings;
drop table t1;
-DROP DATABASE test;CREATE DATABASE test;USE test;
+drop database test;
+create database test;
+use test;
+
SET @@session.storage_engine=MYISAM;
--error 0,1,1103
CREATE TABLE t1(id INT,purchased DATE)PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY='/tmp/not-existing' INDEX DIRECTORY='/tmp/not-existing',SUBPARTITION sp1));
@@ -40,9 +44,12 @@ ALTER TABLE t1 ENGINE=InnoDB;
drop table t1;
+drop database test;
+create database test;
+use test;
+
--enable_query_log
--enable_result_log
--enable_warnings
-# make sure that we have at least some ouput to avoid mtr warning
---echo 1
+show create database test;
diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.opt b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
index b5a61b9ec4b..4d6858cbe0b 100644
--- a/mysql-test/suite/innodb/t/innodb-system-table-view.opt
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
@@ -8,3 +8,5 @@
--innodb-sys-fields
--innodb-sys-foreign
--innodb-sys-foreign-cols
+--character_set_server="latin1"
+--collation_server="latin1_swedish_ci"
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index fb0fe8fccd1..b223113b6ff 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -13,7 +13,8 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/default_charset.inc
let $restart_noprint=2;
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt
new file mode 100644
index 00000000000..c61abdefbdb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.opt
@@ -0,0 +1 @@
+--innodb-log-optimize-ddl \ No newline at end of file
diff --git a/mysql-test/suite/innodb/t/instant_alter_charset.test b/mysql-test/suite/innodb/t/instant_alter_charset.test
index b6e45cb6924..82ae1040f57 100644
--- a/mysql-test/suite/innodb/t/instant_alter_charset.test
+++ b/mysql-test/suite/innodb/t/instant_alter_charset.test
@@ -52,7 +52,7 @@ drop table supported_types;
create table various_cases (
a char(150) charset ascii,
b varchar(150) as (a) virtual,
- c varchar(150) as (a) persistent
+ c char(150) as (a) persistent
) engine=innodb;
alter table various_cases
@@ -70,7 +70,7 @@ alter table various_cases
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table various_cases
- change c c varchar(150) as (a) persistent,
+ change c c char(150) as (a) persistent,
algorithm=inplace;
# Can not grow storage in bytes from CHAR
diff --git a/mysql-test/suite/innodb/t/log_alter_table.opt b/mysql-test/suite/innodb/t/log_alter_table.opt
new file mode 100644
index 00000000000..ef236fcec40
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_alter_table.opt
@@ -0,0 +1 @@
+--innodb-log-optimize-ddl
diff --git a/mysql-test/suite/innodb/t/recovery_shutdown.test b/mysql-test/suite/innodb/t/recovery_shutdown.test
index 3bd01653065..d72e785f21d 100644
--- a/mysql-test/suite/innodb/t/recovery_shutdown.test
+++ b/mysql-test/suite/innodb/t/recovery_shutdown.test
@@ -3,6 +3,7 @@
# Flush any open myisam tables from previous tests
FLUSH TABLES;
+call mtr.add_suppression("Found 1 prepared XA transactions");
--echo #
--echo # MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
@@ -23,6 +24,15 @@ dec $c;
COMMIT;
let $c = $trx;
+connect (con$c,localhost,root,,);
+eval CREATE TABLE t$c (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
+XA START 'x';
+eval INSERT INTO t$c (a) SELECT NULL FROM t;
+eval UPDATE t$c SET a=a+$size, b=a;
+eval DELETE FROM t$c;
+XA END 'x';
+XA PREPARE 'x';
+dec $c;
while ($c)
{
connect (con$c,localhost,root,,);
@@ -53,12 +63,17 @@ FLUSH TABLES;
# Perform a slow shutdown in order to roll back all recovered transactions
# and to avoid locking conflicts with the DROP TABLE below.
+XA RECOVER;
--disable_query_log
SET GLOBAL innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
--disable_query_log
let $c = $trx;
+disconnect con$c;
+XA ROLLBACK 'x';
+eval DROP TABLE t$c;
+dec $c;
while ($c)
{
disconnect con$c;
diff --git a/mysql-test/suite/innodb/t/trx_id_future.test b/mysql-test/suite/innodb/t/trx_id_future.test
index 391650c13d4..b897800fa91 100644
--- a/mysql-test/suite/innodb/t/trx_id_future.test
+++ b/mysql-test/suite/innodb/t/trx_id_future.test
@@ -3,7 +3,6 @@
--echo # IN THE FUTURE
--echo #
---source include/not_debug.inc
--source include/have_innodb.inc
--source include/not_embedded.inc
@@ -58,6 +57,8 @@ syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
EOF
+# Debug assertions would fail due to the injected corruption.
+--let $restart_parameters= --loose-skip-debug-assert
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
@@ -66,5 +67,9 @@ let SEARCH_PATTERN= \[Warning\] InnoDB: A transaction id in a record of table `t
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+# A debug assertion would cause a duplicated message to be output.
+SET @save_count = @@max_error_count;
+SET max_error_count = 1;
SELECT * FROM t1;
+SET max_error_count = @save_count;
DROP TABLE t1;