summaryrefslogtreecommitdiff
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
parente44074feb2bd482d9d28cbf04829770dc33db27d (diff)
downloadmariadb-git-preview-10.7-MDEV-26519-improved-json-histograms_triggerBB.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
-rw-r--r--mysql-test/main/statistics_json.result15
-rw-r--r--mysql-test/main/statistics_json.test16
2 files changed, 29 insertions, 2 deletions
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 1d2ee77461f..5e4809c03ac 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -7462,7 +7462,6 @@ b a
drop table t1;
#
# MDEV-26589: Assertion failure upon DECODE_HISTOGRAM with NULLs in first column
-# (Just the testcase)
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (NULL,1), (NULL,2);
@@ -7490,3 +7489,17 @@ NULL
]
}
drop table t1;
+#
+# ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivity ...
+# (Just the testcase)
+#
+CREATE TABLE t1 (f CHAR(8));
+INSERT INTO t1 VALUES ('foo'),('bar');
+SET histogram_type = JSON_HB;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+SELECT * FROM t1 WHERE f > 'qux';
+f
+DROP TABLE t1;
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;
+