mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
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
This commit is contained in:
parent
b3d194f252
commit
804ce01a31
3 changed files with 22 additions and 1 deletions
|
|
@ -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 *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue