~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/utility_functions/tests/t/kill_repeated.test

  • Committer: Brian Aker
  • Date: 2011-01-23 21:09:42 UTC
  • Revision ID: brian@tangent.org-20110123210942-g6hiv6vatn75ht9r
Additional fix for lcov.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Test creating a bunch of connections, and then killing them.
2
 
connect (con1,localhost,root,,);
3
 
connect (con2,localhost,root,,);
4
 
connect (con3,localhost,root,,);
5
 
connect (con4,localhost,root,,);
6
 
connect (con5,localhost,root,,);
 
2
connect (con1,localhost,bob,,);
 
3
connect (con2,localhost,bob,,);
 
4
connect (con3,localhost,bob,,);
 
5
connect (con4,localhost,bob,,);
 
6
connect (con5,localhost,bob,,);
 
7
 
 
8
connection con1;
 
9
connection con2;
 
10
connection con3;
 
11
connection con4;
 
12
connection con5;
7
13
 
8
14
connection default;
9
 
CREATE TABLE CONNECTIONS SELECT ID FROM DATA_DICTIONARY.PROCESSLIST WHERE ID != CONNECTION_ID();
10
 
INSERT INTO CONNECTIONS SELECT ID FROM DATA_DICTIONARY.PROCESSLIST WHERE ID != CONNECTION_ID();
 
15
CREATE TABLE CONNECTIONS SELECT ID FROM DATA_DICTIONARY.PROCESSLIST WHERE ID != CONNECTION_ID() AND username="bob";
11
16
SELECT IF (KILL(id), "YES", "NO") FROM CONNECTIONS ORDER BY RAND();
12
 
SELECT count(ID) FROM DATA_DICTIONARY.PROCESSLIST WHERE COMMAND != "Killed";
 
17
SELECT count(ID) FROM DATA_DICTIONARY.PROCESSLIST WHERE COMMAND != "Killed" AND USERNAME="bob";
13
18
DROP TABLE CONNECTIONS;