• unknown's avatar
    - Fix for BUG#1858 "SQL-Thread stops working when using optimize table": · 66927c51
    unknown authored
    we change THD::system_thread from a 'bool' to a bitmap to be able to
    distinguish between delayed-insert threads and slave threads.
    - Fix for BUG#1701 "Update from multiple tables" (one line in sql_parse.cc,
    plus a new test rpl_multi_update.test). That's just adding an initialization.
    
    
    sql/repl_failsafe.cc:
      comment to warn about this unused code
    sql/slave.cc:
      Now thd->system_thread is a bitmap, not a bool.
    sql/sql_class.h:
      'bool' for THD::system_thread is not accurate enough; sometimes we need
      to distinguish between delayed-insert threads and slave threads;
      so changing THD::system_thread to a bitmap (uint).
    sql/sql_insert.cc:
      thd.system_thread is now a bitmap
    sql/sql_parse.cc:
      We need to initialize thd->lex.select_lex.options in mysql_init_query();
      it's already initialized in dispatch_command() but replication calls
      mysql_parse() directly, thus bypassing dispatch_command().
      Not initing it here leads to a query influencing the next query,
      in the slave SQL thread.
      The initialization in dispatch_command() must be kept as this
      command uses the variable in tests, even when the command was not a
      query (i.e. when mysql_init_query() was not called).
    66927c51
rpl_multi_update.result 625 Bytes