summaryrefslogtreecommitdiff
path: root/mysql-test/main/opt_trace_index_merge_innodb.test
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-03-27 20:48:28 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-04-03 00:32:26 +0530
commiteac97ef44c4f8185a26015e21dcb6f5faf55898a (patch)
tree2d99382831e9928de967ae8c3b32c8137a09c21f /mysql-test/main/opt_trace_index_merge_innodb.test
parent4d12a6458e96bf5e20c7109969fbd34bfd1cbaf5 (diff)
downloadmariadb-git-eac97ef44c4f8185a26015e21dcb6f5faf55898a.tar.gz
MDEV-18962: ASAN heap-buffer-overflow in Single_line_formatting_helper::on_add_str with optimizer trace
Fixed a typo
Diffstat (limited to 'mysql-test/main/opt_trace_index_merge_innodb.test')
-rw-r--r--mysql-test/main/opt_trace_index_merge_innodb.test13
1 files changed, 11 insertions, 2 deletions
diff --git a/mysql-test/main/opt_trace_index_merge_innodb.test b/mysql-test/main/opt_trace_index_merge_innodb.test
index 199c45bd7b1..42d8c57144c 100644
--- a/mysql-test/main/opt_trace_index_merge_innodb.test
+++ b/mysql-test/main/opt_trace_index_merge_innodb.test
@@ -36,10 +36,19 @@ explain select * from t1 where pk1 != 0 and key1 = 1;
select * from information_schema.OPTIMIZER_TRACE;
drop table t1;
set @@optimizer_switch= @tmp_index_merge_ror_cpk;
-set optimizer_trace="enabled=off";
-
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
+--echo #
+--echo # MDEV-18962: ASAN heap-buffer-overflow in Single_line_formatting_helper::on_add_str with optimizer trace
+--echo #
+
+CREATE TABLE t1 (a date not null, b time, key(a), key(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1991-09-09','00:00:00'),('2032-08-24','02:22:24');
+SET SESSION optimizer_trace = 'enabled=on';
+SELECT * FROM t1 WHERE b IS NULL AND a = '2000-01-01';
+DROP TABLE t1;
+
+set optimizer_trace="enabled=off";