• unknown's avatar
    fix for BUG#1331: "Unexistent user variable is not replicated". · 031b6b5f
    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).
    031b6b5f
rpl_user_variables.test 1.73 KB