• Sergey Glukhov's avatar
    Bug#45195 valgrind warnings about uninitialized values in store_record_in_cache() · e5a38da7
    Sergey Glukhov authored
    The problem becomes apparent only if HAVE_purify is undefined.
    It related to the part of code placed in open_table_from_share() fuction
    where we initialize record buffer only if HAVE_purify is enabled.
    So in case of HAVE_purify=OFF record buffer is not initialized
    on open table stage.
    Next we read key, find NULL value and update appropriate null bit
    but do not update record buffer. After that the record is stored
    in the join cache(store_record_in_cache). For CHAR fields we
    strip trailing spaces and in our case this procedure uses
    uninitialized record buffer.
    The fix is to skip stripping space procedure in case of null values
    for CHAR fields(partially based on 6.0 JOIN_CACHE implementation).
    e5a38da7
join.result 40.1 KB