summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/ibuf_delete.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/suite/innodb/t/ibuf_delete.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.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/suite/innodb/t/ibuf_delete.test')
-rw-r--r--mysql-test/suite/innodb/t/ibuf_delete.test67
1 files changed, 67 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/ibuf_delete.test b/mysql-test/suite/innodb/t/ibuf_delete.test
new file mode 100644
index 00000000..82b740b6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/ibuf_delete.test
@@ -0,0 +1,67 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+SET @buffering= @@innodb_change_buffering;
+SET GLOBAL innodb_change_buffering= deletes;
+SET @flush= @@innodb_flush_log_at_trx_commit;
+SET GLOBAL innodb_flush_log_at_trx_commit= 0;
+
+CREATE TABLE t1 (
+ a varchar(1024),
+ b varchar(1024),
+ c varchar(1024),
+ d varchar(1024),
+ e varchar(1024),
+ f varchar(1024),
+ g varchar(1024),
+ h varchar(1024),
+ key (a),
+ key (b),
+ key (c),
+ key (d)
+) ENGINE=InnoDB;
+
+INSERT INTO t1
+SELECT REPEAT('x',10), REPEAT('x',13), REPEAT('x',427), REPEAT('x',244),
+REPEAT('x',9), REPEAT('x',112), REPEAT('x',814), REPEAT('x',633)
+FROM seq_1_to_1024;
+
+CREATE TEMPORARY TABLE t2 (
+ a varchar(1024),
+ b varchar(1024),
+ c varchar(1024),
+ d varchar(1024),
+ e varchar(1024),
+ f varchar(1024),
+ g varchar(1024),
+ h varchar(1024),
+ i varchar(1024),
+ j varchar(1024),
+ k varchar(1024),
+ l varchar(1024),
+ m varchar(1024),
+ key (a),
+ key (b),
+ key (c),
+ key (d),
+ key (e),
+ key (f)
+) ENGINE=InnoDB;
+
+SET @x=REPEAT('x',512);
+INSERT INTO t2 SELECT @x, @x, @x, @x, @x, @x, @x, @x, @x, @x, @x, @x, @x
+FROM seq_1_to_768;
+
+--disable_query_log
+--let $run=1024
+while ($run)
+{
+ eval DELETE FROM t1 LIMIT 1 /* $run */;
+ --dec $run
+}
+--enable_query_log
+
+# Cleanup
+DROP TABLE t1, t2;
+SET GLOBAL innodb_change_buffering= @buffering;
+SET GLOBAL innodb_flush_log_at_trx_commit= @flush;