#At file:///Users/mattiasj/mysql-bzr/b56172-55-bf/ based on revid:mattias.jonsson@stripped
3211 Mattias Jonsson 2010-09-28
Bug#56172: Server crashes in ha_partition::reset on REBUILD PARTITION under LOCK TABLE
Small correction of error handling before review.
In case ha_change_partitions failed, the error would
have been overwritten by the return code of ha_external_lock.
modified:
sql/sql_partition.cc
=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc 2010-09-21 23:29:26 +0000
+++ b/sql/sql_partition.cc 2010-09-28 10:21:08 +0000
@@ -5549,7 +5549,7 @@ static bool mysql_change_partitions(ALTE
if(mysql_trans_prepare_alter_copy_data(thd))
DBUG_RETURN(TRUE);
- if ((error= file->ha_external_lock(thd, F_WRLCK)))
+ if (file->ha_external_lock(thd, F_WRLCK))
DBUG_RETURN(TRUE);
if ((error= file->ha_change_partitions(lpt->create_info, path, &lpt->copied,
@@ -5562,7 +5562,7 @@ static bool mysql_change_partitions(ALTE
if (mysql_trans_commit_alter_copy_data(thd))
error= 1; /* The error has been reported */
- if ((error= file->ha_external_lock(thd, F_UNLCK)))
+ if (file->ha_external_lock(thd, F_UNLCK))
error= 1;
DBUG_RETURN(test(error));
Attachment: [text/bzr-bundle] bzr/mattias.jonsson@oracle.com-20100928102108-dhswgodqtj20nc56.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-bugfixing branch (mattias.jonsson:3211) Bug#56172 | Mattias Jonsson | 28 Sep |