diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-08-12 17:28:45 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-08-12 17:28:45 +0400 |
commit | 9d884fd3d3fadd5ad31ecfee915877b98258e546 (patch) | |
tree | 717a99115c7d9516dd65c38ef8804edf9cad107c /mysql-test/t/func_like.test | |
parent | 6e091dc7ff06f9ff0bbe834f6be338f5b695ed81 (diff) | |
download | mariadb-git-9d884fd3d3fadd5ad31ecfee915877b98258e546.tar.gz |
MDEV-8599 "WHERE varchar_field LIKE temporal_const" does not use range optimizer
Diffstat (limited to 'mysql-test/t/func_like.test')
-rw-r--r-- | mysql-test/t/func_like.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test index aab3c7fe43b..d1b9b170a3b 100644 --- a/mysql-test/t/func_like.test +++ b/mysql-test/t/func_like.test @@ -164,5 +164,24 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=10.0 AND a LIKE 10.00; DROP TABLE t1; --echo # +--echo # MDEV-8599 "WHERE varchar_field LIKE temporal_const" does not use range optimizer +--echo # +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, KEY(a)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('00:00:00'); +INSERT INTO t1 VALUES ('00:00:01'); +INSERT INTO t1 VALUES ('00:00:02'); +INSERT INTO t1 VALUES ('00:00:03'); +INSERT INTO t1 VALUES ('00:00:04'); +INSERT INTO t1 VALUES ('00:00:05'); +INSERT INTO t1 VALUES ('00:00:06'); +INSERT INTO t1 VALUES ('00:00:07'); +EXPLAIN SELECT * FROM t1 WHERE a LIKE '00:00:00'; +EXPLAIN SELECT * FROM t1 WHERE a LIKE TIME'00:00:00'; +SELECT * FROM t1 WHERE a LIKE '00:00:00'; +SELECT * FROM t1 WHERE a LIKE TIME'00:00:00'; +DROP TABLE t1; + + +--echo # --echo # End of 10.1 tests --echo # |