~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/status.test

  • Committer: Monty Taylor
  • Date: 2009-04-25 20:45:19 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425204519-lgrl7mz2r66v0jby
Blackhole.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
 
17
17
select 1;
18
 
--replace_column 2 #
19
18
show status like 'last_query_cost';
20
 
create temporary table t1 (a int) engine=myisam;
 
19
create table t1 (a int) engine=myisam;
21
20
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
22
21
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
23
22
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
24
23
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
25
24
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
26
25
select * from t1 where a=6;
27
 
--replace_column 2 #
28
26
show status like 'last_query_cost';
29
27
# Ensure value dosn't change by second status call
30
 
--replace_column 2 #
31
28
show status like 'last_query_cost';
32
29
select 1;
33
 
--replace_column 2 #
34
30
show status like 'last_query_cost';
35
31
drop table t1;
36
32
 
63
59
let $wait_left= `SELECT @wait_left`;
64
60
while ($max_used != 1 && $wait_left > 0)
65
61
{
 
62
  sleep 1;
66
63
  FLUSH STATUS;
67
64
  SET @wait_left = @wait_left - 1;
68
65
  let $max_used_connections = `SHOW STATUS LIKE 'max_used_connections'`;
75
72
 
76
73
# Prerequisite.
77
74
SHOW STATUS LIKE 'max_used_connections';
78
 
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
 
75
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
79
76
 
80
77
# Save original setting.
81
78
connect (con1,localhost,root,,);
88
85
 
89
86
# Check that max_used_connections still reflects maximum value.
90
87
SHOW STATUS LIKE 'max_used_connections';
91
 
SELECT * FROM data_dictionary.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
 
88
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
92
89
 
93
90
#
94
91
# Bug #30377: EXPLAIN loses last_query_cost when used with UNION
95
92
#
96
93
 
97
 
CREATE TABLE t1 ( a INT );
 
94
CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
98
95
INSERT INTO t1 VALUES (1), (2);
99
96
 
100
97
SELECT a FROM t1 LIMIT 1;
101
98
SHOW SESSION STATUS LIKE 'Last_query_cost';
102
99
 
103
 
--replace_column 9 #
104
100
EXPLAIN SELECT a FROM t1;
105
101
SHOW SESSION STATUS LIKE 'Last_query_cost';
106
102
 
107
103
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
108
104
SHOW SESSION STATUS LIKE 'Last_query_cost';
109
105
 
110
 
--replace_column 9 #
111
106
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
112
107
SHOW SESSION STATUS LIKE 'Last_query_cost';
113
108