summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2010-02-26 10:28:44 +0400
committerAlexander Barkov <bar@mysql.com>2010-02-26 10:28:44 +0400
commit69904fa6584b383368c94b1531e1a1a8a57f43b5 (patch)
treeb1413763439eb460cdf0a41e595c67527384c548 /storage
parent678096199e54ca7afa5b5365f73281e1f799d5d0 (diff)
downloadmariadb-git-69904fa6584b383368c94b1531e1a1a8a57f43b5.tar.gz
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.
Diffstat (limited to 'storage')
-rw-r--r--storage/heap/ha_heap.cc2
-rw-r--r--storage/myisam/ha_myisam.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 8d07d21c6ae..4d01b9fd1c9 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -689,7 +689,7 @@ int ha_heap::create(const char *name, TABLE *table_arg,
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;
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 1117e8fff15..8a32e7255c0 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -274,7 +274,7 @@ int table2myisam(TABLE *table_arg, MI_KEYDEF **keydef_out,
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)
{