1
by brian
clean slate |
1 |
drop table if exists t1,t2;
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
2 |
create table t1 (a char(10) not null, b char(10) not null,key (a), key(b));
|
1
by brian
clean slate |
3 |
insert into t1 values ("hello ","hello "),("hello2 ","hello2 ");
|
4 |
select concat("-",a,"-",b,"-") from t1 where a="hello";
|
|
5 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
6 |
-hello -hello -
|
1
by brian
clean slate |
7 |
select concat("-",a,"-",b,"-") from t1 where a="hello ";
|
8 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
9 |
-hello -hello -
|
1
by brian
clean slate |
10 |
select concat("-",a,"-",b,"-") from t1 ignore index (a) where a="hello ";
|
11 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
12 |
-hello -hello -
|
1
by brian
clean slate |
13 |
select concat("-",a,"-",b,"-") from t1 where b="hello";
|
14 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
15 |
-hello -hello -
|
1
by brian
clean slate |
16 |
select concat("-",a,"-",b,"-") from t1 where b="hello ";
|
17 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
18 |
-hello -hello -
|
1
by brian
clean slate |
19 |
select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello ";
|
20 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
21 |
-hello -hello -
|
1
by brian
clean slate |
22 |
alter table t1 modify b tinytext not null, drop key b, add key (b(100));
|
23 |
select concat("-",a,"-",b,"-") from t1;
|
|
24 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
25 |
-hello -hello -
|
26 |
-hello2 -hello2 -
|
|
1
by brian
clean slate |
27 |
select concat("-",a,"-",b,"-") from t1 where b="hello ";
|
28 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
29 |
-hello -hello -
|
1
by brian
clean slate |
30 |
select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello ";
|
31 |
concat("-",a,"-",b,"-")
|
|
685.2.2
by Monty Taylor
Fixed binary. |
32 |
-hello -hello -
|
1
by brian
clean slate |
33 |
drop table t1;
|
34 |
create table t1 (b char(8));
|
|
35 |
insert into t1 values(NULL);
|
|
36 |
select b from t1 where binary b like '';
|
|
37 |
b
|
|
38 |
select b from t1 group by binary b like '';
|
|
39 |
b
|
|
40 |
NULL
|
|
41 |
select b from t1 having binary b like '';
|
|
42 |
b
|
|
43 |
drop table t1;
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
44 |
create table t1 (a char(3), b varbinary(3));
|
1
by brian
clean slate |
45 |
insert into t1 values ('aaa','bbb'),('AAA','BBB');
|
46 |
select upper(a),upper(b) from t1;
|
|
47 |
upper(a) upper(b)
|
|
48 |
AAA bbb
|
|
49 |
AAA BBB
|
|
50 |
select lower(a),lower(b) from t1;
|
|
51 |
lower(a) lower(b)
|
|
52 |
aaa bbb
|
|
53 |
aaa BBB
|
|
54 |
select * from t1 where upper(a)='AAA';
|
|
55 |
a b
|
|
56 |
aaa bbb
|
|
57 |
AAA BBB
|
|
58 |
select * from t1 where lower(a)='aaa';
|
|
59 |
a b
|
|
60 |
aaa bbb
|
|
61 |
AAA BBB
|
|
62 |
select * from t1 where upper(b)='BBB';
|
|
63 |
a b
|
|
64 |
AAA BBB
|
|
65 |
select * from t1 where lower(b)='bbb';
|
|
66 |
a b
|
|
67 |
aaa bbb
|
|
68 |
select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
|
|
69 |
collation(a) collation(b) collation(binary 'ccc')
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
70 |
utf8_general_ci binary binary
|
1
by brian
clean slate |
71 |
drop table t1;
|
72 |
create table t1( firstname char(20), lastname char(20));
|
|
73 |
insert into t1 values ("john","doe"),("John","Doe");
|
|
74 |
select * from t1 where firstname='john' and firstname like binary 'john';
|
|
75 |
firstname lastname
|
|
76 |
john doe
|
|
77 |
select * from t1 where firstname='john' and binary 'john' = firstname;
|
|
78 |
firstname lastname
|
|
79 |
john doe
|
|
80 |
select * from t1 where firstname='john' and firstname = binary 'john';
|
|
81 |
firstname lastname
|
|
82 |
john doe
|
|
83 |
select * from t1 where firstname='John' and firstname like binary 'john';
|
|
84 |
firstname lastname
|
|
85 |
john doe
|
|
86 |
select * from t1 where firstname='john' and firstname like binary 'John';
|
|
87 |
firstname lastname
|
|
88 |
John Doe
|
|
89 |
drop table t1;
|
|
685.2.2
by Monty Taylor
Fixed binary. |
90 |
create table t1 (a char);
|
1
by brian
clean slate |
91 |
show create table t1;
|
92 |
Table Create Table
|
|
685.2.2
by Monty Taylor
Fixed binary. |
93 |
t1 CREATE TABLE `t1` (
|
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
94 |
`a` varchar(1) DEFAULT NULL
|
1638.10.57
by Stewart Smith
binary.result with explicit COLLATE in SHOW CREATE TABLE |
95 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
1
by brian
clean slate |
96 |
drop table t1;
|
685.2.2
by Monty Taylor
Fixed binary. |
97 |
create table t2 (a varbinary);
|
98 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near ')' at line 1
|
|
99 |
create table t1 (col1 char(4));
|
|
1
by brian
clean slate |
100 |
insert into t1 values ('a'),('a ');
|
101 |
select hex(col1) from t1;
|
|
102 |
hex(col1)
|
|
685.2.2
by Monty Taylor
Fixed binary. |
103 |
61
|
104 |
6120
|
|
105 |
alter table t1 modify col1 char(10);
|
|
1
by brian
clean slate |
106 |
select hex(col1) from t1;
|
107 |
hex(col1)
|
|
685.2.2
by Monty Taylor
Fixed binary. |
108 |
61
|
109 |
6120
|
|
1
by brian
clean slate |
110 |
insert into t1 values ('b'),('b ');
|
111 |
select hex(col1) from t1;
|
|
112 |
hex(col1)
|
|
685.2.2
by Monty Taylor
Fixed binary. |
113 |
61
|
114 |
6120
|
|
115 |
62
|
|
116 |
6220
|
|
1
by brian
clean slate |
117 |
drop table t1;
|
118 |
CREATE TABLE t1 (
|
|
685.2.2
by Monty Taylor
Fixed binary. |
119 |
a varbinary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
1
by brian
clean slate |
120 |
index idx(a)
|
121 |
);
|
|
122 |
INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029087575');
|
|
123 |
INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
|
|
124 |
INSERT INTO t1 SET a=unhex('1F9480179366F2BF567E1C4B964C1EF029080707');
|
|
125 |
SELECT hex(a) FROM t1 order by a;
|
|
126 |
hex(a)
|
|
127 |
1F9480179366F2BF567E1C4B964C1EF029080707
|
|
128 |
1F9480179366F2BF567E1C4B964C1EF029082020
|
|
129 |
1F9480179366F2BF567E1C4B964C1EF029087575
|
|
130 |
EXPLAIN SELECT hex(a) FROM t1 order by a;
|
|
131 |
id select_type table type possible_keys key key_len ref rows Extra
|
|
685.2.2
by Monty Taylor
Fixed binary. |
132 |
1 SIMPLE t1 index NULL idx 22 NULL 3 Using index
|
1
by brian
clean slate |
133 |
SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
|
134 |
hex(a)
|
|
135 |
1F9480179366F2BF567E1C4B964C1EF029082020
|
|
136 |
EXPLAIN
|
|
137 |
SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF029082020');
|
|
138 |
id select_type table type possible_keys key key_len ref rows Extra
|
|
685.2.2
by Monty Taylor
Fixed binary. |
139 |
1 SIMPLE t1 ref idx idx 22 const 1 Using where; Using index
|
1
by brian
clean slate |
140 |
SELECT hex(a) from t1 WHERE a=unhex('1F9480179366F2BF567E1C4B964C1EF02908');
|
141 |
hex(a)
|
|
142 |
DROP TABLE t1;
|
|
143 |
CREATE TABLE t1 (
|
|
144 |
id numeric(20) NOT NULL,
|
|
145 |
lang varchar(8) NOT NULL,
|
|
146 |
msg varchar(32) NOT NULL,
|
|
147 |
PRIMARY KEY (id,lang)
|
|
148 |
);
|
|
149 |
INSERT INTO t1 VALUES (33, 'en', 'zzzzzzz');
|
|
150 |
INSERT INTO t1 VALUES (31, 'en', 'xxxxxxx');
|
|
151 |
INSERT INTO t1 VALUES (32, 'en', 'yyyyyyy');
|
|
152 |
SELECT * FROM t1 WHERE id=32;
|
|
153 |
id lang msg
|
|
154 |
32 en yyyyyyy
|
|
155 |
DROP TABLE t1;
|