- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我刚刚看到 MySQL 5.5 提供了 utf8_general_mysql500_ci
作为排序规则。
与 utf8_general_ci
等其他排序规则有什么区别?
我应该更好地使用 utf8_general_mysql500_ci
吗?
最佳答案
根据 Changes in MySQL 5.5.21 记录:
New
utf8_general_mysql500_ci
anducs2_general_mysql500_ci
collations have been added that preserve the behavior ofutf8_general_ci
anducs2_general_ci
from versions of MySQL previous to 5.1.24. Bug #27877 corrected an error in the original collations but introduced an incompatibility for columns that contain German'ß'
LATIN SMALL LETTER SHARP S. (As a result of the fix, that character compares equal to characters with which it previously compared different.) A symptom of the problem after upgrading to MySQL 5.1.24 or newer from a version older than 5.1.24 is thatCHECK TABLE
produces this error:Table upgrade required.Please do "REPAIR TABLE `t`" or dump/reload to fix it!Unfortunately,
REPAIR TABLE
could not fix the problem. The new collations permit older tables created before MySQL 5.1.24 to be upgraded to current versions of MySQL.To convert an affected table after a binary upgrade that leaves the table files in place, alter the table to use the new collation. Suppose that the table
t1
contains one or more problematicutf8
columns. To convert the table at the table level, use a statement like this:ALTER TABLE t1
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci;To apply the change on a column-specific basis, use a statement like this (be sure to repeat the column definition as originally specified except for the
COLLATE
clause):ALTER TABLE t1
MODIFY c1 CHAR(N) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci;To upgrade the table using a dump and reload procedure, dump the table using mysqldump, modify the
CREATE TABLE
statement in the dump file to use the new collation, and reload the table.After making the appropriate changes,
CHECK TABLE
should report no error.For more information, see Checking Whether Tables or Indexes Must Be Rebuilt, and Rebuilding or Repairing Tables or Indexes. (Bug #43593, Bug #11752408)
关于MySQL - 什么是 utf8_general_mysql500_ci?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16589472/
我是一名优秀的程序员,十分优秀!