• anozdrin/alik@ibm.opbmk's avatar
    Fix for BUG#25843: changing default database between PREPARE and EXECUTE · d6f94b06
    anozdrin/alik@ibm.opbmk authored
    of statement breaks binlog.
    
    There were two problems discovered by this bug:
    
      1. Default (current) database is not fixed at the creation time.
         That leads to wrong output of DATABASE() function.
    
      2. Database attributes (@@collation_database) are not fixed at
         the creation time. That leads to wrong resultset.
    
    Binlog breakage and Query Cache wrong output happened because of
    the first problem.
    
    The fix is to remember the current database at the PREPARE-time and
    set it each time at EXECUTE.
    d6f94b06
rpl_ps.result 1.56 KB