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
83984db0
Commit
83984db0
authored
Aug 27, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged 5.0-bugteam -> 5.1-bugteam
parents
dbcfef4c
e4f8deb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
sql/opt_range.cc
sql/opt_range.cc
+17
-6
No files found.
sql/opt_range.cc
View file @
83984db0
...
...
@@ -2243,7 +2243,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
KEY
*
key_info
;
PARAM
param
;
if
(
check_stack_overrun
(
thd
,
2
*
STACK_MIN_SIZE
,
buff
))
if
(
check_stack_overrun
(
thd
,
2
*
STACK_MIN_SIZE
+
sizeof
(
PARAM
)
,
buff
))
DBUG_RETURN
(
0
);
// Fatal error flag is set
/* set up parameter that is passed to all functions */
...
...
@@ -9795,11 +9795,22 @@ get_constant_key_infix(KEY *index_info, SEL_ARG *index_range_tree,
return
FALSE
;
uint
field_length
=
cur_part
->
store_length
;
if
((
cur_range
->
maybe_null
&&
cur_range
->
min_value
[
0
]
&&
cur_range
->
max_value
[
0
])
||
!
memcmp
(
cur_range
->
min_value
,
cur_range
->
max_value
,
field_length
))
{
/* cur_range specifies 'IS NULL' or an equality condition. */
if
(
cur_range
->
maybe_null
&&
cur_range
->
min_value
[
0
]
&&
cur_range
->
max_value
[
0
])
{
/*
cur_range specifies 'IS NULL'. In this case the argument points
to a "null value" (is_null_string) that may not always be long
enough for a direct memcpy to a field.
*/
DBUG_ASSERT
(
field_length
>
0
);
*
key_ptr
=
1
;
bzero
(
key_ptr
+
1
,
field_length
-
1
);
key_ptr
+=
field_length
;
*
key_infix_len
+=
field_length
;
}
else
if
(
memcmp
(
cur_range
->
min_value
,
cur_range
->
max_value
,
field_length
)
==
0
)
{
/* cur_range specifies an equality condition. */
memcpy
(
key_ptr
,
cur_range
->
min_value
,
field_length
);
key_ptr
+=
field_length
;
*
key_infix_len
+=
field_length
;
...
...
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