1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

WL 2826: Error handling of ALTER TABLE for partitioning

Started writing detailed error handler of
ALTER TABLE for partitioning.
Philosophical issue, should one always attempt to make recovery
automatic or should one rely on manual means also.


sql/mysql_priv.h:
  Flag to ensure we can't be killed in a very critical spot
sql/sql_base.cc:
  Flag to ensure we can't be killed in a very critical spot
sql/sql_partition.cc:
  Started writing detailed error handler of
  ALTER TABLE for partitioning.
  Philosophical issue, should one always attempt to make recovery
  automatic or should one rely on manual means also.
This commit is contained in:
unknown
2006-02-15 11:08:08 +01:00
parent c8db62f64c
commit e20cbe27de
3 changed files with 124 additions and 61 deletions

View File

@ -6107,7 +6107,8 @@ bool is_equal(const LEX_STRING *a, const LEX_STRING *b)
old_lock_level Old lock level
*/
bool abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt)
bool abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt,
bool can_be_killed)
{
uint flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
int error= FALSE;
@ -6117,7 +6118,7 @@ bool abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt)
VOID(pthread_mutex_lock(&LOCK_open));
mysql_lock_abort(lpt->thd, lpt->table, TRUE);
VOID(remove_table_from_cache(lpt->thd, lpt->db, lpt->table_name, flags));
if (lpt->thd->killed)
if (can_be_killed && lpt->thd->killed)
{
lpt->thd->no_warnings_for_error= 0;
error= TRUE;