• unknown's avatar
    fix for BUG#1331: "Unexistent user variable is not replicated". · f212ca3b
    unknown authored
    When an update query is to be written to the binlog, and it reads unset
    user variables (example: INSERT INTO t VALUEs(@A) where @A does not exist),
    we create the variable like if it had been set with SET before, and we loop
    (i.e. we redo the steps of logging, now that the variable exists).
    
    
    mysql-test/r/rpl_user_variables.result:
      result update.
    mysql-test/t/rpl_user_variables.test:
      test to see if unset user variables are written to the binlog
    sql/item_func.cc:
      When an update query is to be written to the binlog, and it reads unset
      user variables (example: INSERT INTO t VALUEs(@A) where @A does not exist),
      we create the variable like if it had been set with SET before, and we loop
      (i.e. we redo the steps of logging, now that the variable exists).
    f212ca3b
rpl_user_variables.result 2.91 KB