mirror of
https://github.com/MariaDB/server.git
synced 2025-05-31 08:42:45 +03:00
The table option page_compression_level is something that only affects future writes, not actually the data format. Therefore, we can allow instant changes of this option. Similarly, the table option page_compressed can be set on a previously uncompressed table without rebuilding the table, because an uncompressed page would be considered valid when reading a page_compressed table. Removing the page_compressed option will continue to require the table to be rebuilt. ha_innobase_inplace_ctx::page_compression_level: The requested page_compression_level at the start of ALTER TABLE, or 0 if page_compressed=OFF. alter_options_need_rebuild(): Renamed from create_option_need_rebuild(). Allow page_compression_level and page_compressed to be changed as above, without rebuilding the table. ha_innobase::check_if_supported_inplace_alter(): Allow ALGORITHM=INSTANT for ALTER_OPTIONS if the table is not to be rebuilt. If rebuild is needed, set ha_alter_info->unsupported_reason. innobase_page_compression_try(): Update SYS_TABLES.TYPE according to the table flags, for an instant change of page_compression_level or page_compressed. commit_cache_norebuild(): Adjust dict_table_t::flags, fil_space_t::flags and (if needed) FSP_SPACE_FLAGS if page_compression_level was specified.
23 lines
577 B
Plaintext
23 lines
577 B
Plaintext
--source include/have_innodb.inc
|
|
let $algorithm = `SELECT @@ALTER_ALGORITHM`;
|
|
let $error_code = 0;
|
|
|
|
if ($algorithm == "NOCOPY") {
|
|
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED, ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
|
|
}
|
|
|
|
if ($algorithm == "INSTANT") {
|
|
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED, ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
|
|
}
|
|
|
|
--source include/alter_nocopy_fail.inc
|
|
|
|
if ($algorithm == "NOCOPY") {
|
|
let $error_code = 0;
|
|
}
|
|
|
|
if ($algorithm == "INSTANT") {
|
|
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
|
|
}
|
|
--source include/alter_nocopy.inc
|