~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/tests/t/user_concurrent.test

  • Committer: Brian Aker
  • Date: 2010-11-27 09:26:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1956.
  • Revision ID: brian@tangent.org-20101127092654-e3m8yuxal0k346u0
Update such that we can now do a lock test with a wait.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
SELECT GET_LOCK("mine");
5
5
SELECT USER_NAME, USER_LOCK_NAME FROM DATA_DICTIONARY.USER_LOCKS ORDER BY USER_LOCK_NAME, USER_NAME;
6
 
CREATE TABLE lock_state (a int);
7
 
EXECUTE "INSERT INTO lock_state SELECT GET_LOCK(\"mine\", 20)" CONCURRENT;
 
6
EXECUTE "SELECT GET_LOCK('mine', 20); SELECT 1;" CONCURRENT;
8
7
--error 1709
9
8
SELECT wait_for_lock("mine");
 
9
--error 1712
10
10
SELECT RELEASE_LOCK_AND_WAIT(@LOCK);
11
 
DROP TABLE lock_state;
 
11
SELECT RELEASE_LOCK_AND_WAIT("mine");