~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/status.result

  • Committer: Monty Taylor
  • Date: 2008-12-23 06:52:12 UTC
  • mfrom: (734 testable)
  • mto: (722.2.17 devel)
  • mto: This revision was merged to the branch mainline in revision 738.
  • Revision ID: mordred@inaugust.com-20081223065212-vyu2q1x8ib690eue
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
flush status;
2
 
show status like 'Table_lock%';
3
 
Variable_name   Value
4
 
Table_locks_immediate   1
5
 
Table_locks_waited      0
6
 
select * from information_schema.session_status where variable_name like 'Table_lock%';
7
 
VARIABLE_NAME   VARIABLE_VALUE
8
 
TABLE_LOCKS_IMMEDIATE   2
9
 
TABLE_LOCKS_WAITED      0
10
 
SET SQL_LOG_BIN=0;
11
 
set @old_general_log = @@global.general_log;
12
 
set global general_log = 'OFF';
13
2
drop table if exists t1;
14
 
create table t1(n int) engine=myisam;
15
 
insert into t1 values(1);
16
 
lock tables t1 read;
17
 
unlock tables;
18
 
lock tables t1 read;
19
 
update t1 set n = 3;
20
 
unlock tables;
21
 
show status like 'Table_locks_waited';
22
 
Variable_name   Value
23
 
Table_locks_waited      1
24
 
drop table t1;
25
 
set global general_log = @old_general_log;
26
3
select 1;
27
4
1
28
5
1
29
6
show status like 'last_query_cost';
30
7
Variable_name   Value
31
8
Last_query_cost 0.000000
32
 
create table t1 (a int);
 
9
create table t1 (a int) engine=myisam;
33
10
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
34
11
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
35
12
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
62
39
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
63
40
VARIABLE_NAME   VARIABLE_VALUE
64
41
MAX_USED_CONNECTIONS    1
65
 
SET @save_thread_cache_size=@@thread_cache_size;
66
 
SET GLOBAL thread_cache_size=3;
67
 
SHOW STATUS LIKE 'max_used_connections';
68
 
Variable_name   Value
69
 
Max_used_connections    3
70
 
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
71
 
VARIABLE_NAME   VARIABLE_VALUE
72
 
MAX_USED_CONNECTIONS    3
73
 
FLUSH STATUS;
74
 
SHOW STATUS LIKE 'max_used_connections';
75
 
Variable_name   Value
76
 
Max_used_connections    2
77
 
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
78
 
VARIABLE_NAME   VARIABLE_VALUE
79
 
MAX_USED_CONNECTIONS    2
80
 
SHOW STATUS LIKE 'max_used_connections';
81
 
Variable_name   Value
82
 
Max_used_connections    3
83
 
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
84
 
VARIABLE_NAME   VARIABLE_VALUE
85
 
MAX_USED_CONNECTIONS    3
86
 
SHOW STATUS LIKE 'max_used_connections';
87
 
Variable_name   Value
88
 
Max_used_connections    4
89
 
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
90
 
VARIABLE_NAME   VARIABLE_VALUE
91
 
MAX_USED_CONNECTIONS    4
92
 
SET GLOBAL thread_cache_size=@save_thread_cache_size;
93
 
CREATE TABLE t1 ( a INT );
 
42
SHOW STATUS LIKE 'max_used_connections';
 
43
Variable_name   Value
 
44
Max_used_connections    3
 
45
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
 
46
VARIABLE_NAME   VARIABLE_VALUE
 
47
MAX_USED_CONNECTIONS    3
 
48
CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
94
49
INSERT INTO t1 VALUES (1), (2);
95
50
SELECT a FROM t1 LIMIT 1;
96
51
a
138
93
Variable_name   Value
139
94
Last_query_cost 4.805836
140
95
DROP TABLE t1;
141
 
show status like 'com_show_status';
142
 
Variable_name   Value
143
 
Com_show_status 3
144
 
show status like 'hand%write%';
145
 
Variable_name   Value
146
 
Handler_write   5
147
 
show status like '%tmp%';
148
 
Variable_name   Value
149
 
Created_tmp_disk_tables 0
150
 
Created_tmp_files       0
151
 
Created_tmp_tables      0
152
 
show status like 'hand%write%';
153
 
Variable_name   Value
154
 
Handler_write   7
155
 
show status like '%tmp%';
156
 
Variable_name   Value
157
 
Created_tmp_disk_tables 0
158
 
Created_tmp_files       0
159
 
Created_tmp_tables      0
160
 
show status like 'com_show_status';
161
 
Variable_name   Value
162
 
Com_show_status 8
163
 
rnd_diff        tmp_table_diff
164
 
20      8
165
 
show global status like 'Com%function%';
166
 
Variable_name   Value
167
 
Com_alter_function      0
168
 
Com_create_function     0
169
 
Com_drop_function       0
170
 
Com_show_function_code  0
171
 
Com_show_function_status        0
172
 
create function f1 (x INTEGER) returns integer
173
 
begin
174
 
declare ret integer;
175
 
set ret = x * 10;
176
 
return ret;
177
 
end //
178
 
drop function f1;
179
 
show global status like 'Com%function%';
180
 
Variable_name   Value
181
 
Com_alter_function      0
182
 
Com_create_function     1
183
 
Com_drop_function       1
184
 
Com_show_function_code  0
185
 
Com_show_function_status        0
186
 
SELECT VARIABLE_VALUE INTO @tc FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Threads_connected';
187
 
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Threads_created' AND VARIABLE_VALUE < @tc;
188
 
VARIABLE_NAME
189
 
SELECT VARIABLE_VALUE INTO @tr FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Threads_running';
190
 
FLUSH STATUS;
191
 
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Threads_connected' AND VARIABLE_VALUE < @tc;
192
 
VARIABLE_NAME   VARIABLE_VALUE
193
 
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Threads_running' AND VARIABLE_VALUE < @tr;
194
 
VARIABLE_NAME   VARIABLE_VALUE