Commit 9dafde57 authored by Alexander Barkov's avatar Alexander Barkov

Additional tests for MDEV-28345 ASAN: use-after-poison or unknown-crash in...

Additional tests for MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number
parent a061ae10
...@@ -238,6 +238,12 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_ ...@@ -238,6 +238,12 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_
test.t1.c 1.75555555 1.75555555 10 10 0 0 10.0000 NULL ENUM('1.75555555') NOT NULL test.t1.c 1.75555555 1.75555555 10 10 0 0 10.0000 NULL ENUM('1.75555555') NOT NULL
DROP TABLE t1; DROP TABLE t1;
SET sql_mode=DEFAULT; SET sql_mode=DEFAULT;
CREATE TABLE t1 (c BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1.3),(1.1);
SELECT * FROM t1 PROCEDURE ANALYSE();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.c 1.1 1.3 3 3 0 0 3.0000 NULL ENUM('1.1','1.3') NOT NULL
DROP TABLE t1;
# #
# End of 10.5 tests # End of 10.5 tests
# #
...@@ -247,6 +247,11 @@ SELECT * FROM t1 PROCEDURE ANALYSE(); ...@@ -247,6 +247,11 @@ SELECT * FROM t1 PROCEDURE ANALYSE();
DROP TABLE t1; DROP TABLE t1;
SET sql_mode=DEFAULT; SET sql_mode=DEFAULT;
CREATE TABLE t1 (c BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1.3),(1.1);
SELECT * FROM t1 PROCEDURE ANALYSE();
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.5 tests --echo # End of 10.5 tests
--echo # --echo #
...@@ -109,6 +109,30 @@ c ...@@ -109,6 +109,30 @@ c
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0.0e' Warning 1292 Truncated incorrect DOUBLE value: '0.0e'
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('0.0e'),('0.0e+0');
SELECT * FROM t1 WHERE c=0.0;
c
0.0e
0.0e+0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0.0e'
SELECT * FROM t1 WHERE c=0.0e0;
c
0.0e
0.0e+0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0.0e'
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMBLOB NOT NULL);
INSERT INTO t1 VALUES ('1e+');
SELECT AVG(c1) AS VALUE FROM t1 WHERE c1 <> 0;
VALUE
1
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1e+'
Warning 1292 Truncated incorrect DOUBLE value: '1e+'
DROP TABLE t1;
# #
# End of 10.5 tests # End of 10.5 tests
# #
...@@ -55,6 +55,17 @@ SELECT * FROM t1 WHERE COALESCE(c)=0.0; ...@@ -55,6 +55,17 @@ SELECT * FROM t1 WHERE COALESCE(c)=0.0;
SELECT * FROM t1 WHERE COALESCE(c)=0.0e0; SELECT * FROM t1 WHERE COALESCE(c)=0.0e0;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('0.0e'),('0.0e+0');
SELECT * FROM t1 WHERE c=0.0;
SELECT * FROM t1 WHERE c=0.0e0;
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMBLOB NOT NULL);
INSERT INTO t1 VALUES ('1e+');
SELECT AVG(c1) AS VALUE FROM t1 WHERE c1 <> 0;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.5 tests --echo # End of 10.5 tests
--echo # --echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment