~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;
2095.2.1 by Brian Aker
Fix for lcov random order jittery
36
SELECT ASSERT(VARIABLE_VALUE = 1) FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
37
ASSERT(VARIABLE_VALUE = 1)
38
1
39
SELECT ASSERT(VARIABLE_VALUE >= 3) FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
40
ASSERT(VARIABLE_VALUE >= 3)
41
1
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
42
CREATE TABLE t1 ( a INT );
1 by brian
clean slate
43
INSERT INTO t1 VALUES (1), (2);
44
SELECT a FROM t1 LIMIT 1;
45
a
46
1
47
SHOW SESSION STATUS LIKE 'Last_query_cost';
48
Variable_name	Value
1616.1.1 by Joe Daly
bug 584046 , fix last_query_cost
49
Last_query_cost	1.399
1 by brian
clean slate
50
EXPLAIN SELECT a FROM t1;
51
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
52
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	
1 by brian
clean slate
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
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
57
a
58
1
59
2
60
SHOW SESSION STATUS LIKE 'Last_query_cost';
61
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
62
Last_query_cost	0
1 by brian
clean slate
63
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
64
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
65
1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	#	
66
2	UNION	t1	ALL	NULL	NULL	NULL	NULL	#	
67
NULL	UNION RESULT	<union1,2>	ALL	NULL	NULL	NULL	NULL	#	Using filesort
1 by brian
clean slate
68
SHOW SESSION STATUS LIKE 'Last_query_cost';
69
Variable_name	Value
1561.3.11 by Joe Daly
get tests working
70
Last_query_cost	0
1 by brian
clean slate
71
SELECT a IN (SELECT a FROM t1) FROM t1 LIMIT 1;
72
a IN (SELECT a FROM t1)
73
1
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 (SELECT a FROM t1 LIMIT 1) x FROM t1 LIMIT 1;
78
x
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
2141.4.2 by Andrew Hutchings
Implicit joins of the form "SELECT * FROM t1, t2" without WHERE or ON now error.
83
SELECT * FROM t1 a CROSS JOIN t1 b LIMIT 1;
1 by brian
clean slate
84
a	a
85
1	1
86
SHOW SESSION STATUS LIKE 'Last_query_cost';
87
Variable_name	Value
1616.1.1 by Joe Daly
bug 584046 , fix last_query_cost
88
Last_query_cost	2.799
1 by brian
clean slate
89
DROP TABLE t1;