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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
79406bc4
Commit
79406bc4
authored
Oct 15, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge.
parents
eade8980
bc9f56a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
mysql-test/r/range.result
mysql-test/r/range.result
+9
-0
mysql-test/t/range.test
mysql-test/t/range.test
+11
-0
sql/opt_range.cc
sql/opt_range.cc
+11
-0
No files found.
mysql-test/r/range.result
View file @
79406bc4
...
...
@@ -1398,3 +1398,12 @@ a < 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
#
CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES (1), (NULL);
SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL);
a
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/range.test
View file @
79406bc4
...
...
@@ -1171,3 +1171,14 @@ a < 5 OR
a
<
10
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
),
(
NULL
);
SELECT
*
FROM
t1
WHERE
a
<>
NULL
and
(
a
<>
NULL
or
a
<=
NULL
);
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/opt_range.cc
View file @
79406bc4
...
...
@@ -5891,6 +5891,17 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
goto
end
;
}
field
->
table
->
in_use
->
variables
.
sql_mode
=
orig_sql_mode
;
/*
Any sargable predicate except "<=>" involving NULL as a constant is always
FALSE
*/
if
(
type
!=
Item_func
::
EQUAL_FUNC
&&
field
->
is_real_null
())
{
tree
=
&
null_element
;
goto
end
;
}
str
=
(
uchar
*
)
alloc_root
(
alloc
,
key_part
->
store_length
+
1
);
if
(
!
str
)
goto
end
;
...
...
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