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;
28
26
show status like 'last_query_cost';
29
27
# Ensure value dosn't change by second status call
31
28
show status like 'last_query_cost';
34
30
show status like 'last_query_cost';
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';
80
77
# Save original setting.
81
78
connect (con1,localhost,root,,);
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';
94
91
# Bug #30377: EXPLAIN loses last_query_cost when used with UNION
97
CREATE TABLE t1 ( a INT );
94
CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
98
95
INSERT INTO t1 VALUES (1), (2);
100
97
SELECT a FROM t1 LIMIT 1;
101
98
SHOW SESSION STATUS LIKE 'Last_query_cost';
104
100
EXPLAIN SELECT a FROM t1;
105
101
SHOW SESSION STATUS LIKE 'Last_query_cost';
107
103
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
108
104
SHOW SESSION STATUS LIKE 'Last_query_cost';
111
106
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
112
107
SHOW SESSION STATUS LIKE 'Last_query_cost';