Skip to content

Commit

Permalink
Post-fix for MDEV-35236
Browse files Browse the repository at this point in the history
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 3cd706b
  • Loading branch information
vuvova committed Oct 28, 2024
1 parent 4b068b7 commit 953f847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/create_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 953f847

Please sign in to comment.