1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

precedence bugfixing

fix printing precedence for BETWEEN, LIKE/ESCAPE, REGEXP, IN
don't use precedence for printing CASE/WHEN/THEN/ELSE/END

fix parsing precedence of BETWEEN, LIKE/ESCAPE, REGEXP, IN
support predicate arguments for IN, BETWEEN, SOUNDS LIKE, LIKE/ESCAPE,
REGEXP

use %nonassoc for unary operators

fix parsing of IS TRUE/FALSE/UNKNOWN/NULL

remove parser_precedence test as superseded by the precedence test
This commit is contained in:
Sergei Golubchik
2020-10-05 12:50:51 +02:00
parent 7f974e5ad3
commit 05a878c139
16 changed files with 349 additions and 1490 deletions

View File

@ -1321,3 +1321,20 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create or replace view v1 as select 1 between (2 between 3 and 4) and 5;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
view_definition
select 1 between 2 between 3 and 4 and 5 AS `1 between (2 between 3 and 4) and 5`
create or replace view v1 as select 1 between (2 in (3,4)) and 5;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
view_definition
select 1 between 2 in (3,4) and 5 AS `1 between (2 in (3,4)) and 5`
create or replace view v1 as select 1 between (2 like 3) and 4;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
view_definition
select 1 between 2 like 3 and 4 AS `1 between (2 like 3) and 4`
create or replace view v1 as select 1 not between (2 like 3) and 4;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
view_definition
select 1 not between 2 like 3 and 4 AS `1 not between (2 like 3) and 4`
drop view v1;