~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
select database();
2
database()
3
test
4
select database() = "test";
5
database() = "test"
6
1
908.1.5 by Monty Taylor
Fixed func_system.test after version number change.
7
select user() like "%@%";
8
user() like "%@%"
1866.1.1 by Brian Aker
Merge of all refactor for functions into single plugin, this includes a new
9
#
908.1.5 by Monty Taylor
Fixed func_system.test after version number change.
10
select version() > "2009.01.756";
11
version() > "2009.01.756"
1 by brian
clean slate
12
1
13
explain extended select database(), user();
14
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
15
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
16
Warnings:
1864.3.4 by Brian Aker
This creates a function for seeing which catalog you are in. It also
17
Note	1003	select schema() AS `database()`,user() AS `user()`
1 by brian
clean slate
18
create table t1 (version char(60)) select database(), user(), version() as 'version';
19
show create table t1;
20
Table	Create Table
699 by Brian Aker
Enable func_system
21
t1	CREATE TABLE `t1` (
1743.5.2 by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output
22
  `database()` VARBINARY(136) DEFAULT NULL,
23
  `user()` VARBINARY(308) DEFAULT NULL,
24
  `version` VARCHAR(60) COLLATE utf8_general_ci DEFAULT NULL
1638.10.74 by Stewart Smith
func_system.result with explicit COLLATE in SHOW CREATE TABLE
25
) ENGINE=DEFAULT COLLATE = utf8_general_ci
1 by brian
clean slate
26
drop table t1;
27
select TRUE,FALSE,NULL;
28
TRUE	FALSE	NULL
29
1	0	NULL
699 by Brian Aker
Enable func_system
30
create table t1 (c1 char(5));
1 by brian
clean slate
31
insert into t1 values('row 1');
32
insert into t1 values('row 2');
33
insert into t1 values('row 3');
701 by Brian Aker
Make the test portable.
34
select concat(SUBSTRING(user(), 0, 4), '--', c1) from t1;
35
concat(SUBSTRING(user(), 0, 4), '--', c1)
36
--row 1
37
--row 2
38
--row 3
1 by brian
clean slate
39
select concat(database(), '--', c1) from t1;
40
concat(database(), '--', c1)
41
test--row 1
42
test--row 2
43
test--row 3
44
drop table t1;
699 by Brian Aker
Enable func_system
45
create table t1 (a char(10));
1 by brian
clean slate
46
select * from t1 where a=version();
47
a
48
select * from t1 where a=database();
49
a
50
select * from t1 where a=user();
51
a
52
insert into t1 values ('a');
53
select left(concat(a,version()),1) from t1;
54
left(concat(a,version()),1)
55
a
56
drop table t1;