• Dmitry Shulga's avatar
    Fixed bug #51855. Race condition in XA START. If several threads · 7ccbf9b8
    Dmitry Shulga authored
    concurrently execute the statement XA START 'x', then mysqld
    server could crash.
    
    sql/sql_class.cc:
      xid_cache_insert: added checking for element in cache before
      insert it, return TRUE if such element already exists.
    sql/sql_parse.cc:
      mysql_execute_command modified:
      * sequence of calls to xid_cache_search(..)/xid_cache_insert(...)
      replaced by call to xid_cache_insert(...) in alternative
      'case SQLCOM_XA_START:'
      * added comment to alternative 'case SQLCOM_XA_COMMIT:'.
    7ccbf9b8
sql_class.cc 111 KB