• Andrei Elkin's avatar
    Bug #50192 Strange effect in replication test, trigger, auto_increment · f705fe66
    Andrei Elkin authored
    The auto-inc unsafe warning makes sense even though it's just
    one auto-inc table could be involved via a trigger or a stored
    function.
    However its content was not updated by bug@45677 fixes continuing to mention
    two tables whereas the fixes refined semantics of replication of auto_increment 
    in stored routine.
    
    Fixed with updating the error message, renaming the error and an internal unsafe-condition 
    constants.
    
    A documentation notice
    ======================
    
          Inserting into an autoincrement column in a stored function or a trigger
          is unsafe for replication.
          Even with just one autoincrement column, if the routine is invoked more than 
          once slave is not guaranteed to execute the statement graph same way as 
          the master.
          And since it's impossible to estimate how many times a routine can be invoked at 
          the query pre-execution phase (see lock_tables), the statement is marked
          pessimistically unsafe. 
    
    
    
    mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
      results updated to include the expected unsafe warning.
    mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test:
      regression test for bug#50192 to diplaying the unsafe warning comes out to the user warning stack.
    sql/share/errmsg-utf8.txt:
      Updating the auto-inc unsafe message to correspond to bug@45677 fixes' new sematics.
    sql/share/errmsg.txt:
      Updating the auto-inc unsafe message to correspond to bug@45677 fixes' new sematics.
    sql/sql_base.cc:
      changing a symbolic name to correspond to updated by bug@45677 fixes new sematics.
    sql/sql_lex.cc:
      changing a symbolic name to correspond to updated by bug@45677 fixes new sematics.
    sql/sql_lex.h:
      changing a symbolic name to correspond to updated by bug@45677 fixes new sematics
      and description comments.
    f705fe66
binlog_stm_unsafe_warning.result 4.55 KB