From: Ashish Agarwal Date: February 3 2012 2:15pm Subject: bzr push into mysql-5.5 branch (ashish.y.agarwal:3702 to 3703) Bug#11748748 List-Archive: http://lists.mysql.com/commits/142744 X-Bug: 11748748 Message-Id: <201202031415.q13EFXWb002948@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3703 Ashish Agarwal 2012-02-03 [merge] BUG#11748748: Merge from mysql-5.1 to mysql-5.5 modified: storage/archive/ha_archive.cc 3702 Ashish Agarwal 2012-02-03 BUG#11754145: One of the test was failing. Patch to fix the test modified: mysql-test/include/have_32bit.inc mysql-test/include/have_64bit.inc === modified file 'storage/archive/ha_archive.cc' --- a/storage/archive/ha_archive.cc 2011-11-23 13:20:29 +0000 +++ b/storage/archive/ha_archive.cc 2012-02-03 14:11:03 +0000 @@ -1394,6 +1394,7 @@ int ha_archive::optimize(THD* thd, HA_CH char writer_filename[FN_REFLEN]; DBUG_ENTER("ha_archive::optimize"); + mysql_mutex_lock(&share->mutex); init_archive_reader(); // now we close both our writer and our reader for the rename @@ -1408,7 +1409,10 @@ int ha_archive::optimize(THD* thd, HA_CH MY_REPLACE_EXT | MY_UNPACK_FILENAME); if (!(azopen(&writer, writer_filename, O_CREAT|O_RDWR|O_BINARY))) + { + mysql_mutex_unlock(&share->mutex); DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE); + } /* Transfer the embedded FRM so that the file can be discoverable. @@ -1494,10 +1498,12 @@ int ha_archive::optimize(THD* thd, HA_CH rc= my_rename(writer_filename, share->data_file_name, MYF(0)); + mysql_mutex_unlock(&share->mutex); DBUG_RETURN(rc); error: DBUG_PRINT("ha_archive", ("Failed to recover, error was %d", rc)); azclose(&writer); + mysql_mutex_unlock(&share->mutex); DBUG_RETURN(rc); } No bundle (reason: useless for push emails).