Post-fix for MDEV-35236

when the option_list is initially empty, its value doesn't need
to be restored, as it'll be shallow-copied every time.
Furthermore, the CREATE_INFO is allocated on the stack, so it's
even wrong to restore it after its frame was left.

followup for 3cd706b107d
This commit is contained in:
Sergei Golubchik 2024-10-28 10:29:27 +01:00
parent 4b068b7fcb
commit 953f847aed

View File

@ -285,8 +285,8 @@ bool extend_option_list(THD* thd, handlerton *hton, bool create,
{
if (!extended)
{
void *pos= *option_list ? &(last->next) : option_list;
thd->register_item_tree_change((Item**)pos);
if (*option_list)
thd->register_item_tree_change((Item**)&(last->next));
extended= true;
}
new (root) engine_option_value(name, value,