diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-10-19 12:57:44 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-10-23 15:53:41 +0200 |
commit | 8894dae1df87efda299d2c1fbccc4792c9058f45 (patch) | |
tree | d0c6f125b458386beb34193af8c4ecf0f5cb7adf | |
parent | 05a878c139963d4859ef8f2c974fee5dae56ee51 (diff) | |
download | mariadb-git-8894dae1df87efda299d2c1fbccc4792c9058f45.tar.gz |
MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN
-rw-r--r-- | mysql-test/r/precedence_bugs.result | 10 | ||||
-rw-r--r-- | mysql-test/t/precedence_bugs.test | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/precedence_bugs.result b/mysql-test/r/precedence_bugs.result index 3da61b6b58a..4b13e820d7f 100644 --- a/mysql-test/r/precedence_bugs.result +++ b/mysql-test/r/precedence_bugs.result @@ -48,3 +48,13 @@ character_set_client latin1 collation_connection latin1_swedish_ci drop view v1; drop table t1; +# +# MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN +# +create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' ); +show create view v1; +View v1 +Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 like (current_timestamp() between '2000-01-01' and '2012-12-12') AS `1 like (now() between '2000-01-01' and '2012-12-12' )` +character_set_client latin1 +collation_connection latin1_swedish_ci +drop view v1; diff --git a/mysql-test/t/precedence_bugs.test b/mysql-test/t/precedence_bugs.test index 46a803504f2..6e8e624c840 100644 --- a/mysql-test/t/precedence_bugs.test +++ b/mysql-test/t/precedence_bugs.test @@ -32,3 +32,10 @@ create view v1 as select avg(b) / (2 + a) from t1; query_vertical show create view v1; drop view v1; drop table t1; + +--echo # +--echo # MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN +--echo # +create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' ); +query_vertical show create view v1; +drop view v1; |