summaryrefslogtreecommitdiff
path: root/mysql-test/r/sql_mode.result
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2007-04-27 01:12:09 +0300
committerunknown <monty@mysql.com/nosik.monty.fi>2007-04-27 01:12:09 +0300
commit4958eec7ec52f4208deb1dad18900af6db728b66 (patch)
treeab5977df458d372792f72857af0001e0f9e93f8a /mysql-test/r/sql_mode.result
parent51e016f1845b962a705af589aa7af599462c1743 (diff)
downloadmariadb-git-4958eec7ec52f4208deb1dad18900af6db728b66.tar.gz
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) mysql-test/r/func_misc.result: Update results mysql-test/r/sql_mode.result: Update results mysql-test/t/func_misc.test: Added test for uuid_short() mysql-test/t/sql_mode.test: Added test for sql_mode=PAD_CHAR_TO_FULL_LENGTH (#WL921) sql/field.cc: Added sql_mode PAD_CHAR_TO_FULL_LENGTH sql/item.cc: Initialize uuid_short() sql/item_create.cc: Added creation of uuid_short() sql/item_func.cc: Added uuid_short() sql/item_func.h: Added uuid_short() sql/mysql_priv.h: Added sql_mode PAD_CHAR_TO_FULL_LENGTH sql/mysqld.cc: Added sql_mode PAD_CHAR_TO_FULL_LENGTH
Diffstat (limited to 'mysql-test/r/sql_mode.result')
-rw-r--r--mysql-test/r/sql_mode.result19
1 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result
index c7be653ca2e..9998a51fdc8 100644
--- a/mysql-test/r/sql_mode.result
+++ b/mysql-test/r/sql_mode.result
@@ -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;