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
a1bb645c
Commit
a1bb645c
authored
Jun 21, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in _mi_prefix_search fixed
parent
a6e1bddc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
myisam/mi_search.c
myisam/mi_search.c
+7
-5
No files found.
myisam/mi_search.c
View file @
a1bb645c
...
...
@@ -264,9 +264,9 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
SEARCH_NO_FIND,SEARCH_LAST and HA_REVERSE_SORT flags.
flag is the value returned by _mi_key_cmp and as treated as final */
int
flag
=
0
,
my_flag
=-
1
;
uint
nod_flag
,
length
,
len
,
matched
,
cmplen
,
kseg_len
,
key_len_left
;
uint
nod_flag
,
length
,
len
,
matched
,
cmplen
,
kseg_len
;
uint
prefix_len
,
suffix_len
;
int
key_len_skip
,
seg_len_pack
;
int
key_len_skip
,
seg_len_pack
,
key_len_left
;
uchar
*
end
,
*
kseg
,
*
vseg
;
uchar
*
sort_order
=
keyinfo
->
seg
->
charset
->
sort_order
;
uchar
tt_buff
[
MI_MAX_KEY_BUFF
+
2
],
*
t_buff
=
tt_buff
+
2
;
...
...
@@ -288,6 +288,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
key_len_skip
=
lenght_pack
+
kseg_len
;
key_len_left
=
key_len
-
key_len_skip
;
cmplen
=
(
key_len_left
>=
0
)
?
kseg_len
:
key_len
-
lenght_pack
;
DBUG_PRINT
(
"info"
,(
"key: '%.*s'"
,
kseg_len
,
kseg
));
}
/*
...
...
@@ -342,6 +343,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
saved_vseg
=
vseg
;
saved_prefix_len
=
prefix_len
;
DBUG_PRINT
(
"loop"
,(
"page: '%.*s%.*s'"
,
prefix_len
,
t_buff
+
seg_len_pack
,
suffix_len
,
vseg
));
{
uchar
*
from
=
vseg
+
suffix_len
;
MI_KEYSEG
*
keyseg
;
...
...
@@ -409,7 +411,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
}
else
if
(
len
>
cmplen
)
{
if
(
my_flag
=
!
(
nextflag
&
SEARCH_PREFIX
)
&&
key_len_left
>
0
)
if
(
my_flag
=
!
(
nextflag
&
SEARCH_PREFIX
)
||
key_len_left
>
0
)
break
;
goto
fix_flag
;
}
...
...
@@ -688,8 +690,8 @@ static int compare_bin(uchar *a, uint a_length, uchar *b, uint b_length,
/*
** Compare two keys
with is bigger
** Returns <0, 0, >0 acording to w
it
h is bigger
** Compare two keys
** Returns <0, 0, >0 acording to w
hic
h is bigger
** Key_length specifies length of key to use. Number-keys can't
** be splited
** If flag <> SEARCH_FIND compare also position
...
...
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