MySQL错误:“列'列名'不能是FULLTEXT索引的一部分” [英] MySQL error: "Column 'columnname' cannot be part of FULLTEXT index"

查看:3090
本文介绍了MySQL错误:“列'列名'不能是FULLTEXT索引的一部分”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我将一堆列更改为utf8_general_ci(默认的UTF-8排序规则),但是当尝试更改特定列时,我收到了MySQL错误:

 列'node_content'不能是FULLTEXT索引的一部分

通过文档,MySQL似乎有一个问题,FULLTEXT索引一些多字节字符集,如UCS-2,但它应该工作在UTF-8。



我在最新稳定的MySQL 5.0.x版本(5.0.77我相信)。

解决方案

找到我的问题的答案:



FULLTEXT索引的所有列必须不仅具有相同的字符集,还必须具有相同的排序规则。 / p>

我的FULLTEXT索引在其一列上有utf8_unicode_ci,在其他列上有utf8_general_ci。


Recently I changed a bunch of columns to utf8_general_ci (the default UTF-8 collation) but when attempting to change a particular column, I received the MySQL error:

Column 'node_content' cannot be part of FULLTEXT index

In looking through docs, it appears that MySQL has a problem with FULLTEXT indexes on some multi-byte charsets such as UCS-2, but that it should work on UTF-8.

I'm on the latest stable MySQL 5.0.x release (5.0.77 I believe).

解决方案

Oops, so I have found the answer to my problem:

All columns of a FULLTEXT index must have not only the same character set but also the same collation.

My FULLTEXT index had utf8_unicode_ci on one of its columns, and utf8_general_ci on its other columns.

这篇关于MySQL错误:“列'列名'不能是FULLTEXT索引的一部分”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆