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
e5418e04
Commit
e5418e04
authored
Feb 19, 2003
by
ram@mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix: we should set have_rtree value in case of table reopen.
Code cleanup.
parent
e1428907
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
myisam/mi_open.c
myisam/mi_open.c
+5
-1
myisam/myisamdef.h
myisam/myisamdef.h
+1
-1
myisam/rt_index.c
myisam/rt_index.c
+5
-5
No files found.
myisam/mi_open.c
View file @
e5418e04
...
@@ -484,6 +484,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -484,6 +484,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
if
(
mi_open_datafile
(
&
info
,
share
,
old_info
->
dfile
))
if
(
mi_open_datafile
(
&
info
,
share
,
old_info
->
dfile
))
goto
err
;
goto
err
;
errpos
=
5
;
errpos
=
5
;
have_rtree
=
old_info
->
rtree_recursion_state
!=
NULL
;
}
}
/* alloc and set up private structure parts */
/* alloc and set up private structure parts */
...
@@ -492,12 +493,15 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
...
@@ -492,12 +493,15 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
&
info
.
blobs
,
sizeof
(
MI_BLOB
)
*
share
->
base
.
blobs
,
&
info
.
blobs
,
sizeof
(
MI_BLOB
)
*
share
->
base
.
blobs
,
&
info
.
buff
,(
share
->
base
.
max_key_block_length
*
2
+
&
info
.
buff
,(
share
->
base
.
max_key_block_length
*
2
+
share
->
base
.
max_key_length
),
share
->
base
.
max_key_length
),
&
info
.
rtree_recursion_state
,
have_rtree
?
1024
:
0
,
&
info
.
lastkey
,
share
->
base
.
max_key_length
*
3
+
1
,
&
info
.
lastkey
,
share
->
base
.
max_key_length
*
3
+
1
,
&
info
.
filename
,
strlen
(
org_name
)
+
1
,
&
info
.
filename
,
strlen
(
org_name
)
+
1
,
&
info
.
rtree_recursion_state
,
have_rtree
?
1024
:
0
,
NullS
))
NullS
))
goto
err
;
goto
err
;
errpos
=
6
;
errpos
=
6
;
if
(
!
have_rtree
)
info
.
rtree_recursion_state
=
NULL
;
strmov
(
info
.
filename
,
org_name
);
strmov
(
info
.
filename
,
org_name
);
memcpy
(
info
.
blobs
,
share
->
blobs
,
sizeof
(
MI_BLOB
)
*
share
->
base
.
blobs
);
memcpy
(
info
.
blobs
,
share
->
blobs
,
sizeof
(
MI_BLOB
)
*
share
->
base
.
blobs
);
...
...
myisam/myisamdef.h
View file @
e5418e04
...
@@ -272,7 +272,7 @@ struct st_myisam_info {
...
@@ -272,7 +272,7 @@ struct st_myisam_info {
#ifdef THREAD
#ifdef THREAD
THR_LOCK_DATA
lock
;
THR_LOCK_DATA
lock
;
#endif
#endif
uchar
*
rtree_recursion_state
;
/* For RTREE */
uchar
*
rtree_recursion_state
;
/* For RTREE */
int
rtree_recursion_depth
;
int
rtree_recursion_depth
;
};
};
...
...
myisam/rt_index.c
View file @
e5418e04
...
@@ -53,7 +53,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, u
...
@@ -53,7 +53,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, u
int
res
;
int
res
;
uchar
*
page_buf
;
uchar
*
page_buf
;
int
k_len
;
int
k_len
;
int
*
saved_key
=
(
int
*
)(
info
->
rtree_recursion_state
+
level
*
sizeof
(
int
))
;
uint
*
saved_key
=
(
uint
*
)
(
info
->
rtree_recursion_state
)
+
level
;
if
(
!
(
page_buf
=
(
uchar
*
)
my_alloca
((
uint
)
keyinfo
->
block_length
)))
if
(
!
(
page_buf
=
(
uchar
*
)
my_alloca
((
uint
)
keyinfo
->
block_length
)))
{
{
...
@@ -114,7 +114,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, u
...
@@ -114,7 +114,7 @@ static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag, u
uchar
*
after_key
=
rt_PAGE_NEXT_KEY
(
k
,
k_len
,
nod_flag
);
uchar
*
after_key
=
rt_PAGE_NEXT_KEY
(
k
,
k_len
,
nod_flag
);
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
memcpy
(
info
->
lastkey
,
k
,
k_len
+
info
->
s
->
base
.
rec_ref
length
);
memcpy
(
info
->
lastkey
,
k
,
info
->
lastkey_
length
);
info
->
rtree_recursion_depth
=
level
;
info
->
rtree_recursion_depth
=
level
;
*
saved_key
=
k
-
page_buf
;
*
saved_key
=
k
-
page_buf
;
...
@@ -205,7 +205,7 @@ int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag)
...
@@ -205,7 +205,7 @@ int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag)
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
memcpy
(
info
->
lastkey
,
key
,
k_len
+
info
->
s
->
base
.
rec_ref
length
);
memcpy
(
info
->
lastkey
,
key
,
info
->
lastkey_
length
);
*
(
int
*
)
info
->
int_keypos
=
key
-
info
->
buff
;
*
(
int
*
)
info
->
int_keypos
=
key
-
info
->
buff
;
if
(
after_key
>=
info
->
int_maxpos
)
if
(
after_key
>=
info
->
int_maxpos
)
...
@@ -246,7 +246,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
...
@@ -246,7 +246,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
int
res
;
int
res
;
uchar
*
page_buf
;
uchar
*
page_buf
;
uint
k_len
;
uint
k_len
;
int
*
saved_key
=
(
int
*
)(
info
->
rtree_recursion_state
+
level
*
sizeof
(
int
))
;
uint
*
saved_key
=
(
uint
*
)
(
info
->
rtree_recursion_state
)
+
level
;
if
(
!
(
page_buf
=
(
uchar
*
)
my_alloca
((
uint
)
keyinfo
->
block_length
)))
if
(
!
(
page_buf
=
(
uchar
*
)
my_alloca
((
uint
)
keyinfo
->
block_length
)))
return
-
1
;
return
-
1
;
...
@@ -297,7 +297,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
...
@@ -297,7 +297,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
uchar
*
after_key
=
rt_PAGE_NEXT_KEY
(
k
,
k_len
,
nod_flag
);
uchar
*
after_key
=
rt_PAGE_NEXT_KEY
(
k
,
k_len
,
nod_flag
);
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastpos
=
_mi_dpos
(
info
,
0
,
after_key
);
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
info
->
lastkey_length
=
k_len
+
info
->
s
->
base
.
rec_reflength
;
memcpy
(
info
->
lastkey
,
k
,
k_len
+
info
->
s
->
base
.
rec_ref
length
);
memcpy
(
info
->
lastkey
,
k
,
info
->
lastkey_
length
);
info
->
rtree_recursion_depth
=
level
;
info
->
rtree_recursion_depth
=
level
;
*
saved_key
=
k
-
page_buf
;
*
saved_key
=
k
-
page_buf
;
...
...
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