summaryrefslogtreecommitdiff
path: root/myisam/mi_rkey.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2001-10-09 16:01:06 +0200
committerunknown <serg@serg.mysql.com>2001-10-09 16:01:06 +0200
commita0ed9744f3d12e16e0fa5e784a37f21d7a1d2faf (patch)
treebace3e172eb9211454c99657fb4493bb3159d503 /myisam/mi_rkey.c
parent93cc6444ccad2ace36ba354cd96ffe8ede676761 (diff)
parent85e02d693c10553fd15c1193865a7e6996545838 (diff)
downloadmariadb-git-a0ed9744f3d12e16e0fa5e784a37f21d7a1d2faf.tar.gz
merged
BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-ft_search.c~c011cb6e8041bb59: the file is deleted anyway include/my_global.h: merder myisam/ft_boolean_search.c: huh? mysql-test/r/fulltext.result: use local mysql-test/r/fulltext_cache.result: ur mysql-test/r/fulltext_left_join.result: ur mysql-test/r/fulltext_multi.result: ur mysql-test/r/fulltext_order_by.result: ur
Diffstat (limited to 'myisam/mi_rkey.c')
-rw-r--r--myisam/mi_rkey.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c
index 0df390412b9..86547d3ef04 100644
--- a/myisam/mi_rkey.c
+++ b/myisam/mi_rkey.c
@@ -27,7 +27,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
{
uchar *key_buff;
MYISAM_SHARE *share=info->s;
- uint pack_key_length;
+ uint pack_key_length, use_key_length, nextflag;
DBUG_ENTER("mi_rkey");
DBUG_PRINT("enter",("base: %lx inx: %d search_flag: %d",
info,inx,search_flag));
@@ -55,11 +55,17 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
bmove(key_buff,key,key_len);
}
- if (_mi_readinfo(info,F_RDLCK,1))
+ if (fast_mi_readinfo(info))
goto err;
if (share->concurrent_insert)
rw_rdlock(&share->key_root_lock[inx]);
- if (!_mi_search(info,info->s->keyinfo+inx,key_buff,pack_key_length,
+
+ nextflag=myisam_read_vec[search_flag];
+ use_key_length=pack_key_length;
+ if (!(nextflag & (SEARCH_FIND | SEARCH_NO_FIND | SEARCH_LAST)))
+ use_key_length=USE_WHOLE_KEY;
+
+ if (!_mi_search(info,info->s->keyinfo+inx,key_buff,use_key_length,
myisam_read_vec[search_flag],info->s->state.key_root[inx]))
{
while (info->lastpos >= info->state->data_file_length)