summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/mysqldump-timing.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/mysqldump-timing.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/mysqldump-timing.test')
-rw-r--r--mysql-test/main/mysqldump-timing.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/mysqldump-timing.test b/mysql-test/main/mysqldump-timing.test
new file mode 100644
index 00000000..07305b73
--- /dev/null
+++ b/mysql-test/main/mysqldump-timing.test
@@ -0,0 +1,26 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-18702 mysqldump should use max_statement_time=0 and/or allow setting one
+--echo #
+
+CREATE DATABASE test1;
+USE test1;
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (0);
+LOCK TABLE t1 WRITE;
+--echo timeout without t1 contents expected
+--error 2
+--exec $MYSQL_DUMP --max-statement-time=1 --skip-lock-tables --skip-comments test1 t1
+SET @save_max_statement_time=@@max_statement_time;
+SET GLOBAL max_statement_time=0.1;
+--send UNLOCK TABLES;
+--echo This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
+--exec $MYSQL_DUMP --skip-lock-tables --skip-comments test1 t1
+--reap
+SET GLOBAL max_statement_time=@save_max_statement_time;
+DROP DATABASE test1;
+
+--echo #
+--echo # End of 10.3 test
+--echo #