MDEV-12472: InnoDB should accept XtraDB parameters, warning that they are ignored

Added a new file ha_xtradb.h where XtraDB parameters are defined. This
file is included in two places to avoid too intrusive change to
ha_innodb.cc that would make future merges harder.

innodb_show_locks_held and innodb_show_verbose_locks should be
implemented (but on different commit).
This commit is contained in:
Jan Lindström 2017-05-04 09:12:00 +03:00 committed by Oleksandr Byelkin
commit 6322913339
5 changed files with 1534 additions and 0 deletions

View file

@ -0,0 +1,313 @@
select @@innodb_adaptive_hash_index_partitions, @@innodb_adaptive_hash_index_parts;
@@innodb_adaptive_hash_index_partitions @@innodb_adaptive_hash_index_parts
16 16
set global innodb_adaptive_hash_index_partitions=1;
ERROR HY000: Variable 'innodb_adaptive_hash_index_partitions' is a read only variable
select @@innodb_buffer_pool_populate;
@@innodb_buffer_pool_populate
1
set global innodb_buffer_pool_populate=1;
ERROR HY000: Variable 'innodb_buffer_pool_populate' is a read only variable
select @@innodb_cleaner_eviction_factor;
@@innodb_cleaner_eviction_factor
1
set global innodb_cleaner_eviction_factor=1;
Warnings:
Warning 1287 Using innodb_cleaner_eviction_factor is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_eviction_factor;
@@innodb_cleaner_eviction_factor
1
select @@innodb_cleaner_flush_chunk_size;
@@innodb_cleaner_flush_chunk_size
16
set global innodb_cleaner_flush_chunk_size=8;
Warnings:
Warning 1287 Using innodb_cleaner_flush_chunk_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_flush_chunk_size;
@@innodb_cleaner_flush_chunk_size
16
select @@innodb_cleaner_free_list_lwm;
@@innodb_cleaner_free_list_lwm
1
set global innodb_cleaner_free_list_lwm=1;
Warnings:
Warning 1287 Using innodb_cleaner_free_list_lwm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_free_list_lwm;
@@innodb_cleaner_free_list_lwm
1
select @@innodb_cleaner_lru_chunk_size;
@@innodb_cleaner_lru_chunk_size
1
set global innodb_cleaner_lru_chunk_size=8;
Warnings:
Warning 1287 Using innodb_cleaner_lru_chunk_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_lru_chunk_size;
@@innodb_cleaner_lru_chunk_size
1
select @@innodb_cleaner_lsn_age_factor;
@@innodb_cleaner_lsn_age_factor
HIGH_CHECKPOINT
set global innodb_cleaner_lsn_age_factor=HIGH_CHECKPOINT;
Warnings:
Warning 1287 Using innodb_cleaner_lsn_age_factor is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_lsn_age_factor;
@@innodb_cleaner_lsn_age_factor
HIGH_CHECKPOINT
select @@innodb_cleaner_max_flush_time;
@@innodb_cleaner_max_flush_time
1
set global innodb_cleaner_max_flush_time=1;
Warnings:
Warning 1287 Using innodb_cleaner_max_flush_time is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_max_flush_time;
@@innodb_cleaner_max_flush_time
1
select @@innodb_cleaner_max_lru_time;
@@innodb_cleaner_max_lru_time
1
set global innodb_cleaner_max_lru_time=1;
Warnings:
Warning 1287 Using innodb_cleaner_max_lru_time is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_cleaner_max_lru_time;
@@innodb_cleaner_max_lru_time
1
select @@innodb_corrupt_table_action;
@@innodb_corrupt_table_action
salvage
set global innodb_corrupt_table_action=salvage;
Warnings:
Warning 1287 Using innodb_corrupt_table_action is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_corrupt_table_action;
@@innodb_corrupt_table_action
salvage
select @@innodb_empty_free_list_algorithm;
@@innodb_empty_free_list_algorithm
BACKOFF
set global innodb_empty_free_list_algorithm=BACKOFF;
Warnings:
Warning 1287 Using innodb_empty_free_list_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_empty_free_list_algorithm;
@@innodb_empty_free_list_algorithm
BACKOFF
select @@innodb_fake_changes;
@@innodb_fake_changes
1
set global innodb_fake_changes=1;
Warnings:
Warning 1287 Using innodb_fake_changes is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_fake_changes;
@@innodb_fake_changes
1
# @@innodb_file_io_threads is absent
select @@innodb_foreground_preflush;
@@innodb_foreground_preflush
EXPONENTIAL_BACKOFF
set global innodb_foreground_preflush=EXPONENTIAL_BACKOFF;
Warnings:
Warning 1287 Using innodb_foreground_preflush is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_foreground_preflush;
@@innodb_foreground_preflush
EXPONENTIAL_BACKOFF
select @@innodb_kill_idle_transaction;
@@innodb_kill_idle_transaction
1
set global innodb_kill_idle_transaction=1;
Warnings:
Warning 1287 Using innodb_kill_idle_transaction is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_kill_idle_transaction;
@@innodb_kill_idle_transaction
1
select @@innodb_locking_fake_changes;
@@innodb_locking_fake_changes
1
set global innodb_locking_fake_changes=1;
Warnings:
Warning 1287 Using innodb_locking_fake_changes is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_locking_fake_changes;
@@innodb_locking_fake_changes
1
select @@innodb_log_arch_expire_sec;
@@innodb_log_arch_expire_sec
1
set global innodb_log_arch_expire_sec=1;
Warnings:
Warning 1287 Using innodb_log_arch_expire_sec is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_log_arch_expire_sec;
@@innodb_log_arch_expire_sec
1
select @@innodb_log_block_size;
@@innodb_log_block_size
16
set global innodb_log_block_size= 8;
ERROR HY000: Variable 'innodb_log_block_size' is a read only variable
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
@@innodb_log_checksum_algorithm @@innodb_log_checksums
STRICT_INNODB 1
set global innodb_log_checksum_algorithm=NONE;
Warnings:
Warning 1287 Using innodb_log_checksum_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
@@innodb_log_checksum_algorithm @@innodb_log_checksums
NONE 0
set global innodb_log_checksum_algorithm=STRICT_INNODB;
Warnings:
Warning 1287 Using innodb_log_checksum_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
@@innodb_log_checksum_algorithm @@innodb_log_checksums
STRICT_INNODB 1
select @@innodb_max_bitmap_file_size;
@@innodb_max_bitmap_file_size
1
set global innodb_max_bitmap_file_size=1;
Warnings:
Warning 1287 Using innodb_max_bitmap_file_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_max_bitmap_file_size;
@@innodb_max_bitmap_file_size
1
select @@innodb_max_changed_pages;
@@innodb_max_changed_pages
1
set global innodb_max_changed_pages=1;
Warnings:
Warning 1287 Using innodb_max_changed_pages is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_max_changed_pages;
@@innodb_max_changed_pages
1
select @@innodb_mirrored_log_groups;
@@innodb_mirrored_log_groups
8
set global innodb_mirrored_log_groups= 4;
ERROR HY000: Variable 'innodb_mirrored_log_groups' is a read only variable
select @@innodb_priority_cleaner;
@@innodb_priority_cleaner
1
set global innodb_priority_cleaner=1;
Warnings:
Warning 1287 Using innodb_priority_cleaner is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_priority_cleaner;
@@innodb_priority_cleaner
1
select @@innodb_priority_io;
@@innodb_priority_io
1
set global innodb_priority_io=1;
Warnings:
Warning 1287 Using innodb_priority_io is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_priority_io;
@@innodb_priority_io
1
select @@innodb_priority_master;
@@innodb_priority_master
1
set global innodb_priority_master=1;
Warnings:
Warning 1287 Using innodb_priority_master is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_priority_master;
@@innodb_priority_master
1
select @@innodb_priority_purge;
@@innodb_priority_purge
1
set global innodb_priority_purge=1;
Warnings:
Warning 1287 Using innodb_priority_purge is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_priority_purge;
@@innodb_priority_purge
1
select @@innodb_sched_priority_cleaner;
@@innodb_sched_priority_cleaner
16
set global innodb_sched_priority_cleaner=8;
Warnings:
Warning 1287 Using innodb_sched_priority_cleaner is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_sched_priority_cleaner;
@@innodb_sched_priority_cleaner
16
select @@innodb_sched_priority_io;
@@innodb_sched_priority_io
16
set global innodb_sched_priority_io=8;
Warnings:
Warning 1287 Using innodb_sched_priority_io is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_sched_priority_io;
@@innodb_sched_priority_io
16
select @@innodb_sched_priority_master;
@@innodb_sched_priority_master
16
set global innodb_sched_priority_master=8;
Warnings:
Warning 1287 Using innodb_sched_priority_master is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_sched_priority_master;
@@innodb_sched_priority_master
16
select @@innodb_sched_priority_purge;
@@innodb_sched_priority_purge
16
set global innodb_sched_priority_purge=8;
Warnings:
Warning 1287 Using innodb_sched_priority_purge is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_sched_priority_purge;
@@innodb_sched_priority_purge
16
select @@innodb_show_locks_held;
@@innodb_show_locks_held
16
set global innodb_show_locks_held=8;
Warnings:
Warning 1287 Using innodb_show_locks_held is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_show_locks_held;
@@innodb_show_locks_held
16
select @@innodb_show_verbose_locks;
@@innodb_show_verbose_locks
1
set global innodb_show_verbose_locks=1;
Warnings:
Warning 1287 Using innodb_show_verbose_locks is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_show_verbose_locks;
@@innodb_show_verbose_locks
1
select @@innodb_track_changed_pages;
@@innodb_track_changed_pages
1
set global innodb_track_changed_pages=1;
ERROR HY000: Variable 'innodb_track_changed_pages' is a read only variable
select @@innodb_track_redo_log_now;
@@innodb_track_redo_log_now
1
set global innodb_track_redo_log_now=1;
Warnings:
Warning 1287 Using innodb_track_redo_log_now is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_track_redo_log_now;
@@innodb_track_redo_log_now
1
select @@innodb_use_global_flush_log_at_trx_commit;
@@innodb_use_global_flush_log_at_trx_commit
1
set global innodb_use_global_flush_log_at_trx_commit=1;
Warnings:
Warning 1287 Using innodb_use_global_flush_log_at_trx_commit is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_use_global_flush_log_at_trx_commit;
@@innodb_use_global_flush_log_at_trx_commit
1
select @@innodb_use_stacktrace;
@@innodb_use_stacktrace
1
set global innodb_use_stacktrace=1;
ERROR HY000: Variable 'innodb_use_stacktrace' is a read only variable
select @@innodb_log_archive;
@@innodb_log_archive
1
set global innodb_log_archive=1;
Warnings:
Warning 1287 Using innodb_log_archive is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
select @@innodb_log_archive;
@@innodb_log_archive
1
select @@innodb_log_arch_dir;
@@innodb_log_arch_dir
ttt
set global innodb_log_arch_dir="ttt";
ERROR HY000: Variable 'innodb_log_arch_dir' is a read only variable
FOUND 36 /Using [A-Za-z\-]* is deprecated and the parameter may be removed in future releases. Ignoning the parameter./ in mysqld.1.err

View file

@ -0,0 +1,38 @@
--innodb-adaptive-hash-index-partitions=16
--innodb-buffer-pool-populate=1
--innodb-cleaner-eviction-factor
--innodb-cleaner-flush-chunk-size=16
--innodb-cleaner_free_list_lwm=1
--innodb-cleaner-lru-chunk-size=1
--innodb-cleaner-lsn-age-factor=HIGH_CHECKPOINT
--innodb-cleaner-max-flush-time=1
--innodb-cleaner-max-lru-time=1
--innodb-corrupt-table-action=salvage
--innodb-empty-free-list-algorithm=BACKOFF
--innodb-fake-changes
--innodb-file-io-threads=16
--innodb-foreground-preflush=EXPONENTIAL_BACKOFF
--innodb-kill-idle-transaction=1
--innodb-locking-fake-changes
--innodb-log-arch-expire-sec=1
--innodb-log-arch-dir='ttt'
--innodb-log-archive
--innodb-log-block-size=16
--innodb-log_checksum_algorithm=STRICT_INNODB
--innodb-max-bitmap-file-size=1
--innodb-max-changed-pages=1
--innodb-mirrored-log-groups=8
--innodb-priority-cleaner
--innodb-priority-io
--innodb-priority-master
--innodb-priority-purge
--innodb-sched-priority-cleaner=16
--innodb-sched-priority-io=16
--innodb-sched-priority-master=16
--innodb-sched-priority-purge=16
--innodb-show-locks-held=16
--innodb-show-verbose-locks=1
--innodb-track-changed-pages
--innodb-track-redo-log-now
--innodb-use-global-flush-log-at-trx-commit
--innodb-use-stacktrace

View file

@ -0,0 +1,159 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
select @@innodb_adaptive_hash_index_partitions, @@innodb_adaptive_hash_index_parts;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_adaptive_hash_index_partitions=1;
select @@innodb_buffer_pool_populate;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_buffer_pool_populate=1;
select @@innodb_cleaner_eviction_factor;
set global innodb_cleaner_eviction_factor=1;
select @@innodb_cleaner_eviction_factor;
select @@innodb_cleaner_flush_chunk_size;
set global innodb_cleaner_flush_chunk_size=8;
select @@innodb_cleaner_flush_chunk_size;
select @@innodb_cleaner_free_list_lwm;
set global innodb_cleaner_free_list_lwm=1;
select @@innodb_cleaner_free_list_lwm;
select @@innodb_cleaner_lru_chunk_size;
set global innodb_cleaner_lru_chunk_size=8;
select @@innodb_cleaner_lru_chunk_size;
select @@innodb_cleaner_lsn_age_factor;
set global innodb_cleaner_lsn_age_factor=HIGH_CHECKPOINT;
select @@innodb_cleaner_lsn_age_factor;
select @@innodb_cleaner_max_flush_time;
set global innodb_cleaner_max_flush_time=1;
select @@innodb_cleaner_max_flush_time;
select @@innodb_cleaner_max_lru_time;
set global innodb_cleaner_max_lru_time=1;
select @@innodb_cleaner_max_lru_time;
select @@innodb_corrupt_table_action;
set global innodb_corrupt_table_action=salvage;
select @@innodb_corrupt_table_action;
select @@innodb_empty_free_list_algorithm;
set global innodb_empty_free_list_algorithm=BACKOFF;
select @@innodb_empty_free_list_algorithm;
select @@innodb_fake_changes;
set global innodb_fake_changes=1;
select @@innodb_fake_changes;
--echo # @@innodb_file_io_threads is absent
select @@innodb_foreground_preflush;
set global innodb_foreground_preflush=EXPONENTIAL_BACKOFF;
select @@innodb_foreground_preflush;
select @@innodb_kill_idle_transaction;
set global innodb_kill_idle_transaction=1;
select @@innodb_kill_idle_transaction;
select @@innodb_locking_fake_changes;
set global innodb_locking_fake_changes=1;
select @@innodb_locking_fake_changes;
select @@innodb_log_arch_expire_sec;
set global innodb_log_arch_expire_sec=1;
select @@innodb_log_arch_expire_sec;
select @@innodb_log_block_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_log_block_size= 8;
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
set global innodb_log_checksum_algorithm=NONE;
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
set global innodb_log_checksum_algorithm=STRICT_INNODB;
select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
select @@innodb_max_bitmap_file_size;
set global innodb_max_bitmap_file_size=1;
select @@innodb_max_bitmap_file_size;
select @@innodb_max_changed_pages;
set global innodb_max_changed_pages=1;
select @@innodb_max_changed_pages;
select @@innodb_mirrored_log_groups;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_mirrored_log_groups= 4;
select @@innodb_priority_cleaner;
set global innodb_priority_cleaner=1;
select @@innodb_priority_cleaner;
select @@innodb_priority_io;
set global innodb_priority_io=1;
select @@innodb_priority_io;
select @@innodb_priority_master;
set global innodb_priority_master=1;
select @@innodb_priority_master;
select @@innodb_priority_purge;
set global innodb_priority_purge=1;
select @@innodb_priority_purge;
select @@innodb_sched_priority_cleaner;
set global innodb_sched_priority_cleaner=8;
select @@innodb_sched_priority_cleaner;
select @@innodb_sched_priority_io;
set global innodb_sched_priority_io=8;
select @@innodb_sched_priority_io;
select @@innodb_sched_priority_master;
set global innodb_sched_priority_master=8;
select @@innodb_sched_priority_master;
select @@innodb_sched_priority_purge;
set global innodb_sched_priority_purge=8;
select @@innodb_sched_priority_purge;
select @@innodb_show_locks_held;
set global innodb_show_locks_held=8;
select @@innodb_show_locks_held;
select @@innodb_show_verbose_locks;
set global innodb_show_verbose_locks=1;
select @@innodb_show_verbose_locks;
select @@innodb_track_changed_pages;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_track_changed_pages=1;
select @@innodb_track_redo_log_now;
set global innodb_track_redo_log_now=1;
select @@innodb_track_redo_log_now;
select @@innodb_use_global_flush_log_at_trx_commit;
set global innodb_use_global_flush_log_at_trx_commit=1;
select @@innodb_use_global_flush_log_at_trx_commit;
select @@innodb_use_stacktrace;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_use_stacktrace=1;
select @@innodb_log_archive;
set global innodb_log_archive=1;
select @@innodb_log_archive;
select @@innodb_log_arch_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_log_arch_dir="ttt";
--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let SEARCH_PATTERN=Using [A-Za-z\\-]* is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
--source include/search_pattern_in_file.inc

View file

@ -133,6 +133,12 @@ void reset_thd(MYSQL_THD thd);
TABLE *open_purge_table(THD *thd, const char *db, size_t dblen,
const char *tb, size_t tblen);
/** Check if user has used xtradb extended system variable that
is not currently supported by innodb or marked as deprecated. */
static
void
innodb_check_deprecated(void);
#ifdef MYSQL_DYNAMIC_PLUGIN
#define tc_size 400
#define tdc_size 400
@ -4046,6 +4052,8 @@ innobase_init(
goto error;
}
innodb_check_deprecated();
/* First calculate the default path for innodb_data_home_dir etc.,
in case the user has not given any value.
@ -21885,6 +21893,8 @@ static MYSQL_SYSVAR_BOOL(instrument_semaphores, innodb_instrument_semaphores,
"DEPRECATED. This setting has no effect.",
NULL, innodb_instrument_semaphores_update, FALSE);
#include "ha_xtradb.h"
static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(autoextend_increment),
MYSQL_SYSVAR(buffer_pool_size),
@ -22097,6 +22107,11 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(instrument_semaphores),
MYSQL_SYSVAR(buf_dump_status_frequency),
MYSQL_SYSVAR(background_thread),
/* XtraDB compatibility system variables */
#define HA_XTRADB_SYSVARS
#include "ha_xtradb.h"
NULL
};

File diff suppressed because it is too large Load diff