polardbxengine/mysql-test/r/read_only_persisted_plugin_...

335 lines
13 KiB
Plaintext

#
# WL#9787: Allow SET PERSIST to set read-only variables too
# Extended Test case to cover all the static server variables including
# plugin variables.
#
# Check there are no existing persistent variables
# Must return 0 rows.
SELECT * FROM performance_schema.persisted_variables;
VARIABLE_NAME VARIABLE_VALUE
SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'PERSISTED';
VARIABLE_NAME
call mtr.add_suppression("option 'thread_stack':");
# Filtering out the warning as open_files_limit value is calculated at runtime
CALL mtr.add_suppression("Could not increase number of max_open_files to more than *");
# Allow SET PERSIST to set all the read only variables excluding plugin
# variables.
#
set @@persist_only.back_log=80;
set @@persist_only.binlog_gtid_simple_recovery=1;
set @@persist_only.disabled_storage_engines='';
set @@persist_only.ft_max_word_len=84;
set @@persist_only.ft_min_word_len=4;
set @@persist_only.ft_query_expansion_limit=20;
set @@persist_only.innodb_adaptive_hash_index_parts=8;
set @@persist_only.innodb_api_disable_rowlock=0;
set @@persist_only.innodb_api_enable_binlog=0;
set @@persist_only.innodb_api_enable_mdl=0;
set @@persist_only.innodb_autoinc_lock_mode=1;
set @@persist_only.innodb_buffer_pool_chunk_size=134217728;
set @@persist_only.innodb_buffer_pool_instances=1;
set @@persist_only.innodb_doublewrite=1;
set @@persist_only.innodb_force_recovery=0;
set @@persist_only.innodb_ft_cache_size=16777216;
set @@persist_only.innodb_ft_max_token_size=84;
set @@persist_only.innodb_ft_min_token_size=4;
set @@persist_only.innodb_ft_sort_pll_degree=2;
set @@persist_only.innodb_ft_total_cache_size=640000000;
set @@persist_only.innodb_log_buffer_size=16777216;
set @@persist_only.innodb_log_file_size=50331648;
set @@persist_only.innodb_log_files_in_group=2;
set @@persist_only.innodb_open_files=1;
set @@persist_only.innodb_page_cleaners=1;
set @@persist_only.innodb_purge_threads=4;
set @@persist_only.innodb_read_io_threads=4;
set @@persist_only.innodb_rollback_on_timeout=0;
set @@persist_only.innodb_sort_buffer_size=1048576;
set @@persist_only.innodb_sync_array_size=1;
set @@persist_only.innodb_use_native_aio=1;
set @@persist_only.innodb_write_io_threads=4;
set @@persist_only.log_slave_updates=0;
set @@persist_only.max_digest_length=1024;
set @@persist_only.myisam_recover_options='OFF';
set @@persist_only.ngram_token_size=2;
set @@persist_only.old=0;
set @@persist_only.open_files_limit=5000;
set @@persist_only.performance_schema=1;
set @@persist_only.performance_schema_accounts_size=-1;
set @@persist_only.performance_schema_digests_size=10000;
set @@persist_only.performance_schema_error_size=1986;
set @@persist_only.performance_schema_events_stages_history_long_size=10000;
set @@persist_only.performance_schema_events_stages_history_size=10;
set @@persist_only.performance_schema_events_statements_history_long_size=10000;
set @@persist_only.performance_schema_events_statements_history_size=10;
set @@persist_only.performance_schema_events_transactions_history_long_size=10000;
set @@persist_only.performance_schema_events_transactions_history_size=10;
set @@persist_only.performance_schema_events_waits_history_long_size=10000;
set @@persist_only.performance_schema_events_waits_history_size=10;
set @@persist_only.performance_schema_hosts_size=-1;
set @@persist_only.performance_schema_max_cond_classes=80;
set @@persist_only.performance_schema_max_cond_instances=-1;
set @@persist_only.performance_schema_max_digest_length=1024;
set @@persist_only.performance_schema_max_file_classes=80;
set @@persist_only.performance_schema_max_file_handles=32768;
set @@persist_only.performance_schema_max_file_instances=-1;
set @@persist_only.performance_schema_max_index_stat=-1;
set @@persist_only.performance_schema_max_memory_classes=460;
set @@persist_only.performance_schema_max_metadata_locks=-1;
set @@persist_only.performance_schema_max_mutex_classes=220;
set @@persist_only.performance_schema_max_mutex_instances=-1;
set @@persist_only.performance_schema_max_prepared_statements_instances=-1;
set @@persist_only.performance_schema_max_program_instances=-1;
set @@persist_only.performance_schema_max_rwlock_classes=50;
set @@persist_only.performance_schema_max_rwlock_instances=-1;
set @@persist_only.performance_schema_max_socket_classes=10;
set @@persist_only.performance_schema_max_socket_instances=-1;
set @@persist_only.performance_schema_max_sql_text_length=1024;
set @@persist_only.performance_schema_max_stage_classes=250;
set @@persist_only.performance_schema_max_statement_classes=202;
set @@persist_only.performance_schema_max_statement_stack=10;
set @@persist_only.performance_schema_max_table_handles=-1;
set @@persist_only.performance_schema_max_table_instances=-1;
set @@persist_only.performance_schema_max_table_lock_stat=-1;
set @@persist_only.performance_schema_max_thread_classes=50;
set @@persist_only.performance_schema_max_thread_instances=-1;
set @@persist_only.performance_schema_session_connect_attrs_size=512;
set @@persist_only.performance_schema_setup_actors_size=-1;
set @@persist_only.performance_schema_setup_objects_size=-1;
set @@persist_only.performance_schema_users_size=-1;
set @@persist_only.relay_log_recovery=0;
set @@persist_only.relay_log_space_limit=0;
set @@persist_only.skip_name_resolve=0;
set @@persist_only.skip_show_database=0;
set @@persist_only.slave_type_conversions='';
set @@persist_only.table_open_cache_instances=16;
set @@persist_only.thread_handling='one-thread-per-connection';
set @@persist_only.thread_stack=286720;
set @@persist_only.tls_version='TLSv1,TLSv1.1';
set @@persist_only.report_host=NULL;
set @@persist_only.report_port=21000;
set @@persist_only.report_password=NULL;
set @@persist_only.report_user=NULL;
# Must return 100 rows.
SELECT count(*) from performance_schema.persisted_variables;
count(*)
94
# Restart server
CALL mtr.add_suppression("Plugin audit_log reported *");
# Both queries must return 101 rows.
SELECT * FROM performance_schema.persisted_variables;
VARIABLE_NAME VARIABLE_VALUE
innodb_log_buffer_size 16777216
slave_type_conversions
back_log 80
binlog_gtid_simple_recovery 1
disabled_storage_engines
ft_max_word_len 84
ft_min_word_len 4
ft_query_expansion_limit 20
innodb_adaptive_hash_index_parts 8
innodb_api_disable_rowlock 0
innodb_api_enable_binlog 0
innodb_api_enable_mdl 0
innodb_autoinc_lock_mode 1
innodb_buffer_pool_chunk_size 134217728
innodb_buffer_pool_instances 1
innodb_doublewrite 1
innodb_force_recovery 0
innodb_ft_cache_size 16777216
innodb_ft_max_token_size 84
innodb_ft_min_token_size 4
innodb_ft_sort_pll_degree 2
innodb_ft_total_cache_size 640000000
innodb_log_file_size 50331648
innodb_log_files_in_group 2
innodb_open_files 1
innodb_page_cleaners 1
innodb_purge_threads 4
innodb_read_io_threads 4
innodb_rollback_on_timeout 0
innodb_sort_buffer_size 1048576
innodb_sync_array_size 1
innodb_use_native_aio 1
innodb_write_io_threads 4
log_slave_updates 0
max_digest_length 1024
myisam_recover_options OFF
ngram_token_size 2
old 0
open_files_limit 5000
performance_schema 1
performance_schema_accounts_size -1
performance_schema_digests_size 10000
performance_schema_error_size 1986
performance_schema_events_stages_history_long_size 10000
performance_schema_events_stages_history_size 10
performance_schema_events_statements_history_long_size 10000
performance_schema_events_statements_history_size 10
performance_schema_events_transactions_history_long_size 10000
performance_schema_events_transactions_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size -1
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances -1
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
performance_schema_max_file_instances -1
performance_schema_max_index_stat -1
performance_schema_max_memory_classes 460
performance_schema_max_metadata_locks -1
performance_schema_max_mutex_classes 220
performance_schema_max_mutex_instances -1
performance_schema_max_prepared_statements_instances -1
performance_schema_max_program_instances -1
performance_schema_max_rwlock_classes 50
performance_schema_max_rwlock_instances -1
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances -1
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 250
performance_schema_max_statement_classes 202
performance_schema_max_statement_stack 10
performance_schema_max_table_handles -1
performance_schema_max_table_instances -1
performance_schema_max_table_lock_stat -1
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 512
performance_schema_setup_actors_size -1
performance_schema_setup_objects_size -1
performance_schema_users_size -1
relay_log_recovery 0
relay_log_space_limit 0
report_host
report_password
report_port 21000
report_user
skip_name_resolve 0
skip_show_database 0
table_open_cache_instances 16
thread_handling one-thread-per-connection
thread_stack 286720
tls_version TLSv1,TLSv1.1
SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'PERSISTED';
VARIABLE_NAME
back_log
binlog_gtid_simple_recovery
disabled_storage_engines
ft_max_word_len
ft_min_word_len
ft_query_expansion_limit
innodb_adaptive_hash_index_parts
innodb_api_disable_rowlock
innodb_api_enable_binlog
innodb_api_enable_mdl
innodb_autoinc_lock_mode
innodb_buffer_pool_chunk_size
innodb_buffer_pool_instances
innodb_doublewrite
innodb_force_recovery
innodb_ft_cache_size
innodb_ft_max_token_size
innodb_ft_min_token_size
innodb_ft_sort_pll_degree
innodb_ft_total_cache_size
innodb_log_buffer_size
innodb_log_file_size
innodb_log_files_in_group
innodb_open_files
innodb_page_cleaners
innodb_purge_threads
innodb_read_io_threads
innodb_rollback_on_timeout
innodb_sort_buffer_size
innodb_sync_array_size
innodb_use_native_aio
innodb_write_io_threads
log_slave_updates
max_digest_length
myisam_recover_options
ngram_token_size
old
open_files_limit
performance_schema
performance_schema_accounts_size
performance_schema_digests_size
performance_schema_error_size
performance_schema_events_stages_history_long_size
performance_schema_events_stages_history_size
performance_schema_events_statements_history_long_size
performance_schema_events_statements_history_size
performance_schema_events_transactions_history_long_size
performance_schema_events_transactions_history_size
performance_schema_events_waits_history_long_size
performance_schema_events_waits_history_size
performance_schema_hosts_size
performance_schema_max_cond_classes
performance_schema_max_cond_instances
performance_schema_max_digest_length
performance_schema_max_file_classes
performance_schema_max_file_handles
performance_schema_max_file_instances
performance_schema_max_index_stat
performance_schema_max_memory_classes
performance_schema_max_metadata_locks
performance_schema_max_mutex_classes
performance_schema_max_mutex_instances
performance_schema_max_prepared_statements_instances
performance_schema_max_program_instances
performance_schema_max_rwlock_classes
performance_schema_max_rwlock_instances
performance_schema_max_socket_classes
performance_schema_max_socket_instances
performance_schema_max_sql_text_length
performance_schema_max_stage_classes
performance_schema_max_statement_classes
performance_schema_max_statement_stack
performance_schema_max_table_handles
performance_schema_max_table_instances
performance_schema_max_table_lock_stat
performance_schema_max_thread_classes
performance_schema_max_thread_instances
performance_schema_session_connect_attrs_size
performance_schema_setup_actors_size
performance_schema_setup_objects_size
performance_schema_users_size
relay_log_recovery
relay_log_space_limit
report_host
report_password
report_port
report_user
skip_name_resolve
skip_show_database
slave_type_conversions
table_open_cache_instances
thread_handling
thread_stack
tls_version
RESET PERSIST;
# Restart server
# Install version token plugin
##################
INSTALL PLUGIN version_tokens SONAME 'version_token.so';
SELECT @@version_tokens_session_number;
@@version_tokens_session_number
0
SET @@persist_only.version_tokens_session_number=3;
ERROR HY000: Variable 'version_tokens_session_number' is a non persistent read only variable
# return 0 row
SELECT * FROM performance_schema.persisted_variables;
VARIABLE_NAME VARIABLE_VALUE
# Restart server
# return 0 row
SELECT * FROM performance_schema.persisted_variables;
VARIABLE_NAME VARIABLE_VALUE
SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'PERSISTED';
VARIABLE_NAME
UNINSTALL PLUGIN version_tokens;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
RESET PERSIST;
# Restart server