summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <ram@mysql.r18.ru>2003-02-19 21:14:50 +0400
committerunknown <ram@mysql.r18.ru>2003-02-19 21:14:50 +0400
commit75d1d877b3585346e9202e78c6126bcea3cded96 (patch)
tree7a33696a40357fbbb5d14a020b3a3919830880c4 /myisam/mi_open.c
parent19f00e0abe39dad5475e466aeeb49347ef10550f (diff)
downloadmariadb-git-75d1d877b3585346e9202e78c6126bcea3cded96.tar.gz
Bug fix: we should set have_rtree value in case of table reopen.
Code cleanup. myisam/mi_open.c: Bug fix: we should set have_rtree value in case of table reopen. myisam/myisamdef.h: code cleanup myisam/rt_index.c: code cleanup
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 406facec164..1ed3ee78ffb 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -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))
goto err;
errpos=5;
+ have_rtree= old_info->rtree_recursion_state != NULL;
}
/* alloc and set up private structure parts */
@@ -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.buff,(share->base.max_key_block_length*2+
share->base.max_key_length),
- &info.rtree_recursion_state,have_rtree ? 1024 : 0,
&info.lastkey,share->base.max_key_length*3+1,
&info.filename,strlen(org_name)+1,
+ &info.rtree_recursion_state,have_rtree ? 1024 : 0,
NullS))
goto err;
errpos=6;
+
+ if (!have_rtree)
+ info.rtree_recursion_state= NULL;
strmov(info.filename,org_name);
memcpy(info.blobs,share->blobs,sizeof(MI_BLOB)*share->base.blobs);