diff --git a/sql/sql_list.h b/sql/sql_list.h index 505ea994d42..6eb4f98c011 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -201,6 +201,8 @@ public: *new_list.last=current->next; current->info=new_list.first->info; current->next=new_list.first->next; + if ((list->last == ¤t->next) && (new_list.elements > 1)) + list->last= new_list.last; list->elements+=new_list.elements-1; } return ret_value; // return old element