~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Andrew Hutchings
  • Date: 2010-12-06 19:36:53 UTC
  • mfrom: (1976 staging)
  • mto: This revision was merged to the branch mainline in revision 1991.
  • Revision ID: andrew@linuxjedi.co.uk-20101206193653-l85vryv18jb0yxx8
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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,,);
 
7
 
 
8
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();
 
11
SELECT IF (KILL(id), "YES", "NO") FROM CONNECTIONS ORDER BY RAND();
 
12
SELECT count(ID) FROM DATA_DICTIONARY.PROCESSLIST WHERE COMMAND != "Killed";
 
13
DROP TABLE CONNECTIONS;