~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/tests/t/command.test

  • Committer: Jay Pipes
  • Date: 2010-04-08 16:27:25 UTC
  • mfrom: (1405.6.10 replication-pairs)
  • mto: This revision was merged to the branch mainline in revision 1457.
  • Revision ID: jpipes@serialcoder-20100408162725-sugbgn38oxjqclq2
Merge trunk and replication-pairs with conflict resolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
--disable_warnings
2
2
DROP TABLE IF EXISTS a;
 
3
DROP TABLE IF EXISTS b;
3
4
--enable_warnings
4
5
CREATE TABLE a (i int,  PRIMARY KEY (i));
5
6
ALTER TABLE a ADD COLUMN j int;
17
18
# The statistics are incremented after the statements have already returned
18
19
# so its possible a query could be missed if we do not wait
19
20
--sleep 1 
20
 
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN  FROM DATA_DICTIONARY.SQL_COMMANDS_BY_USER;
 
21
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN  FROM DATA_DICTIONARY.CURRENT_SQL_COMMANDS;
21
22
 
22
23
# disable the plugin
23
24
set global logging_stats_enable=false;
24
 
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN FROM DATA_DICTIONARY.SQL_COMMANDS_BY_USER;
 
25
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN FROM DATA_DICTIONARY.CURRENT_SQL_COMMANDS;
25
26
# renable it
26
27
set global logging_stats_enable=true;
27
28
 
32
33
INSERT INTO b VALUES (2);
33
34
 
34
35
--sleep 1
35
 
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN FROM DATA_DICTIONARY.SQL_COMMANDS_BY_USER;
 
36
SELECT USER, COUNT_SELECT, COUNT_DELETE, COUNT_UPDATE, COUNT_INSERT, COUNT_ROLLBACK, COUNT_COMMIT, COUNT_CREATE, COUNT_ALTER, COUNT_DROP, COUNT_ADMIN FROM DATA_DICTIONARY.CURRENT_SQL_COMMANDS;
36
37
 
37
38
DROP TABLE a,b;