diff options
author | monty@mishka.local <> | 2004-04-26 15:53:31 +0300 |
---|---|---|
committer | monty@mishka.local <> | 2004-04-26 15:53:31 +0300 |
commit | 21fd1d270eb58fa95551bb6e37ecef5a30785929 (patch) | |
tree | 25e3315af05fa92d20d2ad1d812882957c400337 /myisam/ft_boolean_search.c | |
parent | 7d9a9fd93ac4622d596920169a6d6afbd787c377 (diff) | |
parent | 7d3e633edc5db31c0698660ed644d7a18faea41c (diff) | |
download | mariadb-git-21fd1d270eb58fa95551bb6e37ecef5a30785929.tar.gz |
Merge with 4.0
Diffstat (limited to 'myisam/ft_boolean_search.c')
-rw-r--r-- | myisam/ft_boolean_search.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 1d4bfee86a4..f6092921a02 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -221,6 +221,12 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word+ftbw->off, USE_WHOLE_KEY, SEARCH_BIGGER, ftbw->key_root); } + + /* Skip rows inserted by concurrent insert */ + while (!r && info->lastpos >= info->state->data_file_length) + r= _mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length, + SEARCH_BIGGER, keyroot); + if (!r && !ftbw->off) { r= mi_compare_text(ftb->charset, @@ -267,8 +273,10 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) subkeys=ft_sintXkorr(info->lastkey+off); if (subkeys<0) { - /* yep, going down, to the second-level tree */ - /* TODO here: subkey-based optimization */ + /* + yep, going down, to the second-level tree + TODO here: subkey-based optimization + */ ftbw->off=off; ftbw->key_root=info->lastpos; ftbw->keyinfo=& info->s->ft2_keyinfo; |