Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2129 06/02/14 17:03:47 mikron@stripped +1
-0
WL 2826: Error handling of ALTER TABLE for partitioning
Some more error handling
sql/sql_partition.cc
1.50 06/02/14 17:03:35 mikron@stripped +47
-27
Some more error handling
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mikron
# Host: c-ba0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
# Root: /Users/mikron/wl2826
--- 1.49/sql/sql_partition.cc 2006-02-14 14:22:06 +01:00
+++ 1.50/sql/sql_partition.cc 2006-02-14 17:03:35 +01:00
@@ -5714,6 +5714,51 @@
/*
+ Handle errors for ALTER TABLE for partitioning
+ SYNOPSIS
+ handle_alter_part_error()
+ lpt Struct carrying parameters
+ not_completed Was request in complete phase when error occurred
+ RETURN VALUES
+ NONE
+*/
+
+void
+handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt, bool not_completed)
+{
+ partition_info *part_info= lpt->part_info;
+ DBUG_ENTER("handle_alter_part_error");
+
+ if (!part_info->first_log_entry &&
+ execute_table_log_entry(part_info->first_log_entry))
+ {
+ /*
+ We couldn't recover from error
+ */
+ }
+ else
+ {
+ if (not_completed)
+ {
+ /*
+ We hit an error before things were completed but managed
+ to recover from the error.
+ */
+ }
+ else
+ {
+ /*
+ We hit an error after we had completed most of the operation
+ and were successful in a second attempt so the operation
+ actually is successful now.
+ */
+ }
+ }
+ DBUG_VOID_RETURN;
+}
+
+
+/*
Actually perform the change requested by ALTER TABLE of partitions
previously prepared.
@@ -5929,34 +5974,9 @@
ERROR_INJECT_CRASH("crash_drop_partition_8") ||
(mysql_wait_completed_table(lpt, table), FALSE))
{
+ handle_alter_part_error(lpt, not_completed);
+ DBUG_RETURN(TRUE);
abort();
- if (!not_completed)
- abort();
- if (!part_info->first_log_entry &&
- execute_table_log_entry(part_info->first_log_entry))
- {
- /*
- We couldn't recover from error
- */
- }
- else
- {
- if (not_completed)
- {
- /*
- We hit an error before things were completed but managed
- to recover from the error.
- */
- }
- else
- {
- /*
- We hit an error after we had completed most of the operation
- and were successful in a second attempt so the operation
- actually is successful now.
- */
- }
- }
fast_alter_partition_error_handler(lpt);
DBUG_RETURN(TRUE);
}
| Thread |
|---|
| • bk commit into 5.1 tree (mikron:1.2129) | mikael | 15 Feb |