Bug #106569 | Full-text search get stuck at "FULLTEXT INITIALIZATION" stage for exact phrases | ||
---|---|---|---|
Submitted: | 25 Feb 2022 7:35 | Modified: | 25 Feb 2022 10:25 |
Reporter: | Pratyush Mittal | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: FULLTEXT search | Severity: | S2 (Serious) |
Version: | 8.0.28, 5.7.37 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Boolean Full-Text Search, full text |
[25 Feb 2022 7:35]
Pratyush Mittal
[25 Feb 2022 7:40]
Pratyush Mittal
Updated the title
[25 Feb 2022 9:40]
MySQL Verification Team
Hello Pratyush Mittal, Thank you for the report and test case. regards, Umesh
[25 Feb 2022 9:41]
MySQL Verification Team
- 8.0.28 mysql> SELECT EVENT_ID, TRUNCATE(TIMER_WAIT/1000000000000,6) as Duration, SQL_TEXT -> FROM performance_schema.events_statements_history_long WHERE SQL_TEXT like '%limit 25%' -> ; +----------+----------+------------------------------------------------------------------------------------------------+ | EVENT_ID | Duration | SQL_TEXT | +----------+----------+------------------------------------------------------------------------------------------------+ | 458 | 0.5537 | SELECT * from posts where MATCH (opening_line) AGAINST ('+help +bar' IN BOOLEAN MODE) LIMIT 25 | | 478 | 7.7637 | SELECT * from posts where MATCH (opening_line) AGAINST ('"help bar"' IN BOOLEAN MODE) LIMIT 25 | +----------+----------+------------------------------------------------------------------------------------------------+ 2 rows in set (0.01 sec) mysql> SELECT event_name AS Stage, TRUNCATE(TIMER_WAIT/1000000000000,6) AS Duration -> FROM performance_schema.events_stages_history_long WHERE NESTING_EVENT_ID=458; +------------------------------------------------+----------+ | Stage | Duration | +------------------------------------------------+----------+ | stage/sql/starting | 0.0001 | | stage/sql/Executing hook on transaction begin. | 0.0000 | | stage/sql/starting | 0.0000 | | stage/sql/checking permissions | 0.0000 | | stage/sql/Opening tables | 0.0000 | | stage/sql/init | 0.0000 | | stage/sql/System lock | 0.0000 | | stage/sql/optimizing | 0.0000 | | stage/sql/statistics | 0.0000 | | stage/sql/preparing | 0.0000 | | stage/sql/FULLTEXT initialization | 0.5351 | | stage/sql/executing | 0.0130 | | stage/sql/end | 0.0000 | | stage/sql/query end | 0.0000 | | stage/sql/waiting for handler commit | 0.0000 | | stage/sql/closing tables | 0.0000 | | stage/sql/freeing items | 0.0053 | | stage/sql/cleaning up | 0.0000 | +------------------------------------------------+----------+ 18 rows in set (0.00 sec) mysql> SELECT event_name AS Stage, TRUNCATE(TIMER_WAIT/1000000000000,6) AS Duration FROM performance_schema.events_stages_history_long WHERE NESTING_EVENT_ID=478; +------------------------------------------------+----------+ | Stage | Duration | +------------------------------------------------+----------+ | stage/sql/starting | 0.0054 | | stage/sql/Executing hook on transaction begin. | 0.0000 | | stage/sql/starting | 0.0000 | | stage/sql/checking permissions | 0.0000 | | stage/sql/Opening tables | 0.0000 | | stage/sql/init | 0.0000 | | stage/sql/System lock | 0.0000 | | stage/sql/optimizing | 0.0000 | | stage/sql/statistics | 0.0000 | | stage/sql/preparing | 0.0000 | | stage/sql/FULLTEXT initialization | 7.7249 | | stage/sql/executing | 0.0269 | | stage/sql/end | 0.0000 | | stage/sql/query end | 0.0000 | | stage/sql/waiting for handler commit | 0.0000 | | stage/sql/closing tables | 0.0000 | | stage/sql/freeing items | 0.0062 | | stage/sql/cleaning up | 0.0000 | +------------------------------------------------+----------+ 18 rows in set (0.00 sec)
[25 Feb 2022 10:25]
Pratyush Mittal
Thanks Umesh for verifying it. The problem with phrase search is pretty widespread. There are lots of questions around it on StackOverflow. Sharing some of them for reference: - https://dba.stackexchange.com/q/87089/36350 - https://dba.stackexchange.com/q/72188/36350 - https://stackoverflow.com/q/24939527/232649