diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-27 14:43:12 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-27 14:43:12 +0200 |
commit | 49a7e81863fb8cae74030d3a7f8abcb6b9e69502 (patch) | |
tree | 96eaee1adca9c0b0ccd038e8f119a015e82d0b1f /storage/myisam/ft_boolean_search.c | |
parent | f0db66fb5505da2fa1c0613810da6ccf5a845e46 (diff) | |
download | mariadb-git-49a7e81863fb8cae74030d3a7f8abcb6b9e69502.tar.gz |
Bug #47930: MATCH IN BOOLEAN MODE returns too many results
inside subquery
Re-setting a fulltext index was a no-operation if not all
the matches of a search were consumed by reading them.
This was preventing a joined table using a fulltext index
in a subquery that requires only 1 row of output (e.g. EXISTS)
from working correctly because the second execution of the
sub-query has the fulltext index cursor in a wrong state and
was not finding results.
Fixed by making the re-init code _ftb_init_index_search()
to re-set open cursors in addition to depleted ones.
Diffstat (limited to 'storage/myisam/ft_boolean_search.c')
-rw-r--r-- | storage/myisam/ft_boolean_search.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 0a2847be514..492261c5efc 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -475,8 +475,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) int i; FTB_WORD *ftbw; - if ((ftb->state != READY && ftb->state !=INDEX_DONE) || - ftb->keynr == NO_SUCH_KEY) + if (ftb->state == UNINITIALIZED || ftb->keynr == NO_SUCH_KEY) return; ftb->state=INDEX_SEARCH; |