List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:December 4 2008 11:24am
Subject:Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)
Bug#38426
View as plain text  
Øystein Grøvlen wrote:
> 
> It seems to me that you are creating the difference yourself here.  If 
> you look at the definition of plugin_ref_to_se_ref:
> 
> #ifdef DBUG_OFF
> #define plugin_ref_to_se_ref(A) (A)
> #define se_ref_to_plugin_ref(A) (A)
> #else
> #define plugin_ref_to_se_ref(A) ((A) ? *(A) : NULL)
> #define se_ref_to_plugin_ref(A) &(A)
> #endif
> 
> The only thing it does is to dereference a pointer in debug builds. 
> However, when using plugin_ref_to_se_ref, you create this pointer yourself:
> 
> +#ifdef DBUG_OFF
> +  return plugin_ref_to_se_ref(hton2plugin[hton->slot]);
> +#else
> +  return plugin_ref_to_se_ref(&hton2plugin[hton->slot]);
> +#endif
> 
> What is the purpose of the that?  The end result seems to be
> hton2plugin[hton->slot] in both cases.
>

I am the culprit here - Jorgen just copied the code which I suggested. You are 
right Oystein, the distinction is redundant - hton2pluigin[..] is always of 
correct type storage_engine_ref. Good catch!

Rafal
Thread
bzr commit into mysql-6.0-backup branch (jorgen.loland:2746) Bug#38426Jorgen Loland28 Nov
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Rafal Somla28 Nov
    • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Jørgen Løland3 Dec
      • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Øystein Grøvlen3 Dec
        • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Jørgen Løland3 Dec
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Øystein Grøvlen3 Dec
    • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Rafal Somla4 Dec
    • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Jørgen Løland4 Dec
      • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Øystein Grøvlen4 Dec
        • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Rafal Somla4 Dec
        • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2746)Bug#38426Jørgen Løland4 Dec