Hi Sergei, On 01/20/2018 10:35 PM, Sergei Golubchik wrote:
Hi, Alexander!
Thanks! Looks more robust, indeed. Isn't there a need to save/restore the arena?
You call thd->free_items(); but unless mem_root is reset this won't free the memory, so I'd expect thd->free_list and thd->mem_root to be always saved/restored in sync. That is, as an arena.
As agreed on slack, let's return to the first version of the patch. I only added a helper class Item_change_list_savepoint, to avoid duplicate code. Thanks!
On Jan 18, Alexander Barkov wrote:
On 12/27/2017 08:33 PM, Sergei Golubchik wrote:
Hi, Alexander!
On Dec 26, Alexander Barkov wrote:
Hi Sergei,
can you please review a patch for MDEV-14603?
I agree with the fix.
But I don't like that there are many things to backup/restore (Statement, arena, free_list, and now change_list), they're all saved/restored in different places - it's easy to miss something when making changes.
Would it be possible to move all that saving/restoring into dedicated helpers and use them in all three places (prepare, execute, execute immediate)?
Thanks for a good idea.
Done. Please find attached.
Regards, Sergei Chief Architect MariaDB and security@mariadb.org