List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:November 29 2010 3:41pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3511)
Bug#54486
View as plain text  
Hi Dmitry,

On Mon, Nov 29, 2010 at 10:05:41AM +0000, Dmitry Shulga wrote:
> #At file:///Users/shulga/projects/mysql/5.1-bugteam-bug54486/ based on
> revid:vasil.dimov@stripped
> 
>  3511 Dmitry Shulga	2010-11-29
>       Fixed bug#54486 - assert in my_seek, concurrent
>       DROP/CREATE SCHEMA, CREATE TABLE, REPAIR.

...skip...

> === modified file 'sql/sql_db.cc'
> --- a/sql/sql_db.cc	2010-10-19 10:27:09 +0000
> +++ b/sql/sql_db.cc	2010-11-29 10:05:20 +0000
> @@ -985,6 +985,10 @@ bool mysql_rm_db(THD *thd,char *db,bool 
>      }
>      thd->pop_internal_handler();
>    }
> +  DBUG_ASSERT(deleted >= 0 ||
> +              (deleted < 0 && thd->main_da.is_set()) ||
> +              thd->killed);
> +
Could you explain what you're trying to assert here?

>    if (!silent && deleted>=0)
>    {
>      const char *query;
> @@ -1213,10 +1217,7 @@ static long mysql_rm_known_files(THD *th
>      else
>      {
>        strxmov(filePath, org_path, "/", file->name, NullS);
> -      if (my_delete_with_symlink(filePath,MYF(MY_WME)))
> -      {
> -	goto err;
> -      }
> +      my_delete_with_symlink(filePath, MYF(MY_WME));
An obvious question is what if I try to delete a file, whereas I have
no permission to do so?
Another obvious question is how this change affects binlog?
You return OK status, but request my_delete_with_symlink() to call
my_error() via MY_WME. Isn't it the case that Diagnostics area
declares invalid?

>      }
>    }
>    if (thd->killed ||
> 
> === 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;
>      }
>    }
>    if (got_error)
The question was: why at all do we need to report an error here?
(Not why to report ER_CANT_DELETE_FILE, but not something else.)

...skip...

Regards,
Sergey
-- 
Sergey Vojtovich <svoj@stripped>
MySQL AB, Software Engineer
Izhevsk, Russia, www.mysql.com
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