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
b1824004
Commit
b1824004
authored
Aug 26, 2010
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
828b3bc5
55105a88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/r/range.result
mysql-test/r/range.result
+13
-0
mysql-test/t/range.test
mysql-test/t/range.test
+12
-0
sql/opt_range.cc
sql/opt_range.cc
+4
-0
No files found.
mysql-test/r/range.result
View file @
b1824004
...
...
@@ -1653,4 +1653,17 @@ a b
0 0
1 1
DROP TABLE t1;
#
# Bug #54802: 'NOT BETWEEN' evaluation is incorrect
#
CREATE TABLE t1 (c_key INT, c_notkey INT, KEY(c_key));
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
EXPLAIN SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c_key NULL NULL NULL 3 Using where
SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
c_key c_notkey
1 1
3 3
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/range.test
View file @
b1824004
...
...
@@ -1313,4 +1313,16 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY)
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #54802: 'NOT BETWEEN' evaluation is incorrect
--
echo
#
CREATE
TABLE
t1
(
c_key
INT
,
c_notkey
INT
,
KEY
(
c_key
));
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
2
),
(
3
,
3
);
EXPLAIN
SELECT
*
FROM
t1
WHERE
2
NOT
BETWEEN
c_notkey
AND
c_key
;
SELECT
*
FROM
t1
WHERE
2
NOT
BETWEEN
c_notkey
AND
c_key
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/opt_range.cc
View file @
b1824004
...
...
@@ -5620,7 +5620,11 @@ static SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param,COND *cond)
SEL_TREE
*
tmp
=
get_full_func_mm_tree
(
param
,
cond_func
,
field_item
,
(
Item
*
)(
intptr
)
i
,
inv
);
if
(
inv
)
{
tree
=
!
tree
?
tmp
:
tree_or
(
param
,
tree
,
tmp
);
if
(
tree
==
NULL
)
break
;
}
else
tree
=
tree_and
(
param
,
tree
,
tmp
);
}
...
...
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