SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL question reguarding LOCKS

    In the following situation:

    Code:
    mysql> LOCK TABLES user_db WRITE;
    
    mysql> SELECT data_1,data_2,data_3 FROM user_db WHERE data_4=some_data;
    
    mysql> SELECT data_1,data_2,data_3 FROM user_db WHERE data_4=some_other_data;
    
    mysql> UPDATE user_db SET data_5=new_data;
    
    mysql> UNLOCK TABLES;
    What will be the order of execution?

  2. #2
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Someone please answer me!

  3. #3
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know there does exist a MySQL forum.
    - website

  4. #4
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    didn't know that...

  5. #5
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Argh... posts never take this long to be answered! Doesn't anyone know?

  6. #6
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean? They will be performed in the order you execute them -- e.g. sequentially.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •