List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 27 1999 8:25pm
Subject:Re: Restrict Access
View as plain text  
At 9:23 PM +0200 7/27/99, Martin Ramsch wrote:
>On Di, 1999-07-27 14:03:19 -0500, Paul DuBois wrote:
>> I have a fairly basic question about GET_LOCK():  what is it that's
>> being locked?
>
>Any further call to GET_LOCK() using the same lock name.
>It will block until the first (successful one) is released again.

I tried the following and both calls returned successfully, and
immediately:

mysql> SELECT GET_LOCK("a",10);
+------------------+
| GET_LOCK("a",10) |
+------------------+
|                1 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT GET_LOCK("a",10);
+------------------+
| GET_LOCK("a",10) |
+------------------+
|                1 |
+------------------+
1 row in set (0.00 sec)


If GET_LOCK() is called in two different threads with the same lock
name, then the second one blocks.  I take it, then, that GET_LOCK()
provides cooperative locking only?

-- 
Paul DuBois, paul@stripped
Thread
Restrict Accesstoxalot27 Jul
  • Restrict Accesssinisa27 Jul
    • Re: Restrict AccessThimble Smith27 Jul
      • Re: Restrict AccessPaul DuBois27 Jul
        • Re: Restrict AccessMartin Ramsch27 Jul
          • Re: Restrict AccessPaul DuBois28 Jul
            • Re: Restrict AccessThimble Smith28 Jul
        • Re: Restrict Accesssinisa28 Jul
    • Re: Restrict Accesstoxalot28 Jul
      • On GET_LOCK ()sinisa28 Jul
        • Re: On GET_LOCK ()Benjamin Pflugmann28 Jul
          • Re: On GET_LOCK ()sinisa28 Jul
            • Re: On GET_LOCK ()Paul DuBois28 Jul
          • Re: On GET_LOCK ()Jim Faucette28 Jul
            • Re: On GET_LOCK ()Paul DuBois28 Jul
              • Re: On GET_LOCK ()Thimble Smith28 Jul
          • Re: On GET_LOCK ()Gerald Clark28 Jul
        • Re: On GET_LOCK ()Paul DuBois28 Jul
          • Re: On GET_LOCK ()sinisa28 Jul
            • Re: On GET_LOCK ()Paul DuBois28 Jul
  • Re: On GET_LOCK ()Scott Hess28 Jul
    • getting rid of duplicatesJoel Bremson28 Jul
    • Re: getting rid of duplicatesChristian Mack28 Jul
    • Re: On GET_LOCK ()sinisa29 Jul
      • Re: On GET_LOCK ()Paul DuBois29 Jul
    • Re: On GET_LOCK ()Scott Hess29 Jul
Re: On GET_LOCK ()toxalot28 Jul
  • Re: On GET_LOCK ()sinisa28 Jul
    • Re: On GET_LOCK ()Benjamin Pflugmann29 Jul
  • Re: On GET_LOCK ()Sasha Pachev29 Jul
    • Re: On GET_LOCK ()Benjamin Pflugmann31 Jul
Re: On GET_LOCK ()Thimble Smith29 Jul
  • Re: On GET_LOCK ()Fraser MacKenzie29 Jul
    • Re: On GET_LOCK ()Thimble Smith29 Jul
      • Re: On GET_LOCK ()Fraser MacKenzie29 Jul
Re: On GET_LOCK()R. Mentink31 Jul