summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 5b41ad48696..1877e3f926c 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -802,7 +802,21 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
count)))
goto err;
for (count= 0; count < interval->count; count++)
- interval->type_lengths[count]= strlen(interval->type_names[count]);
+ {
+ char *val= (char*) interval->type_names[count];
+ interval->type_lengths[count]= strlen(val);
+ /*
+ Replace all ',' symbols with NAMES_SEP_CHAR.
+ See the comment in unireg.cc, pack_fields() function
+ for details.
+ */
+ for (uint cnt= 0 ; cnt < interval->type_lengths[count] ; cnt++)
+ {
+ char c= val[cnt];
+ if (c == ',')
+ val[cnt]= NAMES_SEP_CHAR;
+ }
+ }
interval->type_lengths[count]= 0;
}
}