summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/quick_select_4161.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/quick_select_4161.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/main/quick_select_4161.test')
-rw-r--r--mysql-test/main/quick_select_4161.test54
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/main/quick_select_4161.test b/mysql-test/main/quick_select_4161.test
new file mode 100644
index 00000000..87323087
--- /dev/null
+++ b/mysql-test/main/quick_select_4161.test
@@ -0,0 +1,54 @@
+#
+# MDEV-4161 Assertion `status_var.memory_used == 0' fails in virtual THD::~THD()
+#
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (
+ event_date date DEFAULT '0000-00-00' NOT NULL,
+ type int(11) DEFAULT '0' NOT NULL,
+ event_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (event_date,type,event_id)
+);
+
+INSERT INTO t1 VALUES ('1999-07-10',100100,24), ('1999-07-11',100100,25),
+('1999-07-13',100600,0), ('1999-07-13',100600,4), ('1999-07-13',100600,26),
+('1999-07-14',100600,10), ('1999-07-15',100600,16), ('1999-07-15',100800,45),
+('1999-07-15',101000,47), ('1999-07-16',100800,46), ('1999-07-20',100600,5),
+('1999-07-20',100600,27), ('1999-07-21',100600,11), ('1999-07-22',100600,17),
+('1999-07-23',100100,39), ('1999-07-24',100100,39), ('1999-07-24',100500,40),
+('1999-07-25',100100,39), ('1999-07-27',100600,1), ('1999-07-27',100600,6),
+('1999-07-27',100600,28), ('1999-07-28',100600,12), ('1999-07-29',100500,41),
+('1999-07-29',100600,18), ('1999-07-30',100500,41), ('1999-07-31',100500,41),
+('1999-08-01',100700,34), ('1999-08-03',100600,7), ('1999-08-03',100600,29),
+('1999-08-04',100600,13), ('1999-08-05',100500,42), ('1999-08-05',100600,19),
+('1999-08-06',100500,42), ('1999-08-07',100500,42), ('1999-08-08',100500,42),
+('1999-08-10',100600,2), ('1999-08-10',100600,9), ('1999-08-10',100600,30),
+('1999-08-11',100600,14), ('1999-08-12',100600,20), ('1999-08-17',100500,8),
+('1999-08-17',100600,31), ('1999-08-18',100600,15), ('1999-08-19',100600,22),
+('1999-08-24',100600,3), ('1999-08-24',100600,32), ('1999-08-27',100500,43),
+('1999-08-31',100600,33), ('1999-09-17',100100,37), ('1999-09-18',100100,37),
+('1999-09-19',100100,37), ('2000-12-18',100700,38);
+
+connect (killee, localhost, root);
+
+let $id=`select connection_id()`;
+
+set debug_sync='inside_make_join_statistics signal killme wait_for done';
+send select event_date,type,event_id from t1 WHERE event_date >= "1999-07-01" AND event_date < "1999-07-15" AND (type=100600 OR type=100100) ORDER BY event_date;
+
+connection default;
+set debug_sync='now wait_for killme';
+--replace_result $id %connection%
+eval kill $id;
+set debug_sync='now signal done';
+
+connection killee;
+--error 1053,1927,2006,2013
+reap;
+
+connection default;
+disconnect killee;
+
+drop table t1;
+set debug_sync='reset';
+