summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/truncate_crash.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/innodb/t/truncate_crash.test
parentInitial commit. (diff)
downloadmariadb-10.5-upstream.tar.xz
mariadb-10.5-upstream.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/truncate_crash.test')
-rw-r--r--mysql-test/suite/innodb/t/truncate_crash.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/truncate_crash.test b/mysql-test/suite/innodb/t/truncate_crash.test
new file mode 100644
index 00000000..5cb39c74
--- /dev/null
+++ b/mysql-test/suite/innodb/t/truncate_crash.test
@@ -0,0 +1,23 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
+
+FLUSH TABLES;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+
+connect (wait,localhost,root,,test);
+SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever';
+send TRUNCATE TABLE t1;
+
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR c';
+--let $shutdown_timeout=0
+--source include/restart_mysqld.inc
+disconnect wait;
+
+--replace_result 2 0
+SELECT COUNT(*) FROM t1;
+TRUNCATE TABLE t1;
+DROP TABLE t1;