Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
26c645d1
Commit
26c645d1
authored
Feb 14, 2006
by
mikron@c-ba0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL 2826: Error handling of ALTER TABLE for partitioning
Some more error handling
parent
aec1c506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
27 deletions
+47
-27
sql/sql_partition.cc
sql/sql_partition.cc
+47
-27
No files found.
sql/sql_partition.cc
View file @
26c645d1
...
...
@@ -5713,6 +5713,51 @@ write_log_completed(ALTER_PARTITION_PARAM_TYPE *lpt)
}
/*
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 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment