diff options
author | unknown <msvensson@neptunus.(none)> | 2005-05-17 20:31:26 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-05-17 20:31:26 +0200 |
commit | 804ce01a316d6f55f54e7580e7ef42384fb1d750 (patch) | |
tree | 42f8762f3c6f6963adfa9166c3069509a3a12c5c /sql/item_strfunc.h | |
parent | b3d194f2521cc1eb7d682af3329925b3a6cdf5e3 (diff) | |
download | mariadb-git-804ce01a316d6f55f54e7580e7ef42384fb1d750.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'
mysql-test/r/func_misc.result:
Test results
mysql-test/t/func_misc.test:
Test case
sql/item_strfunc.h:
Multiply max_length of Item_func_uuid with system_charset_info->mbmaxlen
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 d7c77829cfc..3ddf225d593 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -727,7 +727,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 *); |