List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:January 31 2011 3:20pm
Subject:Re: bzr commit into mysql-trunk branch (tor.didriksen:3563) Bug#59794
View as plain text  
Hello,

On 01/28/2011 02:37 PM, Tor Didriksen wrote:
>
>   3563 Tor Didriksen	2011-01-28
>        Bug #59794  Enable unit testing of classes which depend on a working THD
> environment

Patch approved, with two requests for expanded comments.

>        Large parts of the codebase depend on a THD instance in order to be tested.
>        The THD needs to be modified, so it can be used in unit tests.
>
>        Some global initialization also needs to be done.

I think this comment could be expanded to list the changes made in this 
patch to enable THD testing and why they were needed for unit testing.

> === modified file 'sql/sql_plugin.cc'
> --- a/sql/sql_plugin.cc	2010-12-06 13:12:51 +0000
> +++ b/sql/sql_plugin.cc	2011-01-28 13:37:15 +0000
> @@ -1039,6 +1039,9 @@ void plugin_unlock_list(THD *thd, plugin
>     LEX *lex= thd ? thd->lex : 0;
>     DBUG_ENTER("plugin_unlock_list");
>     DBUG_ASSERT(list);
> +  if (count == 0)
> +    DBUG_VOID_RETURN;
> +

Maybe add a short comment here explaining that the reason for the early 
return is that LOCK_plugin might not be initialized?

Thanks,

--- Jon Olav
Thread
bzr commit into mysql-trunk branch (tor.didriksen:3563) Bug#59794Tor Didriksen28 Jan
  • Re: bzr commit into mysql-trunk branch (tor.didriksen:3563) Bug#59794Jon Olav Hauglid31 Jan