• Davi Arnaut's avatar
    Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0 · 96a3a92c
    Davi Arnaut authored
    The problem was that the multiple evaluations of a ENCODE or
    DECODE function within a single statement caused the random
    generator to be reinitialized at each evaluation, even though
    the parameters were constants.
    
    The solution is to initialize the random generator only once
    if the password (seed) parameter is constant.
    
    This patch borrows code and ideas from Georgi Kodinov's patch.
    96a3a92c
sql_crypt.h 1.14 KB