mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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().
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user