mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added sql_mode PAD_CHAR_TO_FULL_LENGTH (WL#921)
This pads the value of CHAR columns with spaces up to full column length (according to ANSI) It's not makde part of oracle or ansi mode yet, as this would cause a notable behaviour change. Added uuid_short(), a generator for increasing 'unique' longlong integers (8 bytes)
This commit is contained in:
@ -475,9 +475,24 @@ set sql_mode=16384+(65536*4);
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
|
||||
set sql_mode=2147483648;
|
||||
ERROR 42000: Variable 'sql_mode' can't be set to the value of '2147483648'
|
||||
set sql_mode=2147483648*2;
|
||||
ERROR 42000: Variable 'sql_mode' can't be set to the value of '4294967296'
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
|
||||
set sql_mode=PAD_CHAR_TO_FULL_LENGTH;
|
||||
create table t1 (a int auto_increment primary key, b char(5));
|
||||
insert into t1 (b) values('a'),('b\t'),('c ');
|
||||
select concat('x',b,'x') from t1;
|
||||
concat('x',b,'x')
|
||||
xa x
|
||||
xb x
|
||||
xc x
|
||||
set sql_mode=0;
|
||||
select concat('x',b,'x') from t1;
|
||||
concat('x',b,'x')
|
||||
xax
|
||||
xb x
|
||||
xcx
|
||||
drop table t1;
|
||||
SET @@SQL_MODE=@OLD_SQL_MODE;
|
||||
|
Reference in New Issue
Block a user