summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/deer.(none)>2006-10-12 13:50:22 +0500
committerunknown <holyfoot/hf@mysql.com/deer.(none)>2006-10-12 13:50:22 +0500
commitbac62fa32e2bb89613948205950f140b622ebd15 (patch)
tree463e189f3d056f27e63df311f204f3cc1b4b0993 /sql/unireg.cc
parent4fc506529cf56789307241dd0c0b348f48ef5a71 (diff)
parent1ba54cad969fe85a4d1d21140f14ede105b40555 (diff)
downloadmariadb-git-bac62fa32e2bb89613948205950f140b622ebd15.tar.gz
Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/mysql-5.0.mrg include/m_ctype.h: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/type_enum.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged sql/item_func.cc: Auto merged sql/sql_select.cc: Auto merged sql/table.cc: Auto merged sql/unireg.cc: Auto merged strings/ctype-mb.c: SCCS merged strings/ctype-utf8.c: SCCS merged
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 93afd9c9e4e..768a288ca19 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -718,6 +718,21 @@ static bool pack_fields(File file, List<create_field> &create_fields,
tmp.append(NAMES_SEP_CHAR);
for (const char **pos=field->interval->type_names ; *pos ; pos++)
{
+ char *val= (char*) *pos;
+ uint str_len= strlen(val);
+ /*
+ Note, hack: in old frm NAMES_SEP_CHAR is used to separate
+ names in the interval (ENUM/SET). To allow names to contain
+ NAMES_SEP_CHAR, we replace it with a comma before writing frm.
+ Backward conversion is done during frm file opening,
+ See table.cc, openfrm() function
+ */
+ for (uint cnt= 0 ; cnt < str_len ; cnt++)
+ {
+ char c= val[cnt];
+ if (c == NAMES_SEP_CHAR)
+ val[cnt]= ',';
+ }
tmp.append(*pos);
tmp.append(NAMES_SEP_CHAR);
}