diff --git a/sql/create_options.cc b/sql/create_options.cc index c4d320f7843..ba988456643 100644 --- a/sql/create_options.cc +++ b/sql/create_options.cc @@ -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,