~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/r/innodb-2byte-collation.result

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
show variables like 'character_sets_dir%';
 
2
Variable_name   Value
 
3
character_sets_dir      MYSQL_TEST_DIR/std_data/
 
4
set names utf8;
 
5
select * from information_schema.collations where id>256 order by id;
 
6
COLLATION_NAME  CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 
7
utf8mb4_test_ci utf8mb4 326                     8
 
8
utf16_test_ci   utf16   327                     8
 
9
utf8mb4_test_400_ci     utf8mb4 328                     8
 
10
utf8_bengali_standard_ci        utf8    336                     8
 
11
utf8_bengali_traditional_ci     utf8    337                     8
 
12
utf8_phone_ci   utf8    352                     8
 
13
utf8_test_ci    utf8    353                     8
 
14
utf8_5624_1     utf8    354                     8
 
15
utf8_5624_2     utf8    355                     8
 
16
utf8_5624_3     utf8    356                     8
 
17
utf8_5624_4     utf8    357                     8
 
18
ucs2_test_ci    ucs2    358                     8
 
19
ucs2_vn_ci      ucs2    359                     8
 
20
ucs2_5624_1     ucs2    360                     8
 
21
utf8_5624_5     utf8    368                     8
 
22
utf32_test_ci   utf32   391                     8
 
23
utf8_maxuserid_ci       utf8    2047                    8
 
24
show collation like '%test%';
 
25
Collation       Charset Id      Default Compiled        Sortlen
 
26
latin1_test     latin1  99              Yes     1
 
27
utf8_test_ci    utf8    353                     8
 
28
ucs2_test_ci    ucs2    358                     8
 
29
utf8mb4_test_ci utf8mb4 326                     8
 
30
utf8mb4_test_400_ci     utf8mb4 328                     8
 
31
utf16_test_ci   utf16   327                     8
 
32
utf32_test_ci   utf32   391                     8
 
33
show collation like 'ucs2_vn_ci';
 
34
Collation       Charset Id      Default Compiled        Sortlen
 
35
ucs2_vn_ci      ucs2    359                     8
 
36
create table 2byte_collation (c1 char(1) character set ucs2 collate ucs2_vn_ci)
 
37
engine = InnoDB;
 
38
insert into 2byte_collation values (0x0061);
 
39
set @@character_set_results=NULL;
 
40
select * from 2byte_collation;
 
41
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
 
42
def     test    2byte_collation 2byte_collation c1      c1      254     2       2       Y       0       0       359
 
43
c1
 
44
a
 
45
drop table 2byte_collation;
 
46
CREATE TABLE 2byte_collation (s1 char(10) character set utf8 collate utf8_maxuserid_ci) engine = innodb;
 
47
INSERT INTO 2byte_collation VALUES ('a'),('b');
 
48
SELECT * FROM 2byte_collation WHERE s1='a' ORDER BY BINARY s1;
 
49
s1
 
50
a
 
51
b
 
52
DROP TABLE 2byte_collation;
 
53
SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
 
54
SET GLOBAL innodb_change_buffering_debug = 1;
 
55
set names utf8;
 
56
show collation like 'utf8_maxuserid_ci';
 
57
Collation       Charset Id      Default Compiled        Sortlen
 
58
utf8_maxuserid_ci       utf8    2047                    8
 
59
CREATE TABLE 2byte_collation(
 
60
a INT AUTO_INCREMENT PRIMARY KEY,
 
61
b CHAR(100) character set utf8 collate utf8_maxuserid_ci,
 
62
c INT,
 
63
z INT,
 
64
INDEX(b))
 
65
ENGINE=InnoDB STATS_PERSISTENT=0;
 
66
INSERT INTO 2byte_collation VALUES(0,'x',1, 1);
 
67
CREATE UNIQUE INDEX idx3 ON 2byte_collation(c, b);
 
68
INSERT INTO 2byte_collation SELECT 0,b,c+1,z+1 FROM 2byte_collation;
 
69
INSERT INTO 2byte_collation SELECT 0,b,c+10,z+10 FROM 2byte_collation;
 
70
INSERT INTO 2byte_collation SELECT 0,b,c+20,z+20 FROM 2byte_collation;
 
71
INSERT INTO 2byte_collation SELECT 0,b,c+50,z+50 FROM 2byte_collation;
 
72
INSERT INTO 2byte_collation SELECT 0,b,c+100,z+100 FROM 2byte_collation;
 
73
INSERT INTO 2byte_collation SELECT 0,b,c+200,z+200 FROM 2byte_collation;
 
74
INSERT INTO 2byte_collation SELECT 0,b,c+400,z+400 FROM 2byte_collation;
 
75
INSERT INTO 2byte_collation SELECT 0,b,c+800,z+800 FROM 2byte_collation;
 
76
INSERT INTO 2byte_collation SELECT 0,b,c+1600,z+1600 FROM 2byte_collation;
 
77
INSERT INTO 2byte_collation SELECT 0,b,c+4000,z+4000 FROM 2byte_collation;
 
78
CREATE INDEX idx5 ON 2byte_collation(b, c);
 
79
SELECT b FROM 2byte_collation LIMIT 10;
 
80
b
 
81
x
 
82
x
 
83
x
 
84
x
 
85
x
 
86
x
 
87
x
 
88
x
 
89
x
 
90
x
 
91
INSERT INTO 2byte_collation VALUES (10001, "a", 20001, 20001);
 
92
UPDATE 2byte_collation set b = "aaa" where c = 20001;
 
93
DROP TABLE 2byte_collation;
 
94
SET GLOBAL innodb_change_buffering_debug = 0;