List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:October 7 2008 11:46am
Subject:bzr commit into mysql-5.0-bugteam branch (kgeorge:2689) Bug#39585
View as plain text  
#At file:///home/kgeorge/mysql/bzr/B39585-5.0-5.1.29-rc/

 2689 Georgi Kodinov	2008-10-07
      Bug #39585: innodb and myisam corruption after binary upgrade from <=5.0.46 to >=5.0.48
      
      There was a change in the binary format introduced in 5.0.48 by the ascii collation definition 
      update fix for bug 27562.
      This was undetected by CHECK TABLE.
      Fixed by checking if there are fields with the ascii collation in tables created with 
      versions before 5.0.48.
modified:
  sql/handler.cc

per-file messages:
  sql/handler.cc
    Bug #39585: check for ascii columns in pre-format update tables.
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-05-17 07:53:47 +0000
+++ b/sql/handler.cc	2008-10-07 11:45:44 +0000
@@ -1982,6 +1982,21 @@ int handler::ha_check_for_upgrade(HA_CHE
   }
   if (table->s->frm_version != FRM_VER_TRUE_VARCHAR)
     return HA_ADMIN_NEEDS_ALTER;
+  if (table->s->mysql_version <= 50046)
+  {
+    /* check for the incompatible change intorduced by bug 27562 */
+    Field** field;
+    CHARSET_INFO *cs_ascii = get_charset_by_name ("ascii_general_ci", MYF(0));
+    if (cs_ascii)
+    {
+      for (field= table->field; (*field); field++)
+      {
+        if ((*field)->charset() == cs_ascii)
+          return HA_ADMIN_NEEDS_UPGRADE;
+      }
+    }
+  }
+
   return check_for_upgrade(check_opt);
 }
 

Thread
bzr commit into mysql-5.0-bugteam branch (kgeorge:2689) Bug#39585Georgi Kodinov7 Oct