Hello Davi!
* Davi Arnaut <davi.arnaut@stripped> [11/04/12 16:39]:
> # At a local mysql-trunk repository of davi
>
> 3348 Davi Arnaut 2011-04-12
> Increment the I_P_List counter whenever a element is inserted into
> the list. Previously, the counter would only be incremented if the
> insertion method push_front() was used, in which case the counter
> wouldn't be incremented if a element was inserted using the push_back()
> and/or insert_after() methods.
>
> Currently this does not affect the code base because there isn't any
> code that uses a counted list with the push_back() or insert_after()
> methods. Thus, add a unit test case to ensure that the counted list
> works properly.
...
> === modified file 'sql/sql_plist.h'
> --- a/sql/sql_plist.h 2011-04-11 11:52:24 +0000
> +++ b/sql/sql_plist.h 2011-04-12 12:38:23 +0000
> @@ -126,6 +128,7 @@ public:
> }
> inline T* front() { return m_first; }
> inline const T *front() const { return m_first; }
> + inline T* pop_front() { T* ptr= front(); remove(ptr); return ptr; }
> void swap(I_P_List<T, B, C> &rhs)
> {
> swap_variables(T *, m_first, rhs.m_first);
Since this method is not really necessary and we are not sure how should
it behave in case of empty list I suggest to remove it.
Otherwise I am OK with your patch and think that it can be pushed.
--
Dmitry Lenev, Software Developer
Oracle Development SPB/MySQL, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification