Skip to content
  • Benny Wang's avatar
    0214d2c0
    Fixed bug#20746926: GENERATED COLUMNS: INVALID READ OF THD WHEN WARNINGS · 0214d2c0
    Benny Wang authored
    This bug is caused by cached THD pointer of some Item objects.
    
    There are several kinds of Item objects which cache the THD pointer to try to
    lessen the impact of current_thd. However, generated column expression is only
    parsed and fixed once during open table first time. Moreover, the table is
    cached and shared by all sessions. If the Items which cache THD pointer as
    part of generated expression, obviously, such an generated expression can't be
    shared by all sessions. If they were, it would result in invalid read and
    memory leak.
    
    Because there are only 3 Item objects which have effect on generated
    expression. The solution is to remove to cache THD but use current_thd
    instead.
    0214d2c0
    Fixed bug#20746926: GENERATED COLUMNS: INVALID READ OF THD WHEN WARNINGS
    Benny Wang authored
    This bug is caused by cached THD pointer of some Item objects.
    
    There are several kinds of Item objects which cache the THD pointer to try to
    lessen the impact of current_thd. However, generated column expression is only
    parsed and fixed once during open table first time. Moreover, the table is
    cached and shared by all sessions. If the Items which cache THD pointer as
    part of generated expression, obviously, such an generated expression can't be
    shared by all sessions. If they were, it would result in invalid read and
    memory leak.
    
    Because there are only 3 Item objects which have effect on generated
    expression. The solution is to remove to cache THD but use current_thd
    instead.
Loading