1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-24758 heap-use-after-poison in innobase_add_instant_try/rec_copy

This is a backport of
commit fd9ca2a742 (MDEV-23295) and
commit 9a156e1a23 (MDEV-23345) to 10.3.

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.

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:
Marko Mäkelä
2021-04-26 18:17:18 +03:00
parent 391f1aa6ee
commit 4d412e9854
7 changed files with 56 additions and 19 deletions

View File

@ -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