• Sergei Golubchik's avatar
    MDEV-17898 FLUSH PRIVILEGES crashes server with segfault · daca7e70
    Sergei Golubchik authored
    merge_role_db_privileges() was remembering pointers into Dynamic_array
    acl_dbs, and later was using them, while pushing more elements into the
    array. But pushing can cause realloc, and it can invalidate all pointers.
    
    Fix: remember and use indexes of elements, not pointers.
    daca7e70
flush_roles-17898.test 445 Bytes