• Marko Mäkelä's avatar
    MDEV-18749: Fix GCC -flifetime-dse · 32de60bb
    Marko Mäkelä authored
    row_merge_create_fts_sort_index(): Initialize dict_col_t in
    an unambiguous way. GCC 6 and later appear to be able to optimize
    away the memset() that is part of mem_heap_zalloc() in the
    placement new call. Let us avoid using placement new in order
    to ensure that the objects will actually be initialized.
    
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71388
    
    https://gcc.gnu.org/ml/gcc/2016-02/msg00207.html
    
    While the latter reference hints that the optimization is only
    applicable to non-POD types (and dict_col_t does not define
    any member functions before 10.2), it is most consistent to
    use the same initialization across all versions.
    32de60bb
row0ftsort.cc 43.2 KB