summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authortnurnberg@mysql.com/sin.azundris.com <>2007-02-12 14:31:44 +0100
committertnurnberg@mysql.com/sin.azundris.com <>2007-02-12 14:31:44 +0100
commitdb7ac2c0c782424d6081a2c4db9df71d36dd425e (patch)
treebde0083f74a889125a20078ffdabc6890565c179 /sql/table.cc
parentba6d2bbf64e68ec7a061cbb96bcd76df81be8d4b (diff)
downloadmariadb-git-db7ac2c0c782424d6081a2c4db9df71d36dd425e.tar.gz
Bug#24660: "enum" field type definition problem
ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales. This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from being used. Now if 0xff makes an appearance, we find a character not used in the enum and use that as a separator. If no such character exists, we throw an error. Any solution would have broken some sort of existing behaviour. This solution should serve both fractions (those with 0xff and those with ',' in their enums), but WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/ That is, mysqldump with their current server, and restore when upgrading to one with this patch.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/sql/table.cc b/sql/table.cc
index aff1e6d11f6..9ff4ec29914 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -391,17 +391,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
{
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;
}