~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
flush status;
734 by Brian Aker
Merging Stewart (one fix to his test case to drop t1 if left from previous
2
drop table if exists t1;
1 by brian
clean slate
3
select 1;
4
1
5
1
6
show status like 'last_query_cost';
7
Variable_name	Value
1273.16.1 by Brian Aker
More removal of show code.
8
Last_query_cost	#
1063.9.27 by Stewart Smith
status.test for MyISAM as temp table only. Having to use default engine for EXPLAIN as opening table more than once
9
create temporary table t1 (a int) engine=myisam;
1 by brian
clean slate
10
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
11
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
12
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
13
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
14
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
15
select * from t1 where a=6;
16
a
17
6
18
6
19
6
20
6
21
6
22
show status like 'last_query_cost';
23
Variable_name	Value
1273.16.1 by Brian Aker
More removal of show code.
24
Last_query_cost	#
1 by brian
clean slate
25
show status like 'last_query_cost';
26
Variable_name	Value
1273.16.1 by Brian Aker
More removal of show code.
27
Last_query_cost	#
1 by brian
clean slate
28
select 1;
29
1
30
1
31
show status like 'last_query_cost';
32
Variable_name	Value
1273.16.1 by Brian Aker
More removal of show code.
33
Last_query_cost	#
1 by brian
clean slate
34
drop table t1;
35
FLUSH STATUS;
36
SHOW STATUS LIKE 'max_used_connections';
37
Variable_name	Value
38
Max_used_connections	1
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
39
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
1 by brian
clean slate
40
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
41
Max_used_connections	1
673.3.31 by Stewart Smith
status test: remove bits not applicable to Drizzle, explicitly use MyISAM in a few places to get stable costs
42
SHOW STATUS LIKE 'max_used_connections';
43
Variable_name	Value
44
Max_used_connections	3
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
45
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
673.3.31 by Stewart Smith
status test: remove bits not applicable to Drizzle, explicitly use MyISAM in a few places to get stable costs
46
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
47
Max_used_connections	3
1063.9.27 by Stewart Smith
status.test for MyISAM as temp table only. Having to use default engine for EXPLAIN as opening table more than once
48
CREATE TABLE t1 ( a INT );
1 by brian
clean slate
49
INSERT INTO t1 VALUES (1), (2);
50
SELECT a FROM t1 LIMIT 1;
51
a
52
1
53
SHOW SESSION STATUS LIKE 'Last_query_cost';
54
Variable_name	Value
1616.1.1 by Joe Daly
bug 584046 , fix last_query_cost
55
Last_query_cost	1.399
1 by brian
clean slate
56
EXPLAIN SELECT a FROM t1;
57
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1063.9.27 by Stewart Smith
status.test for MyISAM as temp table only. Having to use default engine for EXPLAIN as opening table more than once
58
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	
1 by brian
clean slate
59
SHOW SESSION STATUS LIKE 'Last_query_cost';
60
Variable_name	Value
1616.1.1 by Joe Daly
bug 584046 , fix last_query_cost
61
Last_query_cost	1.399
1 by brian
clean slate
62
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
63
a
64
1
65
2
66
SHOW SESSION STATUS LIKE 'Last_query_cost';
67
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
68
Last_query_cost	0
1 by brian
clean slate
69
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
70
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1063.9.27 by Stewart Smith
status.test for MyISAM as temp table only. Having to use default engine for EXPLAIN as opening table more than once
71
1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	#	
72
2	UNION	t1	ALL	NULL	NULL	NULL	NULL	#	
73
NULL	UNION RESULT	<union1,2>	ALL	NULL	NULL	NULL	NULL	#	Using filesort
1 by brian
clean slate
74
SHOW SESSION STATUS LIKE 'Last_query_cost';
75
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
76
Last_query_cost	0
1 by brian
clean slate
77
SELECT a IN (SELECT a FROM t1) FROM t1 LIMIT 1;
78
a IN (SELECT a FROM t1)
79
1
80
SHOW SESSION STATUS LIKE 'Last_query_cost';
81
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
82
Last_query_cost	0
1 by brian
clean slate
83
SELECT (SELECT a FROM t1 LIMIT 1) x FROM t1 LIMIT 1;
84
x
85
1
86
SHOW SESSION STATUS LIKE 'Last_query_cost';
87
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
88
Last_query_cost	0
1 by brian
clean slate
89
SELECT * FROM t1 a, t1 b LIMIT 1;
90
a	a
91
1	1
92
SHOW SESSION STATUS LIKE 'Last_query_cost';
93
Variable_name	Value
1616.1.1 by Joe Daly
bug 584046 , fix last_query_cost
94
Last_query_cost	2.799
1 by brian
clean slate
95
DROP TABLE t1;