diff options
author | holyfoot/hf@mysql.com/deer.(none) <> | 2006-10-12 13:50:22 +0500 |
---|---|---|
committer | holyfoot/hf@mysql.com/deer.(none) <> | 2006-10-12 13:50:22 +0500 |
commit | edc902684232fd04696f31b69a8f494f752d1b36 (patch) | |
tree | 463e189f3d056f27e63df311f204f3cc1b4b0993 /sql/unireg.cc | |
parent | 2c7ef3ebacd45d21a3f09ff5a245d57f3d65be4a (diff) | |
parent | 5dded17489acd0faac3f32e911090f4e9bc8fb07 (diff) | |
download | mariadb-git-edc902684232fd04696f31b69a8f494f752d1b36.tar.gz |
Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/mysql-5.0.mrg
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 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); } |