summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-08-31 09:22:21 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-08-31 09:22:21 +0300
commit04647611260a77041186ace12f96b05d50bed4da (patch)
tree3f8efa00ae2fa2bc6be5165658c34c79c9437a3f /mysql-test/suite
parentdc6bc85cd29586631d927036451d955c7013206c (diff)
parente835cc851e389770219a33037af65db8887cc9a8 (diff)
downloadmariadb-git-04647611260a77041186ace12f96b05d50bed4da.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/maria/repair.result7
-rw-r--r--mysql-test/suite/maria/repair.test2
-rw-r--r--mysql-test/suite/sql_sequence/default.result10
-rw-r--r--mysql-test/suite/sql_sequence/default.test12
4 files changed, 24 insertions, 7 deletions
diff --git a/mysql-test/suite/maria/repair.result b/mysql-test/suite/maria/repair.result
index 296f251aa36..722d9f28712 100644
--- a/mysql-test/suite/maria/repair.result
+++ b/mysql-test/suite/maria/repair.result
@@ -29,12 +29,5 @@ CREATE TABLE t1 (i INT) ENGINE=Aria;
INSERT INTO t1 VALUES (1);
SET max_session_mem_used=50000;
REPAIR LOCAL TABLE t1 USE_FRM;
-Table Op Msg_type Msg_text
-t1 repair error Failed to open partially repaired table
-Warnings:
-Error 1290 The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
REPAIR LOCAL TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 repair Error The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
-test.t1 repair error Corrupt
DROP TABLE t1;
diff --git a/mysql-test/suite/maria/repair.test b/mysql-test/suite/maria/repair.test
index 13165269b76..571f861c512 100644
--- a/mysql-test/suite/maria/repair.test
+++ b/mysql-test/suite/maria/repair.test
@@ -36,6 +36,8 @@ DROP TABLE t1;
CREATE TABLE t1 (i INT) ENGINE=Aria;
INSERT INTO t1 VALUES (1);
SET max_session_mem_used=50000;
+--disable_result_log
REPAIR LOCAL TABLE t1 USE_FRM;
REPAIR LOCAL TABLE t1;
+--enable_result_log
DROP TABLE t1;
diff --git a/mysql-test/suite/sql_sequence/default.result b/mysql-test/suite/sql_sequence/default.result
index 37d536d9020..2f048c9e4e2 100644
--- a/mysql-test/suite/sql_sequence/default.result
+++ b/mysql-test/suite/sql_sequence/default.result
@@ -185,3 +185,13 @@ ALTER TABLE t1 add column d int default next value for s_not_exits;
ERROR 42S02: Table 'test.s_not_exits' doesn't exist
drop table t1;
drop sequence s1;
+#
+# MDEV 22785 Crash with prepared statements and NEXTVAL()
+#
+CREATE SEQUENCE s;
+CREATE TABLE t1 (id int NOT NULL DEFAULT NEXTVAL(s), PRIMARY KEY (id));
+PREPARE stmt FROM " INSERT INTO t1 () values ()";
+INSERT INTO t1 () values ();
+EXECUTE stmt;
+DROP TABLE t1;
+DROP SEQUENCE s;
diff --git a/mysql-test/suite/sql_sequence/default.test b/mysql-test/suite/sql_sequence/default.test
index 017165c1a80..e7c13211013 100644
--- a/mysql-test/suite/sql_sequence/default.test
+++ b/mysql-test/suite/sql_sequence/default.test
@@ -123,3 +123,15 @@ ALTER TABLE t1 add column c int;
ALTER TABLE t1 add column d int default next value for s_not_exits;
drop table t1;
drop sequence s1;
+
+--echo #
+--echo # MDEV 22785 Crash with prepared statements and NEXTVAL()
+--echo #
+CREATE SEQUENCE s;
+CREATE TABLE t1 (id int NOT NULL DEFAULT NEXTVAL(s), PRIMARY KEY (id));
+PREPARE stmt FROM " INSERT INTO t1 () values ()";
+INSERT INTO t1 () values ();
+EXECUTE stmt;
+# Cleanup
+DROP TABLE t1;
+DROP SEQUENCE s;