• Ramil Kalimullin's avatar
    Fix for bug#39182: Binary log producing incompatible character set query · dc6a5ff8
    Ramil Kalimullin authored
    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.
    dc6a5ff8
binlog.test 4.04 KB