summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2022-10-07 00:42:55 +0300
committerAleksey Midenkov <midenok@gmail.com>2022-10-07 00:42:55 +0300
commit74fe1c44aa118fe6a0a86be0f0d236af25853b27 (patch)
tree44759504c4978a841cda7e711f26c532934043bf /mysql-test
parent5e66b63d954d68aac4543f272b102d5f43642c44 (diff)
parent37a86b933e8fc2489b32dff40e7e47d4d5c679ba (diff)
downloadmariadb-git-74fe1c44aa118fe6a0a86be0f0d236af25853b27.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/create_or_replace.result9
-rw-r--r--mysql-test/main/create_or_replace.test12
-rw-r--r--mysql-test/main/partition_alter.result11
-rw-r--r--mysql-test/main/partition_alter.test11
4 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index 0d2d0b05d40..bdd4c55738e 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -566,4 +566,13 @@ SELECT * FROM t3;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t3;
+#
+# MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
+# upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
+#
+CREATE TABLE t (a INT) ENGINE=MyISAM;
+CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
+CREATE OR REPLACE TABLE t LIKE tm;
+ERROR HY000: Table 'tm' is specified twice, both as a target for 'CREATE' and as a separate source for data
+DROP TABLE IF EXISTS tm, t;
# End of 10.4 tests
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test
index 2b6f2ae4005..978296a4ea4 100644
--- a/mysql-test/main/create_or_replace.test
+++ b/mysql-test/main/create_or_replace.test
@@ -507,4 +507,16 @@ SELECT * FROM t3;
UNLOCK TABLES;
DROP TABLE t3;
+--echo #
+--echo # MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
+--echo # upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
+--echo #
+CREATE TABLE t (a INT) ENGINE=MyISAM;
+CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
+--error ER_UPDATE_TABLE_USED
+CREATE OR REPLACE TABLE t LIKE tm;
+
+# Cleanup
+DROP TABLE IF EXISTS tm, t;
+
--echo # End of 10.4 tests
diff --git a/mysql-test/main/partition_alter.result b/mysql-test/main/partition_alter.result
index 18142b63d10..2b0a09d2653 100644
--- a/mysql-test/main/partition_alter.result
+++ b/mysql-test/main/partition_alter.result
@@ -200,4 +200,15 @@ pk
2
delete from t1;
drop table t1;
+#
+# MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table
+#
+create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2));
+insert into t values (0, 1), (2, 2);
+alter table t change b f int, change a b int, algorithm=nocopy;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+delete from t order by b limit 1;
+drop table t;
# End of 10.3 tests
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index cca25d0989f..ded6fde4794 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -192,4 +192,15 @@ select * from t1 partition(p1);
delete from t1;
drop table t1;
+--echo #
+--echo # MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table
+--echo #
+create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2));
+insert into t values (0, 1), (2, 2);
+alter table t change b f int, change a b int, algorithm=nocopy;
+check table t;
+delete from t order by b limit 1;
+# cleanup
+drop table t;
+
--echo # End of 10.3 tests