diff options
Diffstat (limited to 'mysql-test/r/sql_mode.result')
-rw-r--r-- | mysql-test/r/sql_mode.result | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index c7be653ca2e..2b34ff8c021 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -426,37 +426,37 @@ a\b a\'b a"\b a"\'b SET @@SQL_MODE=''; create function `foo` () returns int return 5; show create function `foo`; -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation foo CREATE DEFINER=`root`@`localhost` FUNCTION `foo`() RETURNS int(11) -return 5 +return 5 latin1 latin1_swedish_ci latin1_swedish_ci SET @@SQL_MODE='ANSI_QUOTES'; show create function `foo`; -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation foo CREATE DEFINER=`root`@`localhost` FUNCTION `foo`() RETURNS int(11) -return 5 +return 5 latin1 latin1_swedish_ci latin1_swedish_ci drop function `foo`; create function `foo` () returns int return 5; show create function `foo`; -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation foo ANSI_QUOTES CREATE DEFINER="root"@"localhost" FUNCTION "foo"() RETURNS int(11) -return 5 +return 5 latin1 latin1_swedish_ci latin1_swedish_ci SET @@SQL_MODE=''; show create function `foo`; -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation foo ANSI_QUOTES CREATE DEFINER="root"@"localhost" FUNCTION "foo"() RETURNS int(11) -return 5 +return 5 latin1 latin1_swedish_ci latin1_swedish_ci drop function `foo`; SET @@SQL_MODE=''; create table t1 (a int); create table t2 (a int); create view v1 as select a from t1; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci SET @@SQL_MODE='ANSI_QUOTES'; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "v1" AS select "t1"."a" AS "a" from "t1" +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "v1" AS select "t1"."a" AS "a" from "t1" latin1 latin1_swedish_ci create view v2 as select a from t2 where a in (select a from v1); drop view v2, v1; drop table t1, t2; @@ -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; |