diff options
author | unknown <holyfoot/hf@deer.(none)> | 2006-10-12 15:42:05 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@deer.(none)> | 2006-10-12 15:42:05 +0500 |
commit | 89d5a1a541262b6902a636d4911eb9b48a2e476b (patch) | |
tree | 01f4bc3b8707f03ab053973132c8b7ccbcbe62a9 /sql/unireg.cc | |
parent | 16f2de1df2e585182ed558b01dd0f3ed0d1ae549 (diff) | |
parent | bac62fa32e2bb89613948205950f140b622ebd15 (diff) | |
download | mariadb-git-89d5a1a541262b6902a636d4911eb9b48a2e476b.tar.gz |
Merge mysql.com:/home/hf/mysql-5.0.mrg
into mysql.com:/home/hf/mysql-5.1.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/CHARSET_INFO.txt:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-utf8.c:
Auto merged
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 2ea572c782c..a20c59fd796 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -793,6 +793,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); } |