~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/status.result

  • Committer: Padraig O'Sullivan
  • Date: 2009-07-22 23:26:26 UTC
  • mto: (1039.5.43 replication)
  • mto: This revision was merged to the branch mainline in revision 1130.
  • Revision ID: osullivan.padraig@gmail.com-20090722232626-mu4khq7ho6dqcf7q
Created a simple filtered replicator that can filter by schema name or table
name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
1
6
6
show status like 'last_query_cost';
7
7
Variable_name   Value
8
 
Last_query_cost #
 
8
Last_query_cost 0.000000
9
9
create temporary table t1 (a int) engine=myisam;
10
10
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
11
11
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
21
21
6
22
22
show status like 'last_query_cost';
23
23
Variable_name   Value
24
 
Last_query_cost #
 
24
Last_query_cost 12.084449
25
25
show status like 'last_query_cost';
26
26
Variable_name   Value
27
 
Last_query_cost #
 
27
Last_query_cost 12.084449
28
28
select 1;
29
29
1
30
30
1
31
31
show status like 'last_query_cost';
32
32
Variable_name   Value
33
 
Last_query_cost #
 
33
Last_query_cost 0.000000
34
34
drop table t1;
35
35
FLUSH STATUS;
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
 
36
SHOW STATUS LIKE 'max_used_connections';
 
37
Variable_name   Value
 
38
Max_used_connections    1
 
39
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
 
40
VARIABLE_NAME   VARIABLE_VALUE
 
41
MAX_USED_CONNECTIONS    1
 
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
42
48
CREATE TABLE t1 ( a INT );
43
49
INSERT INTO t1 VALUES (1), (2);
44
50
SELECT a FROM t1 LIMIT 1;
46
52
1
47
53
SHOW SESSION STATUS LIKE 'Last_query_cost';
48
54
Variable_name   Value
49
 
Last_query_cost 1.399
 
55
Last_query_cost 1.399000
50
56
EXPLAIN SELECT a FROM t1;
51
57
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
52
58
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    #       
53
59
SHOW SESSION STATUS LIKE 'Last_query_cost';
54
60
Variable_name   Value
55
 
Last_query_cost 1.399
 
61
Last_query_cost 1.399000
56
62
SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
57
63
a
58
64
1
59
65
2
60
66
SHOW SESSION STATUS LIKE 'Last_query_cost';
61
67
Variable_name   Value
62
 
Last_query_cost 0
 
68
Last_query_cost 0.000000
63
69
EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a;
64
70
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
65
71
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       
67
73
NULL    UNION RESULT    <union1,2>      ALL     NULL    NULL    NULL    NULL    #       Using filesort
68
74
SHOW SESSION STATUS LIKE 'Last_query_cost';
69
75
Variable_name   Value
70
 
Last_query_cost 0
 
76
Last_query_cost 0.000000
71
77
SELECT a IN (SELECT a FROM t1) FROM t1 LIMIT 1;
72
78
a IN (SELECT a FROM t1)
73
79
1
74
80
SHOW SESSION STATUS LIKE 'Last_query_cost';
75
81
Variable_name   Value
76
 
Last_query_cost 0
 
82
Last_query_cost 0.000000
77
83
SELECT (SELECT a FROM t1 LIMIT 1) x FROM t1 LIMIT 1;
78
84
x
79
85
1
80
86
SHOW SESSION STATUS LIKE 'Last_query_cost';
81
87
Variable_name   Value
82
 
Last_query_cost 0
83
 
SELECT * FROM t1 a CROSS JOIN t1 b LIMIT 1;
 
88
Last_query_cost 0.000000
 
89
SELECT * FROM t1 a, t1 b LIMIT 1;
84
90
a       a
85
91
1       1
86
92
SHOW SESSION STATUS LIKE 'Last_query_cost';
87
93
Variable_name   Value
88
 
Last_query_cost 2.799
 
94
Last_query_cost 2.799000
89
95
DROP TABLE t1;