Commit 6c2de240 authored by unknown's avatar unknown

fix for the bug #2786 incorrect precedence for XOR operator

parent 65311205
......@@ -46,6 +46,9 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1;
select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL;
1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL
0 1 1 0 NULL NULL NULL
select 1 like 2 xor 2 like 1;
1 like 2 xor 2 like 1
0
create table t1 (a int);
insert t1 values (1);
select * from t1 where 1 xor 1;
......
......@@ -17,6 +17,7 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,
select -1.49 or -1.49,0.6 or 0.6;
select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1;
select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL;
select 1 like 2 xor 2 like 1;
create table t1 (a int);
insert t1 values (1);
......
......@@ -478,7 +478,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token CIPHER_SYM
%left SET_VAR
%left OR_OR_CONCAT OR
%left OR_OR_CONCAT OR XOR
%left AND
%left BETWEEN_SYM CASE_SYM WHEN_SYM THEN_SYM ELSE
%left EQ EQUAL_SYM GE GT_SYM LE LT NE IS LIKE REGEXP IN_SYM
......@@ -488,7 +488,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%left '-' '+'
%left '*' '/' '%'
%left NEG '~'
%left XOR
%left '^'
%right NOT
%right BINARY
......
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