List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:March 5 2010 1:22pm
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (marc.alff:3122)
Bug#51741
View as plain text  
Hi Marc,

Change looks fine and the test passes after applying the patch.
OK to push.

Thanks for fixing the failing unit tests so quickly.

Best regards,
Olav

Marc Alff wrote:
> #At file:///home/malff/BZR_TREE/mysql-next-mr-bugfixing-51741/ based on
> revid:alik@stripped
>
>  3122 Marc Alff	2010-03-04
>       Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixing
>       
>       The root cause of the failure is that when
>       Bug#51447 performance schema evil twin files
>       was fixed, instrumented file names got normalized.
>       
>       The pfs-t unit test depends on this file normalization,
>       but it was not updated.
>       
>       This fix aligns pfs-t.cc lookup_file_by_name()
>       with the logic in pfs_instr.cc find_or_create_file().
>
>     modified:
>       storage/perfschema/unittest/pfs-t.cc
> === modified file 'storage/perfschema/unittest/pfs-t.cc'
> --- a/storage/perfschema/unittest/pfs-t.cc	2010-01-12 01:47:27 +0000
> +++ b/storage/perfschema/unittest/pfs-t.cc	2010-03-05 01:10:27 +0000
> @@ -37,14 +37,25 @@ PFS_file* lookup_file_by_name(const char
>    uint i;
>    PFS_file *pfs;
>    uint len= strlen(name);
> +  size_t dirlen;
> +  const char *filename;
> +  uint filename_length;;
>  
>    for (i= 0; i < file_max; i++)
>    {
>      pfs= & file_array[i];
>      if (pfs->m_lock.is_populated())
>      {
> -      if ((len == pfs->m_filename_length) &&
> -          (strncmp(name, pfs->m_filename, pfs->m_filename_length) == 0))
> +      /*
> +        When a file "foo" is instrumented, the name is normalized
> +        to "/path/to/current/directory/foo", so we remove the
> +        directory name here to find it back.
> +      */
> +      dirlen= dirname_length(pfs->m_filename);
> +      filename= pfs->m_filename + dirlen;
> +      filename_length= pfs->m_filename_length - dirlen;
> +      if ((len == filename_length) &&
> +          (strncmp(name, filename, filename_length) == 0))
>          return pfs;
>      }
>    }
>
>   
> ------------------------------------------------------------------------
>
>

Thread
bzr commit into mysql-next-mr-bugfixing branch (marc.alff:3122) Bug#51741Marc Alff5 Mar
  • Re: bzr commit into mysql-next-mr-bugfixing branch (marc.alff:3122)Bug#51741Olav Sandstaa5 Mar