mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Fix for bug #40053: 'check table .. for upgrade' doesn't detect
collation change made in 5.1.24-rc Problem: 'CHECK TABLE ... FOR UPGRADE' did not check for incompatible collation changes made in MySQL 5.1.24-rc. Fix: add the check.
This commit is contained in:
parent
ac1c5f5046
commit
bde82a86f4
1 changed files with 13 additions and 10 deletions
|
@ -2765,7 +2765,7 @@ int handler::check_collation_compatibility()
|
|||
{
|
||||
ulong mysql_version= table->s->mysql_version;
|
||||
|
||||
if (mysql_version < 50048)
|
||||
if (mysql_version < 50124)
|
||||
{
|
||||
KEY *key= table->key_info;
|
||||
KEY *key_end= key + table->s->keys;
|
||||
|
@ -2779,15 +2779,18 @@ int handler::check_collation_compatibility()
|
|||
continue;
|
||||
Field *field= table->field[key_part->fieldnr - 1];
|
||||
uint cs_number= field->charset()->number;
|
||||
if (mysql_version < 50048 &&
|
||||
(cs_number == 11 || /* ascii_general_ci - bug #29499, bug #27562 */
|
||||
cs_number == 41 || /* latin7_general_ci - bug #29461 */
|
||||
cs_number == 42 || /* latin7_general_cs - bug #29461 */
|
||||
cs_number == 20 || /* latin7_estonian_cs - bug #29461 */
|
||||
cs_number == 21 || /* latin2_hungarian_ci - bug #29461 */
|
||||
cs_number == 22 || /* koi8u_general_ci - bug #29461 */
|
||||
cs_number == 23 || /* cp1251_ukrainian_ci - bug #29461 */
|
||||
cs_number == 26)) /* cp1250_general_ci - bug #29461 */
|
||||
if ((mysql_version < 50048 &&
|
||||
(cs_number == 11 || /* ascii_general_ci - bug #29499, bug #27562 */
|
||||
cs_number == 41 || /* latin7_general_ci - bug #29461 */
|
||||
cs_number == 42 || /* latin7_general_cs - bug #29461 */
|
||||
cs_number == 20 || /* latin7_estonian_cs - bug #29461 */
|
||||
cs_number == 21 || /* latin2_hungarian_ci - bug #29461 */
|
||||
cs_number == 22 || /* koi8u_general_ci - bug #29461 */
|
||||
cs_number == 23 || /* cp1251_ukrainian_ci - bug #29461 */
|
||||
cs_number == 26)) || /* cp1250_general_ci - bug #29461 */
|
||||
(mysql_version < 50124 &&
|
||||
(cs_number == 33 || /* utf8_general_ci - bug #27877 */
|
||||
cs_number == 35))) /* ucs2_general_ci - bug #27877 */
|
||||
return HA_ADMIN_NEEDS_UPGRADE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue