From: Mattias Jonsson Date: September 28 2010 10:21am Subject: bzr commit into mysql-5.5-bugfixing branch (mattias.jonsson:3211) Bug#56172 List-Archive: http://lists.mysql.com/commits/119248 X-Bug: 56172 Message-Id: <201009281021.o8S9Pg0Q031609@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3917865800837108331==" --===============3917865800837108331== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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)); --===============3917865800837108331== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/mattias.jonsson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: mattias.jonsson@stripped\ # dhswgodqtj20nc56 # target_branch: file:///Users/mattiasj/mysql-bzr/b56172-55-bf/ # testament_sha1: a50f74909d155178e153cf026f1f402dd3ced520 # timestamp: 2010-09-28 12:21:44 +0200 # base_revision_id: mattias.jonsson@stripped\ # jm1pk1ukoequ1jhd # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWWFu1owAAZ3fgAAQWGf/938/ 3oC////wUAQW3e9e1TzoqN7WzwkpNCY0k/UNDU8SbaonknqDQNpojHqaT1MglFDRop5onqNqn6pp kNHqAAA0ANACUJoEJpoyo/UaZJ6mj0g0YIAaaNADaipkekZGmpg0TIAAaYEBoZDQJJJk0mBGptDI mU/TRTajR6gAAGgNzvjSL6ZDVCGMINprRBvZCihjBYqdwx/bsKqp6+Ianldhc8Fgru09h4eHofy9 H0+rp3zxjVe/+s85cxspnGfiabuMDJR2yboW26a9fzUTEaaloIHTYVqk4iLb5SsviFZhnS+qZca/ YXpCwCoyArkVeOWIORp06FzOCcOvGqSrbpJRWwEc1InbGdOKkIsuMBGVApRXlHB46VrAlng12LG4 +EedafTqCiBCovwkzWFjTWmvkMA3AtCa8n6jMI8BXCtRgSkQe7CxnEqPDdGQUw63jDRk6G7imbqb WKchKg4lOPWYD6x8ucwjVIsxu1bS6YcK5FVazF92zi3Co9CzZY9iRQchHqnYa9xPVSSzDfhnXgWY 666B2W4gKChDIYzra8KRnXSVvvScqMCwpmfLesy1kjtC9FpBKs9tqZhwwwNBbXEuEyGoRxRjfyws joZBr8m16raZjBSAXQEhxWFbZmmacMIPK63YsWQ0wKsi4TaRQJ0XpM/TjW/SkMu3n3kkQ44YqWJh 37zPh5h6Ysx6uKG+Sl4YQkppoplkP6+KlkbqORxOwM91SNgo4uz7SDAvh0mLaSI3e7ThvSN2PG0P vkXq5u0QqK6BEQVcJl+2SI6uuPXSbjpEhJKb0UqPf2FQvqVE0/gtXdcTaYT702JInnSMsRqgzOMf DRrodzKNM0NVT3B+JZpSv8lgryWcUrPajM+5sIxJvVaeGojOjQufZ1XQNkWNyHv546IZXsdwzd1w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