diff options
author | unknown <serg@serg.mylan> | 2004-04-27 21:17:10 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-04-27 21:17:10 +0200 |
commit | e35880e0b86ea38412b1c5e94a99aa995f071564 (patch) | |
tree | 8cf231fea089cf1204f85536f9854e2abaf2bb6f /myisam/ft_boolean_search.c | |
parent | 39ec9e1e23409b9ddb0c9b7c5baff3d4877c11b6 (diff) | |
download | mariadb-git-e35880e0b86ea38412b1c5e94a99aa995f071564.tar.gz |
after-merge fix: make concurrent-insert-skip code ft2-aware
mysql-test/t/func_group.test:
no innodb is not an error
Diffstat (limited to 'myisam/ft_boolean_search.c')
-rw-r--r-- | myisam/ft_boolean_search.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 2a1c07acf0b..90647990ee8 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -205,6 +205,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) int r; uint off; int subkeys; + my_bool can_go_down; MI_INFO *info=ftb->info; if (init_search) @@ -222,11 +223,22 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) USE_WHOLE_KEY, SEARCH_BIGGER, ftbw->key_root); } + can_go_down=(!ftbw->off && (init_search || (ftbw->flags & FTB_FLAG_TRUNC))); /* Skip rows inserted by concurrent insert */ - while (!r && info->lastpos >= info->state->data_file_length) + while (!r) + { + if (can_go_down) + { + /* going down ? */ + off=info->lastkey_length-HA_FT_WLEN-info->s->base.rec_reflength; + subkeys=ft_sintXkorr(info->lastkey+off); + } + if (subkeys<0 || info->lastpos < info->state->data_file_length) + break; r= _mi_search_next(info, ftbw->keyinfo, info->lastkey, info->lastkey_length, SEARCH_BIGGER, ftbw->key_root); + } if (!r && !ftbw->off) { @@ -270,8 +282,6 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (!ftbw->off && (init_search || (ftbw->flags & FTB_FLAG_TRUNC))) { /* going down ? */ - get_key_full_length_rdonly(off, info->lastkey); - subkeys=ft_sintXkorr(info->lastkey+off); if (subkeys<0) { /* |