~drizzle-trunk/drizzle/development

1945.3.5 by Marisa Plumb
more sql doc modifications
1
User Defined Locks
1933.1.9 by Brian Aker
Additional documentation and testing.
2
===================
3
4
A user can create a "lock" which is scoped to their user space. Multiple
5
session of the user can see the lock.
6
2194.5.3 by Andrew Hutchings
Markup fixes
7
.. code-block:: mysql
8
   
9
   SELECT GET_LOCK();
10
11
   SELECT GET_LOCKS();
12
13
   SELECT RELEASE_LOCK();
14
15
   SELECT RELEASE_LOCK();
16
17
   SELECT RELEASE_LOCKS();
18
19
   SELECT is_free_lock();
20
21
   SELECT is_used_lock();
1933.1.9 by Brian Aker
Additional documentation and testing.
22
1945.3.5 by Marisa Plumb
more sql doc modifications
23
If a session should exit, whatever locks it was holding will be deleted.
1933.1.9 by Brian Aker
Additional documentation and testing.
24
2165.2.4 by Andrew Hutchings
Damn, missed one
25
.. todo::
26
27
   deleted or released? are locks recursive?
1994.5.20 by Stewart Smith
add some FIXME for clarifications needed in locks doc
28
1945.3.5 by Marisa Plumb
more sql doc modifications
29
Please note, get_lock() was designed to be compatible with MySQL. If you
1933.1.9 by Brian Aker
Additional documentation and testing.
30
hold any locks when calling get_lock() they will be released. For this
31
reason you may want to consider calling get_locks() instead.
32
33
Information on all barriers can be found in the DATA_DICTIONARY.USER_LOCKS
1994.5.20 by Stewart Smith
add some FIXME for clarifications needed in locks doc
34
table;