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
f16dfb9d
Commit
f16dfb9d
authored
Feb 02, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a comment for NULL range creation.
parent
6fab168a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
sql/opt_range.cc
sql/opt_range.cc
+6
-1
No files found.
sql/opt_range.cc
View file @
f16dfb9d
...
@@ -2516,6 +2516,12 @@ QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, TABLE_REF *ref)
...
@@ -2516,6 +2516,12 @@ QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, TABLE_REF *ref)
if
(
quick
->
ranges
.
push_back
(
range
))
if
(
quick
->
ranges
.
push_back
(
range
))
goto
err
;
goto
err
;
/*
Add a NULL range if REF_OR_NULL optimization is used.
For example:
if we have "WHERE A=2 OR A IS NULL" we created the (A=2) range above
and have ref->null_ref_key set. Will create a new NULL range here.
*/
if
(
ref
->
null_ref_key
)
if
(
ref
->
null_ref_key
)
{
{
QUICK_RANGE
*
null_range
;
QUICK_RANGE
*
null_range
;
...
@@ -2526,7 +2532,6 @@ QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, TABLE_REF *ref)
...
@@ -2526,7 +2532,6 @@ QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, TABLE_REF *ref)
EQ_RANGE
)))
EQ_RANGE
)))
goto
err
;
goto
err
;
*
ref
->
null_ref_key
=
0
;
// Clear null byte
*
ref
->
null_ref_key
=
0
;
// Clear null byte
/* Do we need to do something with key_parts here? Looks like we don't */
if
(
quick
->
ranges
.
push_back
(
null_range
))
if
(
quick
->
ranges
.
push_back
(
null_range
))
goto
err
;
goto
err
;
}
}
...
...
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