0

我有一个 MySQL 查询,它只在一个特定的 where 子句上崩溃,它说table has crashed and needs to be repaired.

此查询有效:

SELECT
    DirectionId
FROM
    Messages
WHERE
    CustomField1 = 56 AND DirectionId = 1

这个不

SELECT
    DirectionId
FROM
    Messages
WHERE
    CustomField1 = 209 AND DirectionId = 1

但如果我这样做,它会起作用:

SELECT
    DirectionId
FROM
    Messages
WHERE
    CustomField1 = 209

或者这也有效

SELECT
    DirectionId
FROM
    Messages
WHERE
    DirectionId = 1

有任何想法吗?

4

1 回答 1

0

尝试使用 MySQL 内部清理例程来修复您的索引:

在 MySQL CLI 上键入:

REPAIR TABLE Messages
于 2012-05-24T10:03:30.667 回答