summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/stat_tables-enospc.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/stat_tables-enospc.test
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/stat_tables-enospc.test')
-rw-r--r--mysql-test/main/stat_tables-enospc.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/main/stat_tables-enospc.test b/mysql-test/main/stat_tables-enospc.test
new file mode 100644
index 00000000..fe8fe359
--- /dev/null
+++ b/mysql-test/main/stat_tables-enospc.test
@@ -0,0 +1,25 @@
+#
+# MDEV-6181 EITS could eat all tmpdir space and hang
+#
+# test that ANALYZE TABLE is immediately aborted when going out of disk space
+--source include/have_debug.inc
+
+call mtr.add_suppression("No space left on device");
+create table t1 (a varchar(255), b varchar(255), c varchar(255));
+--disable_query_log
+let $i=10000;
+while ($i) {
+ insert t1 values (repeat(format(rand(),10), 20),
+ repeat(format(rand(),10), 20),
+ repeat(format(rand(),10), 20));
+ dec $i;
+}
+--enable_query_log
+set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
+SET @saved_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,simulate_file_write_error';
+set @@max_heap_table_size=128*1024;
+--replace_regex /'.*'/'tmp-file'/
+analyze table t1;
+SET debug_dbug= @saved_dbug;
+drop table t1;