Skip to content

Commit 4070ce0

Browse files
author
Alexander Barkov
committed
MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
The fix for MDEV-8466 earlier fixed MDEV-8635 as well. Adding a test only.
1 parent 1250018 commit 4070ce0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

mysql-test/r/type_newdecimal.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,5 +2142,14 @@ Warnings:
21422142
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2010.0)
21432143
DROP TABLE t1;
21442144
#
2145+
# MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
2146+
#
2147+
CREATE TABLE t1 (a DECIMAL, KEY(a)) ENGINE=MyISAM;
2148+
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
2149+
EXPLAIN SELECT * FROM t1 WHERE a='ax' ORDER BY a;
2150+
id select_type table type possible_keys key key_len ref rows Extra
2151+
1 SIMPLE t1 ref a a 6 const 1 Using where; Using index; Using filesort
2152+
DROP TABLE t1;
2153+
#
21452154
# End of 10.1 tests
21462155
#

mysql-test/t/type_newdecimal.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,15 @@ INSERT INTO t1 VALUES (2010),(2020);
16751675
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010.0 AND a>=2010.0;
16761676
DROP TABLE t1;
16771677

1678+
--echo #
1679+
--echo # MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
1680+
--echo #
1681+
CREATE TABLE t1 (a DECIMAL, KEY(a)) ENGINE=MyISAM;
1682+
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
1683+
# Make sure this does not produce any warnings
1684+
EXPLAIN SELECT * FROM t1 WHERE a='ax' ORDER BY a;
1685+
DROP TABLE t1;
1686+
16781687
--echo #
16791688
--echo # End of 10.1 tests
16801689
--echo #

0 commit comments

Comments
 (0)