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
007d353e
Commit
007d353e
authored
Jan 19, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper fix for bug with BLOB in MIN/MAX
parent
63499f3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
sql/key.cc
sql/key.cc
+2
-2
sql/opt_sum.cc
sql/opt_sum.cc
+7
-5
No files found.
sql/key.cc
View file @
007d353e
...
...
@@ -182,9 +182,9 @@ int key_cmp(TABLE *table,const byte *key,uint idx,uint key_length)
}
if
(
key_part
->
key_part_flag
&
(
HA_BLOB_PART
|
HA_VAR_LENGTH
))
{
if
(
key_part
->
field
->
key_cmp
(
key
,
key_part
->
length
+
2
))
if
(
key_part
->
field
->
key_cmp
(
key
,
key_part
->
length
+
HA_KEY_BLOB_LENGTH
))
return
1
;
length
=
key_part
->
length
+
2
;
length
=
key_part
->
length
+
HA_KEY_BLOB_LENGTH
;
}
else
{
...
...
sql/opt_sum.cc
View file @
007d353e
...
...
@@ -440,14 +440,16 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
left_length
<
part
->
store_length
||
(
table
->
file
->
index_flags
(
idx
)
&
HA_WRONG_ASCII_ORDER
))
break
;
uint
store_length
=
part
->
store_length
;
// Save found constant
if
(
part
->
null_bit
)
{
*
key_ptr
++=
(
byte
)
test
(
part
->
field
->
is_null
());
part
->
field
->
get_key_image
((
char
*
)
key_ptr
,
(
part
->
field
->
type
()
==
FIELD_TYPE_BLOB
)
?
part
->
length
+
HA_KEY_BLOB_LENGTH
:
part
->
length
);
key_ptr
+=
part
->
store_length
-
test
(
part
->
null_bit
)
;
left_length
-=
part
->
store_length
;
store_length
--
;
}
part
->
field
->
get_key_image
((
char
*
)
key_ptr
,
store_
length
);
key_ptr
+=
store_length
;
left_length
-=
part
->
store_length
;
}
if
(
part
==
part_end
&&
part
->
field
==
field
)
{
...
...
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