mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Merge neptunus.(none):/home/msvensson/mysql/bug9535
into neptunus.(none):/home/msvensson/mysql/mysql-5.0 sql/item_strfunc.h: Auto merged
This commit is contained in:
commit
7d740ed61c
3 changed files with 22 additions and 1 deletions
|
@ -51,3 +51,11 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
|
|||
a
|
||||
2004-01-06 12:34:00
|
||||
drop table t1;
|
||||
create table t1 as select uuid(), length(uuid());
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`uuid()` varchar(36) character set utf8 NOT NULL default '',
|
||||
`length(uuid())` int(10) NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
|
|
@ -38,3 +38,11 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
|
|||
|
||||
drop table t1;
|
||||
|
||||
# Test for BUG#9535
|
||||
create table t1 as select uuid(), length(uuid());
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -726,7 +726,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…
Reference in a new issue