• Konstantin Osipov's avatar
    Backport of: · 77cbfd85
    Konstantin Osipov authored
    ----------------------------------------------------------
    revno: 2630.4.35
    committer: Konstantin Osipov <konstantin@mysql.com>
    branch nick: mysql-6.0-3726
    timestamp: Wed 2008-06-25 16:44:00 +0400
    message:
      Fix a MyISAM-specific bug in the new implementation of
      LOCK TABLES (WL#3726).
      If more than one instance of a MyISAM table are open in the
      same connection, all of them must share the same status_param.
      Otherwise, unlock of a table may lead to lost records.
      See also comments in thr_lock.c.
    
    include/thr_lock.h:
       Declare thr_lock_merge_status().
    mysql-test/r/lock.result:
      Update test results (WL#3726).
    mysql-test/t/lock.test:
      Add a test case for the situation when the same table is locked
      twice by LOCK TABLES, and only one instance is updated.
    mysys/thr_lock.c:
      Move the code that makes sure all status_params of the same
      table are shared into a separate function.
    sql/lock.cc:
      Make sure that status_param is shared when a table is reopened.
    77cbfd85
lock.result 7.73 KB