summaryrefslogtreecommitdiff
path: root/sql/sql_alter.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-27 15:04:04 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-27 15:04:04 +0300
commitfd9ca2a742abe2e91b2b77e70915dec7bd3cd7e1 (patch)
treea1dd480724f4b4e8a4f359a456eb90c412e6e505 /sql/sql_alter.h
parent4968fdbcef1c2d62ed525dffac153cf9f8eb1913 (diff)
downloadmariadb-git-fd9ca2a742abe2e91b2b77e70915dec7bd3cd7e1.tar.gz
MDEV-23295 ROW_FORMAT mismatch in instant ALTER TABLE
An instant ADD/DROP/reorder column could create a dummy table object with the wrong ROW_FORMAT when innodb_default_row_format was changed between CREATE TABLE and ALTER TABLE. prepare_inplace_alter_table_dict(): If we had promised that ALGORITHM=INPLACE is supported, we must preserve the ROW_FORMAT. dict_table_t::prepare_instant(): Add debug assertions to catch ROW_FORMAT mismatch. The rest of the changes are related to adding Alter_inplace_info::inplace_supported to cache the return value of handler::check_if_supported_inplace_alter().
Diffstat (limited to 'sql/sql_alter.h')
-rw-r--r--sql/sql_alter.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/sql_alter.h b/sql/sql_alter.h
index 53d0c8438f8..71920b84792 100644
--- a/sql/sql_alter.h
+++ b/sql/sql_alter.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
- Copyright (c) 2013, 2018, MariaDB Corporation.
+ Copyright (c) 2013, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -204,29 +204,26 @@ public:
with the specified user alter algorithm.
@param thd Thread handle
- @param result Operation supported for inplace alter
@param ha_alter_info Structure describing changes to be done
by ALTER TABLE and holding data during
in-place alter
@retval false Supported operation
@retval true Not supported value
*/
- bool supports_algorithm(THD *thd, enum_alter_inplace_result result,
+ bool supports_algorithm(THD *thd,
const Alter_inplace_info *ha_alter_info);
/**
Check whether the given result can be supported
with the specified user lock type.
- @param result Operation supported for inplace alter
@param ha_alter_info Structure describing changes to be done
by ALTER TABLE and holding data during
in-place alter
@retval false Supported lock type
@retval true Not supported value
*/
- bool supports_lock(THD *thd, enum_alter_inplace_result result,
- const Alter_inplace_info *ha_alter_info);
+ bool supports_lock(THD *thd, const Alter_inplace_info *ha_alter_info);
/**
Return user requested algorithm. If user does not specify