diff options
author | unknown <ram@mysql.r18.ru> | 2003-02-19 21:14:50 +0400 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-02-19 21:14:50 +0400 |
commit | 0e6a0a66c169b173cd9be2878b3d6d2de534a6d6 (patch) | |
tree | 7a33696a40357fbbb5d14a020b3a3919830880c4 /myisam/mi_open.c | |
parent | 94305e82c80ee8fa5cd4ce5ab2c36268260586a4 (diff) | |
download | mariadb-git-0e6a0a66c169b173cd9be2878b3d6d2de534a6d6.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.c | 6 |
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); |