Fix for bug#39182: Binary log producing incompatible character set query
from stored procedure. Problem: we replace all references to local variables in stored procedures with NAME_CONST(name, value) logging to the binary log. However, if the value's collation differs we might get an 'illegal mix of collation' error as we don't pass the collation to the function. Fix: pass the value's collation to NAME_CONST(). Note: actually we should pass to NAME_CONST() the value's derivation as well. It's impossible without the parser modifying. Now we always set the derivation to DERIVATION_IMPLICIT, the same as local variables have.
Showing
Please register or sign in to comment