List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:November 29 2010 2:57pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3511)
Bug#54486
View as plain text  
Hello,

On 11/29/2010 11:05 AM, Dmitry Shulga wrote:
>   3511 Dmitry Shulga	2010-11-29
>        Fixed bug#54486 - assert in my_seek, concurrent
>        DROP/CREATE SCHEMA, CREATE TABLE, REPAIR.
>
>        The cause of assert was concurrent execution of
>        DROP DATABASE and REPAIR TABLE where first statement
>        deleted table's file .TMD at the same time when
>        REPAIR TABLE statement tried replace
>        old file by temporary file that has just been removed.
>
>        Additionally was fixed trouble when DROP TABLE try delete
>        all files belong to table being dropped at the same time
>        when REPAIR TABLE statement has just deleted .TMD file.
>       @ sql/sql_db.cc
>          mysql_rm_known_files() modified: ignore possible errors
>          when trying delete all table's files. Such aggressigve
>          algorithm permits skip already deleted (in another thread)
>          files.
>       @ storage/myisam/mi_check.c
>          mi_repair() was modified: set param->retry_repair= 0
>          in order to don't call following failover procedure
>          in ha_myisam::repair(); set an error in diagnostic area in
>          case of error in access to .TMD file.

I think that you should either add a regression test for the bug or
explain in the commit message why you don't.

I've verified that your patch fixes the bug by using RQG and the
grammar given in the bug report.

> === modified file 'storage/myisam/mi_check.c'
> --- a/storage/myisam/mi_check.c	2010-03-25 12:08:21 +0000
> +++ b/storage/myisam/mi_check.c	2010-11-29 10:05:20 +0000
> @@ -51,6 +51,7 @@
>   #include<sys/mman.h>
>   #endif
>   #include "rt_index.h"
> +#include "mysqld_error.h"
>
>   #ifndef USE_RAID
>   #define my_raid_create(A,B,C,D,E,F,G) my_create(A,B,C,G)
> @@ -1740,7 +1741,11 @@ err:
>   			    (param->testflag&  T_BACKUP_DATA ?
>   			     MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
>   	  mi_open_datafile(info,share,name,-1))
> -	got_error=1;
> +      {
> +        got_error=1;
> +        my_error(ER_CANT_DELETE_FILE, MYF(0), share->data_file_name, errno);
> +      }
> +      param->retry_repair= 0;

I don't think you need to report an error using my_error() here.
If you look at mysql_admin_table(), you'll see that the error will be
cleared anyway and a message sent based on the error code returned
from the storage engine (HA_ADMIN_FAILED in this case).

Otherwise, looks ok.

--- Jon Olav
Thread
bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3511) Bug#54486Dmitry Shulga29 Nov
  • Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3511)Bug#54486Jon Olav Hauglid29 Nov
  • Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3511)Bug#54486Sergey Vojtovich29 Nov