List:Commits« Previous MessageNext Message »
From:Ramil Kalimullin Date:October 17 2008 12:45pm
Subject:bzr commit into mysql-5.1 branch (ramil:2771) Bug#40053
View as plain text  
#At file:///home/ram/mysql/b40053.5.1-5.1.29-rc/

 2771 Ramil Kalimullin	2008-10-17
      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.
modified:
  sql/handler.cc

per-file messages:
  sql/handler.cc
      - check for incompatible collation changes made in 5.1.24-rc:
    bug #27877:
      utf8_general_ci
      ucs2_general_ci
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-10-08 13:52:57 +0000
+++ b/sql/handler.cc	2008-10-17 12:45:17 +0000
@@ -2765,7 +2765,7 @@ int handler::check_collation_compatibili
 {
   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_compatibili
           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;
       }  
     }  

Thread
bzr commit into mysql-5.1 branch (ramil:2771) Bug#40053Ramil Kalimullin17 Oct