Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d794406f
Commit
d794406f
authored
Feb 03, 2005
by
acurtis@pcgem.rdg.cyberkinetica.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#6726 - failure to parse NOT BETWEEN
Fix and test for parse bug
parent
d8659b27
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
+29
-10
mysql-test/r/func_test.result
mysql-test/r/func_test.result
+10
-0
mysql-test/t/func_test.test
mysql-test/t/func_test.test
+9
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+10
-10
No files found.
mysql-test/r/func_test.result
View file @
d794406f
...
...
@@ -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;
mysql-test/t/func_test.test
View file @
d794406f
...
...
@@ -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
;
sql/sql_yacc.yy
View file @
d794406f
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment