• unknown's avatar
    Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock · f63c8f53
    unknown authored
    Added protection against global read lock while creating and
    initializing a delayed insert handler.
    Allowed to ignore a global read lock when locking the table
    inside the delayed insert handler.
    Added some minor improvements.
    
    
    sql/lock.cc:
      Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
      Changed mysql_lock_tables() to allow for ignoring global read lock.
      Added functions to set/unset protection against global read lock.
    sql/mysql_priv.h:
      Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
      Changed existing and added new function declarations.
    sql/sql_insert.cc:
      Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
      Added and extended some comments.
      Added a protection against global read lock while a handler is
      created and initialized.
      Moved the unlock of the delayed insert object past its last usage
      in delayed_get_table().
      Changed the table locking in handle_delayed_insert() so that it
      does not wait for global read lock.
    f63c8f53
lock.cc 25.2 KB