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
008b9361
Commit
008b9361
authored
Mar 05, 2003
by
ram@mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix: we should set proper my_errno
parent
4f930a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
myisam/rt_index.c
myisam/rt_index.c
+13
-1
No files found.
myisam/rt_index.c
View file @
008b9361
...
...
@@ -158,7 +158,10 @@ int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length,
MI_KEYDEF
*
keyinfo
=
info
->
s
->
keyinfo
+
keynr
;
if
((
root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
{
my_errno
=
HA_ERR_END_OF_FILE
;
return
-
1
;
}
/* Save searched key */
memcpy
(
info
->
lastkey2
,
key
,
keyinfo
->
keylength
-
info
->
s
->
base
.
rec_reflength
);
...
...
@@ -217,7 +220,10 @@ int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag)
}
}
if
((
root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
{
my_errno
=
HA_ERR_END_OF_FILE
;
return
-
1
;
}
nod_cmp_flag
=
((
search_flag
&
(
MBR_EQUAL
|
MBR_WITHIN
))
?
MBR_WITHIN
:
MBR_INTERSECT
);
...
...
@@ -340,7 +346,10 @@ int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
MI_KEYDEF
*
keyinfo
=
info
->
s
->
keyinfo
+
keynr
;
if
((
root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
{
my_errno
=
HA_ERR_END_OF_FILE
;
return
-
1
;
}
info
->
rtree_recursion_depth
=
-
1
;
info
->
buff_used
=
1
;
...
...
@@ -383,7 +392,10 @@ int rtree_get_next(MI_INFO *info, uint keynr, uint key_length)
else
{
if
((
root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
{
my_errno
=
HA_ERR_END_OF_FILE
;
return
-
1
;
}
return
rtree_get_req
(
info
,
&
keyinfo
[
keynr
],
key_length
,
root
,
0
);
}
...
...
@@ -732,7 +744,7 @@ int rtree_delete(MI_INFO *info, uint keynr, uchar *key, uint key_length)
if
((
old_root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
{
my_errno
=
HA_ERR_KEY_NOT_FOUND
;
my_errno
=
HA_ERR_END_OF_FILE
;
return
-
1
;
}
...
...
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