• Yuchen Pei's avatar
    MDEV-29027 ASAN errors in spider_db_free_result after partition DDL · 25476ba1
    Yuchen Pei authored
    Spider calls ha_spider::close() at least twice on ALTER TABLE ... ADD
    PARTITION. The first call frees wide_handler and the second call
    accesses wide_handler->trx->thd (heap-use-after-free).
    
    In general, there seems to be no problem with using THD obtained by
    the macro current_thd() except in background threads. Thus, we simply
    replace wide_handler->trx->thd with current_thd().
    
    Original author: Nayuta Yanagasawa
    25476ba1
spd_db_conn.cc 380 KB