Can I use local variables in a trigger if I expect it to replicate on a slave ?
I have a trigger that uses a local variable @userId that is set prior to the triggering query. So every time a certain query is run the variable @userId is set and the trigger can make use of it.
My question is, can I expect the bin log to work correctly if my binlog_format is STATEMENT ?
I know from the documentation that session variables will not work, but they do not mention local variables.
in statement-based replication, session variables are not replicated properly when used in statements that update tables.