summaryrefslogtreecommitdiff
path: root/mysql-test/main/statistics_json.test
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-09-20 18:33:51 +0300
committerSergei Petrunia <psergey@askmonty.org>2021-09-20 18:33:51 +0300
commit477d9b9bc27e2219147cbff4274248c40e8beb29 (patch)
tree65a5beae41a66fce00ee7375933e0b2a041037db /mysql-test/main/statistics_json.test
parente44074feb2bd482d9d28cbf04829770dc33db27d (diff)
downloadmariadb-git-477d9b9bc27e2219147cbff4274248c40e8beb29.tar.gz
MDEV-26595: ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivitypreview-10.7-MDEV-26519-improved-json-histograms_triggerBBpreview-10.7-MDEV-26519-improved-json-histograms
Add testcase
Diffstat (limited to 'mysql-test/main/statistics_json.test')
-rw-r--r--mysql-test/main/statistics_json.test16
1 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index ab061ed9f4e..6c3bbcd6f3d 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -185,7 +185,6 @@ drop table t1;
--echo #
--echo # MDEV-26589: Assertion failure upon DECODE_HISTOGRAM with NULLs in first column
---echo # (Just the testcase)
--echo #
CREATE TABLE t1 (a INT, b INT);
@@ -194,3 +193,18 @@ SET histogram_type = JSON_HB;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT DECODE_HISTOGRAM(hist_type, histogram) from mysql.column_stats;
drop table t1;
+
+--echo #
+--echo # ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivity ...
+--echo # (Just the testcase)
+--echo #
+
+CREATE TABLE t1 (f CHAR(8));
+INSERT INTO t1 VALUES ('foo'),('bar');
+
+SET histogram_type = JSON_HB;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+
+SELECT * FROM t1 WHERE f > 'qux';
+DROP TABLE t1;
+