[英]MySQL query breaks on certain WHERE condition
I have a MySQL query that only crashes on one certain where clause, it says the table has crashed and needs to be repaired
. 我有一个MySQL查询,该查询仅在某个确定的where子句上崩溃,它说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: 尝试使用MySQL内部清理例程来修复您的INDEX:
Type this on the MySQL CLI: 在MySQL CLI上键入以下内容:
REPAIR TABLE Messages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.