[Commits] a695b9f: test result

sanja at mariadb.com sanja at mariadb.com
Tue Mar 17 15:35:18 EET 2015


revision-id: a695b9fb9f1f69615a4d42aae4ec33afb5c6b012
parent(s): cbfded120ed1310b5225fda0c95faabd0a8ed2bc
committer: Oleksandr Byelkin
branch nick: server
timestamp: 2015-03-17 14:35:15 +0100
message:

test result

---
 mysql-test/r/set_statement.result | 49 ++++++++++++++++++++++++++++++++-------
 mysql-test/t/set_statement.test   | 27 ++++++++++++++-------
 2 files changed, 60 insertions(+), 16 deletions(-)

diff --git a/mysql-test/r/set_statement.result b/mysql-test/r/set_statement.result
index 7519ce1..d05c1e2 100644
--- a/mysql-test/r/set_statement.result
+++ b/mysql-test/r/set_statement.result
@@ -705,14 +705,27 @@ drop procedure p6;
 SELECT @@sql_mode;
 @@sql_mode
 
-# SET and the statement parsed as one unit before the SET takes effect
 SET STATEMENT sql_mode='ansi' FOR
 CREATE PROCEDURE p6() BEGIN
 SELECT @@sql_mode;
 SELECT "t1".* FROM t1;
 END|
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.* FROM t1;
-END' at line 4
+call p6;
+@@sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
+v1	v2
+1	2
+3	4
+ALTER TABLE t1 ADD COLUMN v3 int;
+# no reparsing for now
+call p6;
+@@sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
+v1	v2
+1	2
+3	4
+ALTER TABLE t1 drop COLUMN v3;
+drop procedure p6;
 SELECT @@sql_mode;
 @@sql_mode
 
@@ -739,8 +752,11 @@ BEGIN NOT ATOMIC
 SELECT @@sql_mode;
 SELECT "t1".* FROM t1;
 END|
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.* FROM t1;
-END' at line 4
+@@sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
+v1	v2
+1	2
+3	4
 SET STATEMENT sql_mode='ansi' FOR
 BEGIN NOT ATOMIC
 SELECT @@sql_mode;
@@ -895,7 +911,7 @@ SET STATEMENT myisam_sort_buffer_size = 700000, sort_buffer_size = 3000000
 FOR SET STATEMENT myisam_sort_buffer_size=200000
 FOR SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
 @@myisam_sort_buffer_size	@@sort_buffer_size
-200000	100000
+200000	3000000
 SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
 @@myisam_sort_buffer_size	@@sort_buffer_size
 500000	100000
@@ -945,10 +961,10 @@ deallocate prepare stmt1;
 set statement binlog_format=row for PREPARE stmt1 FROM 'SELECT @@binlog_format';
 execute stmt1;
 @@binlog_format
-MIXED
+ROW
 execute stmt1;
 @@binlog_format
-MIXED
+ROW
 deallocate prepare stmt1;
 PREPARE stmt1 FROM 'set statement binlog_format=row for SELECT @@binlog_format';
 execute stmt1;
@@ -1212,3 +1228,20 @@ set @rnd=1;
 select @rnd;
 @rnd
 0
+#
+# MDEV-7012 SET STATEMENT character_set_client, character_set_connection,
+# character_set_filesystem, collation_connection have no effect
+#
+set @character_set_client_save= @@character_set_client;
+set names utf8;
+select 'фи';
+фи
+фи
+set statement character_set_client = latin5 for select 'фи';
+фи
+фи
+set character_set_client = latin5;
+select 'фи';
+фи
+фи
+set character_set_client=@character_set_client_save;
diff --git a/mysql-test/t/set_statement.test b/mysql-test/t/set_statement.test
index af372d9..dae80af 100644
--- a/mysql-test/t/set_statement.test
+++ b/mysql-test/t/set_statement.test
@@ -660,20 +660,18 @@ drop procedure p6;
 
 SELECT @@sql_mode;
 DELIMITER |;
---echo # SET and the statement parsed as one unit before the SET takes effect
-# --error ER_PARSE_ERROR
 SET STATEMENT sql_mode='ansi' FOR
               CREATE PROCEDURE p6() BEGIN
               SELECT @@sql_mode;
               SELECT "t1".* FROM t1;
               END|
 DELIMITER ;|
-#call p1;
-#ALTER TABLE t1 ADD COLUMN v3 int;
-#--echo # no reparsing for now
-#call p1;
-#ALTER TABLE t1 drop COLUMN v3;
-#drop procedure p1;
+call p6;
+ALTER TABLE t1 ADD COLUMN v3 int;
+--echo # no reparsing for now
+call p6;
+ALTER TABLE t1 drop COLUMN v3;
+drop procedure p6;
 
 
 # the above test about compound statement
@@ -1123,3 +1121,16 @@ while ($1)
 --enable_query_log
 --echo # @rnd should be 0
 select @rnd;
+
+
+--echo #
+--echo # MDEV-7012 SET STATEMENT character_set_client, character_set_connection,
+--echo # character_set_filesystem, collation_connection have no effect
+--echo #
+set @character_set_client_save= @@character_set_client;
+set names utf8;
+select 'фи';
+set statement character_set_client = latin5 for select 'фи';
+set character_set_client = latin5;
+select 'фи';
+set character_set_client=@character_set_client_save;


More information about the commits mailing list