mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / t / sp-ucs2.test
blob7d6b62dfea0f2de8a34bf267dcf72ca11996cd61
1 -- source include/have_ucs2.inc
3 delimiter |;
6 # BUG#17615: problem with character set
8 --disable_warnings
9 drop function if exists bug17615|
10 --enable_warnings
12 create table t3 (a varchar(256) unicode)|
14 create function bug17615() returns varchar(256) unicode
15 begin
16   declare tmp_res varchar(256) unicode;
17   set tmp_res= 'foo string';
18   return tmp_res;
19 end|
21 insert into t3 values(bug17615())|
22 select * from t3|
24 drop function bug17615|
25 drop table t3|
28 delimiter ;|
31 # Bug#48766 SHOW CREATE FUNCTION returns extra data in return clause
33 SET NAMES utf8;
34 --disable_warnings
35 DROP FUNCTION IF EXISTS bug48766;
36 --enable_warnings
38 # Test that Latin letters are not prepended with extra '\0'.
40 CREATE FUNCTION bug48766 ()
41   RETURNS ENUM( 'w' ) CHARACTER SET ucs2
42   RETURN 0;
43 SHOW CREATE FUNCTION bug48766;
44 SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
45 WHERE ROUTINE_NAME='bug48766';
46 DROP FUNCTION bug48766;
48 # Test non-Latin characters
50 CREATE FUNCTION bug48766 ()
51   RETURNS ENUM('а','б','в','г') CHARACTER SET ucs2
52   RETURN 0;
53 SHOW CREATE FUNCTION bug48766;
54 SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
55 WHERE ROUTINE_NAME='bug48766';
57 DROP FUNCTION bug48766;