I have a MySQL query that only crashes on one certain where clause, it says the table has crashed and needs to be repaired.
This query works:
SELECT
DirectionId
FROM
Messages
WHERE
CustomField1 = 56 AND DirectionId = 1
This one does not
SELECT
DirectionId
FROM
Messages
WHERE
CustomField1 = 209 AND DirectionId = 1
But if I do this it works:
SELECT
DirectionId
FROM
Messages
WHERE
CustomField1 = 209
Or this it also works
SELECT
DirectionId
FROM
Messages
WHERE
DirectionId = 1
Any ideas?
Try to use the MySQL internal cleanup routines to repair your INDEXes:
Type this on the MySQL CLI: