diff options
author | msvensson@neptunus.(none) <> | 2005-12-07 15:45:31 +0100 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2005-12-07 15:45:31 +0100 |
commit | a626b51dada76728856245493f6ec8df0b671770 (patch) | |
tree | 776b6cfc2952db07d3fcd85e5fd5058eecef6ec2 /sql/item_strfunc.h | |
parent | 7ce92291f039f6ebec328205701da59603c21c69 (diff) | |
download | mariadb-git-a626b51dada76728856245493f6ec8df0b671770.tar.gz |
BUG#9535 Warning for "create table t as select uuid();"
- Set max_length of Item_func_uuid to max_length*system_charset_info->mbmaxlen
Note! Item_func_uuid should be set to use 'ascii' charset when hex(), format(), md5()
etc will use 'ascii'
- Comitting again, the old patch seems to have been lost.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index c4505fce248..89bab4a909c 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -748,7 +748,12 @@ public: Item_func_uuid(): Item_str_func() {} void fix_length_and_dec() { collation.set(system_charset_info); - max_length= UUID_LENGTH; + /* + NOTE! uuid() should be changed to use 'ascii' + charset when hex(), format(), md5(), etc, and implicit + number-to-string conversion will use 'ascii' + */ + max_length= UUID_LENGTH * system_charset_info->mbmaxlen; } const char *func_name() const{ return "uuid"; } String *val_str(String *); |