~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
#
2
# system functions
3
#
4
5
select database();
6
select charset(database());
7
select database() = "test";
8
select database() = _utf8"test";
9
select database() = _latin1"test";
10
11
select user() like "%@%";
12
select user() like _utf8"%@%";
13
select user() like _latin1"%@%";
14
select charset(user());
15
16
select version()>="3.23.29";
17
select version()>=_utf8"3.23.29";
18
select version()>=_latin1"3.23.29";
19
select charset(version());
20
explain extended select database(), user();
21
22
create table t1 (version char(60)) select database(), user(), version() as 'version';
23
show create table t1;
24
drop table t1;
25
26
select charset(charset(_utf8'a')), charset(collation(_utf8'a'));
27
select collation(charset(_utf8'a')), collation(collation(_utf8'a'));
28
create table t1 select charset(_utf8'a'), collation(_utf8'a');
29
show create table t1;
30
drop table t1;
31
32
select TRUE,FALSE,NULL;
33
34
#
35
# Bug#12351: CONCAT with USER()/DATEBASE() and
36
# a constant and a column gets strange results
37
#
38
create table t1 (c1 char(5)) character set=latin1;
39
insert into t1 values('row 1');
40
insert into t1 values('row 2');
41
insert into t1 values('row 3');
42
select concat(user(), '--', c1) from t1;
43
select concat(database(), '--', c1) from t1;
44
drop table t1;
45
46
#
47
# Bug#8291 Illegal collation mix with USER() function
48
#
49
create table t1 (a char(10)) character set latin1;
50
select * from t1 where a=version();
51
select * from t1 where a=database();
52
select * from t1 where a=user();
53
insert into t1 values ('a');
54
select left(concat(a,version()),1) from t1;
55
drop table t1;
56
57
# End of 4.1 tests