List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:February 26 2010 6:34am
Subject:bzr commit into mysql-5.5-next-mr branch (bar:3004) WL#2649
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-next-mr-bar.w2649v4/ based on revid:bar@stripped

 3004 Alexander Barkov	2010-02-26
      After-fix for WL#2649 Number-to-string conversion.
      
      This change fixes test failure for partition_repair_myisam
      and partition_recover_myisam.
      
      The problem was that:
      - the file std_data/corrupt_crash.MYI
        contains charsetnr=63 (binary) for index segments.
      - the new .frm file contains charsetnr=8 (latin1) for
        the same segments.
      As a result REPAIR refused to repair frm+MYI files
      with different segment definition.
      
      This fix restores the old behavior for frm and MYI files:
      they now store charsetnr=63 for numeric/datetime data types.

    modified:
      storage/heap/ha_heap.cc
      storage/myisam/ha_myisam.cc
=== modified file 'storage/heap/ha_heap.cc'
--- a/storage/heap/ha_heap.cc	2009-12-05 01:26:15 +0000
+++ b/storage/heap/ha_heap.cc	2010-02-26 06:28:44 +0000
@@ -689,7 +689,7 @@ int ha_heap::create(const char *name, TA
       if (field->flags & (ENUM_FLAG | SET_FLAG))
         seg->charset= &my_charset_bin;
       else
-        seg->charset= field->charset();
+        seg->charset= field->charset_for_protocol();
       if (field->null_ptr)
       {
 	seg->null_bit= field->null_bit;

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2010-01-07 05:42:07 +0000
+++ b/storage/myisam/ha_myisam.cc	2010-02-26 06:28:44 +0000
@@ -274,7 +274,7 @@ int table2myisam(TABLE *table_arg, MI_KE
       keydef[i].seg[j].bit_start= keydef[i].seg[j].bit_end=
         keydef[i].seg[j].bit_length= 0;
       keydef[i].seg[j].bit_pos= 0;
-      keydef[i].seg[j].language= field->charset()->number;
+      keydef[i].seg[j].language= field->charset_for_protocol()->number;
 
       if (field->null_ptr)
       {


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20100226062844-gcsasisbf343c16s.bundle
Thread
bzr commit into mysql-5.5-next-mr branch (bar:3004) WL#2649Alexander Barkov26 Feb