diff options
author | unknown <tnurnberg@mysql.com/sin.azundris.com> | 2007-02-12 14:31:44 +0100 |
---|---|---|
committer | unknown <tnurnberg@mysql.com/sin.azundris.com> | 2007-02-12 14:31:44 +0100 |
commit | 4dc7c1aa46c4980833dd0f20bdc0650d9bd669c0 (patch) | |
tree | bde0083f74a889125a20078ffdabc6890565c179 /sql/table.cc | |
parent | 0ce5985f111d631829f552d7cfec97392494f54e (diff) | |
download | mariadb-git-4dc7c1aa46c4980833dd0f20bdc0650d9bd669c0.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.
mysql-test/r/type_enum.result:
Bug#24660: "enum" field type definition problem
Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
char in some locales), or ',', or both.
mysql-test/t/type_enum.test:
Bug#24660: "enum" field type definition problem
Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
char in some locales), or ',', or both.
sql/table.cc:
Bug#24660: "enum" field type definition problem
Revert fix for Bug#20922.
sql/unireg.cc:
Bug#24660: "enum" field type definition problem
Use a field-separator for ENUM-values that is not part of those values. If impossible,
throw error.
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 11 |
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; } |