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
e33ef0d9
Commit
e33ef0d9
authored
Feb 03, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into pcgem.rdg.cyberkinetica.com:/var/db/bk/work-acurtis/bug6726
parents
128a902d
150cf58f
Changes
3
Hide 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 @
e33ef0d9
...
@@ -183,3 +183,13 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
...
@@ -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;
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
5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
2 2 -2 -2
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 @
e33ef0d9
...
@@ -107,3 +107,12 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
...
@@ -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
;
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 @
e33ef0d9
...
@@ -4032,14 +4032,15 @@ bool_test:
...
@@ -4032,14 +4032,15 @@ bool_test:
bool_pri:
bool_pri:
bool_pri IS NULL_SYM { $$= new Item_func_isnull($1); }
bool_pri IS NULL_SYM { $$= new Item_func_isnull($1); }
| bool_pri IS not NULL_SYM { $$= new Item_func_isnotnull($1); }
| bool_pri IS not NULL_SYM { $$= new Item_func_isnotnull($1); }
| predicate BETWEEN_SYM bit_expr AND_SYM bool_pri
| bool_pri EQUAL_SYM predicate { $$= new Item_func_equal($1,$3); }
{ $$= new Item_func_between($1,$3,$5); }
| bool_pri comp_op predicate %prec EQ
| predicate not BETWEEN_SYM bit_expr AND_SYM bool_pri
{ $$= (*$2)(0)->create($1,$3); }
{ $$= negate_expression(YYTHD, new Item_func_between($1,$4,$6)); }
| bool_pri comp_op all_or_any in_subselect %prec EQ
{ $$= all_any_subquery_creator($1, $2, $3, $4); }
| predicate ;
| predicate ;
predicate:
predicate:
bit_expr IN_SYM '(' expr_list ')'
bit_expr IN_SYM '(' expr_list ')'
{ $4->push_front($1); $$= new Item_func_in(*$4); }
{ $4->push_front($1); $$= new Item_func_in(*$4); }
| bit_expr not IN_SYM '(' expr_list ')'
| bit_expr not IN_SYM '(' expr_list ')'
{ $5->push_front($1); $$= negate_expression(YYTHD, new Item_func_in(*$5)); }
{ $5->push_front($1); $$= negate_expression(YYTHD, new Item_func_in(*$5)); }
...
@@ -4047,6 +4048,10 @@ predicate:
...
@@ -4047,6 +4048,10 @@ predicate:
{ $$= new Item_in_subselect($1, $3); }
{ $$= new Item_in_subselect($1, $3); }
| bit_expr not IN_SYM in_subselect
| bit_expr not IN_SYM in_subselect
{ $$= negate_expression(YYTHD, new Item_in_subselect($1, $4)); }
{ $$= 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
| bit_expr SOUNDS_SYM LIKE bit_expr
{ $$= new Item_func_eq(new Item_func_soundex($1),
{ $$= new Item_func_eq(new Item_func_soundex($1),
new Item_func_soundex($4)); }
new Item_func_soundex($4)); }
...
@@ -4057,11 +4062,6 @@ predicate:
...
@@ -4057,11 +4062,6 @@ predicate:
| bit_expr REGEXP bit_expr { $$= new Item_func_regex($1,$3); }
| bit_expr REGEXP bit_expr { $$= new Item_func_regex($1,$3); }
| bit_expr not REGEXP bit_expr
| bit_expr not REGEXP bit_expr
{ $$= negate_expression(YYTHD, new Item_func_regex($1,$4)); }
{ $$= 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 ;
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