Commit 4070ce00 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-8635 Redundant warnings on WHERE decimal_column='ax'

The fix for MDEV-8466 earlier fixed MDEV-8635 as well. Adding a test only.
parent 12500188
...@@ -2142,5 +2142,14 @@ Warnings: ...@@ -2142,5 +2142,14 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2010.0) Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2010.0)
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
#
CREATE TABLE t1 (a DECIMAL, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
EXPLAIN SELECT * FROM t1 WHERE a='ax' ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 6 const 1 Using where; Using index; Using filesort
DROP TABLE t1;
#
# End of 10.1 tests # End of 10.1 tests
# #
...@@ -1675,6 +1675,15 @@ INSERT INTO t1 VALUES (2010),(2020); ...@@ -1675,6 +1675,15 @@ INSERT INTO t1 VALUES (2010),(2020);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010.0 AND a>=2010.0; EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010.0 AND a>=2010.0;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
--echo #
CREATE TABLE t1 (a DECIMAL, KEY(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
# Make sure this does not produce any warnings
EXPLAIN SELECT * FROM t1 WHERE a='ax' ORDER BY a;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 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