We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebaacf0 commit ad57709Copy full SHA for ad57709
sql/sql_list.h
@@ -306,10 +306,13 @@ class base_list :public Sql_alloc
306
*/
307
inline void swap(base_list &rhs)
308
{
309
+ list_node **rhs_last=rhs.last;
310
swap_variables(list_node *, first, rhs.first);
- swap_variables(list_node **, last, rhs.last);
311
swap_variables(uint, elements, rhs.elements);
312
+ rhs.last= last == &first ? &rhs.first : last;
313
+ last = rhs_last == &rhs.first ? &first : rhs_last;
314
}
315
+
316
inline list_node* last_node() { return *last; }
317
inline list_node* first_node() { return first;}
318
inline void *head() { return first->info; }
0 commit comments