diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-02-28 14:29:05 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-02-28 14:29:05 +0530 |
commit | f56dd0a12dc7d7c3020625e76a532ee77386b2ca (patch) | |
tree | 378d5cdbbf2f4d21c1fc0dc5028f5e0c006b11fe /sql/ha_partition.cc | |
parent | a17a327f116302612a889af7c448ef1cd8243f28 (diff) | |
download | mariadb-git-f56dd0a12dc7d7c3020625e76a532ee77386b2ca.tar.gz |
MDEV-21693 ALGORITHM=INSTANT does not work for partitioned tables
- Flag ALTER_STORED_COLUMN_TYPE set while doing varchar extension
for partition table. Basically all partition supports
can_be_converted_by_engine() then it should be set to
ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE.
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index bcd419562b1..53bcd4df5c5 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2005, 2019, Oracle and/or its affiliates. - Copyright (c) 2009, 2019, MariaDB + Copyright (c) 2009, 2020, MariaDB 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 @@ -11799,6 +11799,40 @@ void ha_partition::clear_top_table_fields() DBUG_VOID_RETURN; } +bool +ha_partition::can_convert_string(const Field_string* field, + const Column_definition& new_type) const +{ + for (uint index= 0; index < m_tot_parts; index++) + { + if (!m_file[index]->can_convert_string(field, new_type)) + return false; + } + return true; +} + +bool +ha_partition::can_convert_varstring(const Field_varstring* field, + const Column_definition& new_type) const{ + for (uint index= 0; index < m_tot_parts; index++) + { + if (!m_file[index]->can_convert_varstring(field, new_type)) + return false; + } + return true; +} + +bool +ha_partition::can_convert_blob(const Field_blob* field, + const Column_definition& new_type) const +{ + for (uint index= 0; index < m_tot_parts; index++) + { + if (!m_file[index]->can_convert_blob(field, new_type)) + return false; + } + return true; +} struct st_mysql_storage_engine partition_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; |