0

A customer notifies me that the search of an application we have developed for him is not working properly. The search is based on queries on Full-Text Search indexes on InnoDB tables in MySQL 5.6 (the first version that supported it).

When performing the query manually I check that it only returns 1 result when it should return 2. I tried with other search terms and the same table row is always omitted. The same queries using LIKE works well.

When trying to replicate the problem in a virtualized environment with the same OS and MySQL server versions I am unable to reproduce it, as the query works correctly after restoring a database dump.

After trying several options what has worked is to run OPTIMIZE TABLE. The search query works well after optimizing the table, showing the missing record.

Why does this happen? What is the explanation for this problem and how can it be detected or prevented?

4
  • Please show us the SELECT and the missing row. Commented Jun 23, 2021 at 0:42
  • The query is something like this: SELECT * FROM workers WHERE MATCH (name, surname) AGAINST('+rosario' IN BOOLEAN MODE). The missing row has nothing special, but was updated recently (has timestamp columns for create/update) and the others dont. This is why a locked row seems possible... Commented Jun 23, 2021 at 6:31
  • File a bug report - bugs.mysql.com Commented Jun 23, 2021 at 17:00
  • To file a bug I must be able to reproduce the problem, and I can't. This is why I'm posting it here, to know if anyone else had this problem and knows how to reproduce/resolve it... Commented Jun 24, 2021 at 8:33

1 Answer 1

0

i dont know much about your code, your database, your queries, but i see only 2 situations :

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Raphael. The first option makes more sense, as I assume that a corrupted table would prevent any records from being read (it has already happened to me). If it happens again I will try to see if there are locked records, but at the moment I don't know how to reproduce the problem....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.