diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-11-08 17:37:19 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-12-04 16:09:34 +0100 |
commit | 227510e039b4ec6bff3096a4b9b39847551dab1a (patch) | |
tree | 2c40cbba45ca53e688d3f5cd388dbcd032c82984 /mysql-test/t/sp.test | |
parent | d1522af72dad1965b8a8a37415545014ba743f49 (diff) | |
download | mariadb-git-227510e039b4ec6bff3096a4b9b39847551dab1a.tar.gz |
parser cleanup: don't store field properties in LEX, use Create_field directly
length/dec/charset are still in LEX, because they're also used
for CAST and dynamic columns.
also
1. fix "MDEV-7041 COLLATION(CAST('a' AS CHAR BINARY)) returns a wrong result"
2. allow BINARY modifier in stored function RETURN clause
3. allow "COLLATION without CHARSET" in SP/SF (parameters, RETURN, DECLARE)
4. print correct variable name in error messages for stored routine parameters
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r-- | mysql-test/t/sp.test | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 5179bb1b03d..3f635acaac9 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -4355,17 +4355,14 @@ begin return f1; end| drop function bug9048| -# -# This was disabled in 5.1.12. See bug #20701 -# When collation support in SP is implemented, then this test should -# be removed. -# ---error ER_NOT_SUPPORTED_YET + create function bug9048(f1 char binary) returns char binary begin set f1= concat( 'hello', f1 ); return f1; end| +select collation(bug9048("foo"))| +drop function bug9048| # Bug #12849 Stored Procedure: Crash on procedure call with CHAR type # 'INOUT' parameter @@ -9303,3 +9300,27 @@ DROP PROCEDURE p1; DROP TABLE t1; --echo # End of 5.5 test + +DELIMITER |; +CREATE FUNCTION f(f1 VARCHAR(64) COLLATE latin1_german2_ci) + RETURNS VARCHAR(64) +BEGIN + RETURN 'str'; +END| +DROP FUNCTION f| + +CREATE FUNCTION f(f1 VARCHAR(64)) + RETURNS VARCHAR(64) COLLATE latin1_german2_ci +BEGIN + RETURN 'str'; +END| +DROP FUNCTION f| + +CREATE FUNCTION f(f1 VARCHAR(64)) + RETURNS VARCHAR(64) +BEGIN + DECLARE f2 VARCHAR(64) COLLATE latin1_german2_ci; + RETURN 'str'; +END| +DROP FUNCTION f| +DELIMITER ;| |