• unknown's avatar
    Bug #27716 multi-update did partially and has not binlogged · 6b94fc57
    unknown authored
    Implementation of mysql_multi_update did not call multi_update::send_error method in some cases 
    (see the test reported on bug page and test cases in changeset).
    
    Fixed with deploying the method, ::send_error() is refined to get binlogging code which works whenever 
    there is modified non-transactional table.
    thd->no_trans_update.stmt flag is set in to TRUE to ease testing though being the beginning of relative 
    bug#27417 fix (addresses a part of those issues).
    Eliminating two minor issues (small bugs) in multi_update methods.
    This patch for multi-update also addresses a part of the issues reported in bug#13270,bug#23333.
    
    
    mysql-test/r/innodb.result:
      result changed
    mysql-test/r/multi_update.result:
      results changed
    mysql-test/t/innodb.test:
      regression test for the bug combining transactional and non-transaction tables
    mysql-test/t/multi_update.test:
      regression tests added - erred query must be binlogged
    sql/sql_update.cc:
      making a call to multi_update::send_error when mysql_select return an error;
      deploying binlogging inside of ::send_error;
      refining multi_update::send_eof() to mark binlogging work done when its call to ::do_updates() errs
      and the query is binlogged with the error. ::send_error() will be called after all but
      do not do anything;
      thd->no_trans_update.stmt is corrected to be set to TRUE according to the existed code pattern. 
      Although this part relates to another bugs (bug#27417 etc) it is needed here for testing;
      Eliminating a separate issue in multi_update::do_updates where                
      either one of the class members trans_safe, transactional_tables was          
      set after the per-table loop whereas both should be calculated during         
      looping. 
      Eliminating a separate issue in ::send_eof() where thd->no_trans_update.all won't be set TRUE when
      amoung others there'd be at least one modified transactional table.
      Binlogging is done to satisfy to general character bug#13270,bug#23333 so that those won't have
      fixes specific for multi-update.
    6b94fc57
innodb.test 61.8 KB