~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/t/sp-ucs2.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
Import upstream version 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_ucs2.inc
 
2
 
 
3
delimiter |;
 
4
 
 
5
#
 
6
# BUG#17615: problem with character set
 
7
#
 
8
--disable_warnings
 
9
drop function if exists bug17615|
 
10
--enable_warnings
 
11
 
 
12
create table t3 (a varchar(256) unicode)|
 
13
 
 
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|
 
20
 
 
21
insert into t3 values(bug17615())|
 
22
select * from t3|
 
23
 
 
24
drop function bug17615|
 
25
drop table t3|
 
26
 
 
27
 
 
28
delimiter ;|
 
29
 
 
30
#
 
31
# Bug#48766 SHOW CREATE FUNCTION returns extra data in return clause
 
32
#
 
33
SET NAMES utf8;
 
34
--disable_warnings
 
35
DROP FUNCTION IF EXISTS bug48766;
 
36
--enable_warnings
 
37
#
 
38
# Test that Latin letters are not prepended with extra '\0'.
 
39
#
 
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;
 
47
#
 
48
# Test non-Latin characters
 
49
#
 
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';
 
56
 
 
57
DROP FUNCTION bug48766;