List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:June 24 2010 6:00pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)
Bug#54117
View as plain text  
* Jon Olav Hauglid <Jon.Hauglid@stripped> [10/06/22 18:43]:

>  3438 Jon Olav Hauglid	2010-06-22
>       Bug #54117 crash in thr_multi_unlock, temporary table
> +#
> +# Bug#54117 crash in thr_multi_unlock, temporary table
> +#
> +CREATE TEMPORARY TABLE t1(a INT) ENGINE = InnoDB;
> +LOCK TABLES t1 READ;
> +ALTER TABLE t1 COMMENT 'test';
> +UNLOCK TABLES;
> +DROP TABLE t1;
>  End of 5.1 tests
> 
> === modified file 'sql/sql_table.cc'
> --- a/sql/sql_table.cc	2010-06-10 20:45:22 +0000
> +++ b/sql/sql_table.cc	2010-06-22 13:55:26 +0000
> @@ -7387,6 +7387,11 @@ view_err:
>        mysql_unlock_tables(thd, thd->lock);
>        thd->lock=0;
>      }
> +    /*
> +      If LOCK TABLES list is not empty and contains this table,
> +      unlock the table and remove the table from this list.
> +    */
> +    mysql_lock_remove(thd, thd->locked_tables, table, FALSE);

This drops the lock on the source table, but does not 
acquire a lock on the new table.

This is a violation of PSEA API -- we don't ever call
store_lock() before start_stmt on the new table. 

I don't know if it's a problem.

One way to investigate is to try to work with that table a bit
after ALTER. 

Perhaps a better solution for 5.5 is to make Locked_tables_list
aware of temporary tables.

-- 
Thread
bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438) Bug#54117Jon Olav Hauglid22 Jun
  • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)Bug#54117Konstantin Osipov23 Jun
    • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)Bug#54117Jon Olav Hauglid24 Jun
  • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)Bug#54117Konstantin Osipov24 Jun
  • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)Bug#54117Konstantin Osipov2 Jul
    • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3438)Bug#54117Jon Olav Hauglid5 Jul