mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into pcgem.rdg.cyberkinetica.com:/var/db/bk/work-acurtis/bug6726
This commit is contained in:
commit
b823638f38
3 changed files with 29 additions and 10 deletions
|
@ -183,3 +183,13 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
|
|||
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
|
||||
5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
|
||||
2 2 -2 -2
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 values (1,2), (2,3), (3,4), (4,5);
|
||||
select * from t1 where a not between 1 and 2;
|
||||
a b
|
||||
3 4
|
||||
4 5
|
||||
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
|
||||
a b
|
||||
4 5
|
||||
drop table t1;
|
||||
|
|
|
@ -107,3 +107,12 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
|
|||
#
|
||||
|
||||
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
|
||||
|
||||
#
|
||||
# Bug#6726: NOT BETWEEN parse failure
|
||||
#
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 values (1,2), (2,3), (3,4), (4,5);
|
||||
select * from t1 where a not between 1 and 2;
|
||||
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
|
||||
drop table t1;
|
||||
|
|
|
@ -4032,10 +4032,11 @@ bool_test:
|
|||
bool_pri:
|
||||
bool_pri IS NULL_SYM { $$= new Item_func_isnull($1); }
|
||||
| bool_pri IS not NULL_SYM { $$= new Item_func_isnotnull($1); }
|
||||
| predicate BETWEEN_SYM bit_expr AND_SYM bool_pri
|
||||
{ $$= new Item_func_between($1,$3,$5); }
|
||||
| predicate not BETWEEN_SYM bit_expr AND_SYM bool_pri
|
||||
{ $$= negate_expression(YYTHD, new Item_func_between($1,$4,$6)); }
|
||||
| bool_pri EQUAL_SYM predicate { $$= new Item_func_equal($1,$3); }
|
||||
| bool_pri comp_op predicate %prec EQ
|
||||
{ $$= (*$2)(0)->create($1,$3); }
|
||||
| bool_pri comp_op all_or_any in_subselect %prec EQ
|
||||
{ $$= all_any_subquery_creator($1, $2, $3, $4); }
|
||||
| predicate ;
|
||||
|
||||
predicate:
|
||||
|
@ -4047,6 +4048,10 @@ predicate:
|
|||
{ $$= new Item_in_subselect($1, $3); }
|
||||
| bit_expr not IN_SYM in_subselect
|
||||
{ $$= negate_expression(YYTHD, new Item_in_subselect($1, $4)); }
|
||||
| bit_expr BETWEEN_SYM bit_expr AND_SYM predicate
|
||||
{ $$= new Item_func_between($1,$3,$5); }
|
||||
| bit_expr not BETWEEN_SYM bit_expr AND_SYM predicate
|
||||
{ $$= negate_expression(YYTHD, new Item_func_between($1,$4,$6)); }
|
||||
| bit_expr SOUNDS_SYM LIKE bit_expr
|
||||
{ $$= new Item_func_eq(new Item_func_soundex($1),
|
||||
new Item_func_soundex($4)); }
|
||||
|
@ -4057,11 +4062,6 @@ predicate:
|
|||
| bit_expr REGEXP bit_expr { $$= new Item_func_regex($1,$3); }
|
||||
| bit_expr not REGEXP bit_expr
|
||||
{ $$= negate_expression(YYTHD, new Item_func_regex($1,$4)); }
|
||||
| bit_expr EQUAL_SYM bit_expr { $$= new Item_func_equal($1,$3); }
|
||||
| bit_expr comp_op bit_expr %prec EQ
|
||||
{ $$= (*$2)(0)->create($1,$3); }
|
||||
| bit_expr comp_op all_or_any in_subselect %prec EQ
|
||||
{ $$= all_any_subquery_creator($1, $2, $3, $4); }
|
||||
| bit_expr ;
|
||||
|
||||
bit_expr:
|
||||
|
|
Loading…
Reference in a new issue