summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-09-09 13:07:41 +0200
committerSergei Golubchik <serg@mariadb.org>2021-09-09 13:07:41 +0200
commitfdeaad1db923d4032f24322c237b68bcf8e9fb0e (patch)
tree04c705da059c2dbb77f284df48911e1c53544f09
parentb145fba0a81e65e4c8a52c9202e859889eb46317 (diff)
parent46cb16388a865d9561ba234011085ad2a8e42c44 (diff)
downloadmariadb-git-fdeaad1db923d4032f24322c237b68bcf8e9fb0e.tar.gz
Merge branch '10.3' into 10.4
-rw-r--r--mysql-test/main/truncate.result23
-rw-r--r--mysql-test/main/truncate.test33
-rw-r--r--mysql-test/main/truncate_notembedded.result22
-rw-r--r--mysql-test/main/truncate_notembedded.test31
4 files changed, 55 insertions, 54 deletions
diff --git a/mysql-test/main/truncate.result b/mysql-test/main/truncate.result
index 0ab921c2438..fbdc0c90c55 100644
--- a/mysql-test/main/truncate.result
+++ b/mysql-test/main/truncate.result
@@ -1,4 +1,3 @@
-drop table if exists t1, t2;
create table t1 (a integer, b integer,c1 CHAR(10));
insert into t1 (a) values (1),(2);
truncate table t1;
@@ -158,26 +157,6 @@ TRUNCATE t1;
HANDLER t1 READ FIRST;
ERROR 42S02: Unknown table 't1' in HANDLER
DROP TABLE t1;
-# End of 6.0 tests
#
-# 10.2 Test
+# End of 5.5 tests
#
-# MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
-# is_bulk_op())' failed upon killed TRUNCATE
-#
-CREATE TABLE t1 (a INT) ENGINE=MyISAM;
-LOCK TABLE t1 READ;
-connect con1,localhost,root,,test;
-SET SESSION max_session_mem_used= 65536;
-LOCK TABLE t1 WRITE;
-connection default;
-SELECT * FROM t1;
-a
-UNLOCK TABLES;
-connection con1;
-TRUNCATE TABLE t1;
-ERROR HY000: The MariaDB server is running with the --max-thread-mem-used=65536 option so it cannot execute this statement
-disconnect con1;
-connection default;
-DROP TABLE t1;
-# End of 10.2 Test
diff --git a/mysql-test/main/truncate.test b/mysql-test/main/truncate.test
index 481333e79fe..9e28deacf63 100644
--- a/mysql-test/main/truncate.test
+++ b/mysql-test/main/truncate.test
@@ -1,9 +1,6 @@
#
# Test of truncate
#
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
create table t1 (a integer, b integer,c1 CHAR(10));
insert into t1 (a) values (1),(2);
@@ -161,34 +158,6 @@ HANDLER t1 READ FIRST;
# Cleanup
DROP TABLE t1;
---echo # End of 6.0 tests
-
---echo #
---echo # 10.2 Test
--echo #
---echo # MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
---echo # is_bulk_op())' failed upon killed TRUNCATE
+--echo # End of 5.5 tests
--echo #
-
-CREATE TABLE t1 (a INT) ENGINE=MyISAM;
-LOCK TABLE t1 READ;
-
---connect (con1,localhost,root,,test)
-SET SESSION max_session_mem_used= 65536;
---send
- LOCK TABLE t1 WRITE;
-
---connection default
-SELECT * FROM t1;
-UNLOCK TABLES;
-
---connection con1
---reap
---error ER_OPTION_PREVENTS_STATEMENT
-TRUNCATE TABLE t1;
-
---disconnect con1
---connection default
-DROP TABLE t1;
-
---echo # End of 10.2 Test
diff --git a/mysql-test/main/truncate_notembedded.result b/mysql-test/main/truncate_notembedded.result
new file mode 100644
index 00000000000..18a01c684e7
--- /dev/null
+++ b/mysql-test/main/truncate_notembedded.result
@@ -0,0 +1,22 @@
+#
+# MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
+# is_bulk_op())' failed upon killed TRUNCATE
+#
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+LOCK TABLE t1 READ;
+connect con1,localhost,root,,test;
+SET SESSION max_session_mem_used= 65536;
+LOCK TABLE t1 WRITE;
+connection default;
+SELECT * FROM t1;
+a
+UNLOCK TABLES;
+connection con1;
+TRUNCATE TABLE t1;
+ERROR HY000: The MariaDB server is running with the --max-thread-mem-used=65536 option so it cannot execute this statement
+disconnect con1;
+connection default;
+DROP TABLE t1;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/main/truncate_notembedded.test b/mysql-test/main/truncate_notembedded.test
new file mode 100644
index 00000000000..7e186c8f7d5
--- /dev/null
+++ b/mysql-test/main/truncate_notembedded.test
@@ -0,0 +1,31 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
+--echo # is_bulk_op())' failed upon killed TRUNCATE
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+LOCK TABLE t1 READ;
+
+--connect (con1,localhost,root,,test)
+SET SESSION max_session_mem_used= 65536;
+--send
+ LOCK TABLE t1 WRITE;
+
+--connection default
+SELECT * FROM t1;
+UNLOCK TABLES;
+
+--connection con1
+--reap
+--error ER_OPTION_PREVENTS_STATEMENT
+TRUNCATE TABLE t1;
+
+--disconnect con1
+--connection default
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #