mirror of
https://github.com/MariaDB/server.git
synced 2025-05-08 15:01:49 +03:00
- Added tests for innodb and semisync plugin - Modified existing tests to include variable values in I_S tables - Updated the all_vars test to include optional checkes for INNODB and semisync plugin if loaded mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_file_format_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_io_capacity_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_read_io_threads_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result: Updated result file mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_version_basic.result: New result file mysql-test/suite/sys_vars/r/innodb_write_io_threads_basic.result: New result file mysql-test/suite/sys_vars/r/last_insert_id_basic.result: Updated result file mysql-test/suite/sys_vars/r/lc_messages_basic.result: Updated result file mysql-test/suite/sys_vars/r/log_slow_queries_basic.result: Updated result file mysql-test/suite/sys_vars/r/lower_case_file_system_basic.result: Updated result file mysql-test/suite/sys_vars/r/lower_case_table_names_basic.result: Updated result file mysql-test/suite/sys_vars/r/max_join_size_basic.result: Updated result file mysql-test/suite/sys_vars/r/old_alter_table_basic.result: Updated result file mysql-test/suite/sys_vars/r/optimizer_switch_basic.result: Updated result file mysql-test/suite/sys_vars/r/profiling_basic.result: Updated result file mysql-test/suite/sys_vars/r/profiling_history_size_basic.result: Updated result file mysql-test/suite/sys_vars/r/pseudo_thread_id_basic.result: Updated result file mysql-test/suite/sys_vars/r/rand_seed1_basic.result: Updated result file mysql-test/suite/sys_vars/r/rand_seed2_basic.result: Updated result file mysql-test/suite/sys_vars/r/relay_log_recovery_basic.result: Updated result file mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result: New result file mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_basic.result: New result file mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_basic.result: New result file mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_basic.result: New result file mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result: New result file mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_basic.result: New result file mysql-test/suite/sys_vars/r/sql_log_update_basic.result: Added check for variable values in I_S tables mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result: Added check for variable values in I_S tables mysql-test/suite/sys_vars/r/sql_select_limit_basic.result: Added check for variable values in I_S tables mysql-test/suite/sys_vars/r/thread_cache_size_basic.result: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/all_vars-master.opt: Added opt file for all_vars.test mysql-test/suite/sys_vars/t/all_vars.test: Modified test to check for semisync plugin and innodb mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_file_format_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_version_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test: Added test for innodb variable mysql-test/suite/sys_vars/t/last_insert_id_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/lc_messages_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/log_slow_queries_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/lower_case_file_system_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/lower_case_table_names_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/max_join_size_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/old_alter_table_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/optimizer_switch_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/profiling_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/profiling_history_size_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/pseudo_thread_id_basic.test: Added check for variable values in I_S tables and check for session variable being numeric mysql-test/suite/sys_vars/t/rand_seed1_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/rand_seed2_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/relay_log_recovery_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic-master.opt: Added option file for semisync variable test mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_basic.test: Added test file for semisync variable mysql-test/suite/sys_vars/t/sql_log_update_basic.test: Added check for variable values in I_S tables and check for ON/OFF value changes mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/sql_select_limit_basic.test: Added check for variable values in I_S tables mysql-test/suite/sys_vars/t/thread_cache_size_basic.test: Added check for variable values in I_S tables
187 lines
8.2 KiB
Plaintext
187 lines
8.2 KiB
Plaintext
##################### mysql-test\t\slow_query_log_basic.test ###################
|
|
# #
|
|
# Variable Name: log_slow_queries #
|
|
# Scope: GLOBAL #
|
|
# Access Type: Dynamic #
|
|
# Data Type: BOOLEAN #
|
|
# Default Value: OFF #
|
|
# Valid Values: ON, OFF #
|
|
# #
|
|
# #
|
|
# Creation Date: 2008-03-16 #
|
|
# Author: Salman Rawala #
|
|
# #
|
|
# Description: Test Cases of Dynamic System Variable "log_slow_queries" #
|
|
# that checks behavior of this variable in the following ways #
|
|
# * Default Value #
|
|
# * Valid & Invalid values #
|
|
# * Scope & Access method #
|
|
# * Data Integrity #
|
|
# #
|
|
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
|
# server-options.html#option_mysqld_event-scheduler #
|
|
# #
|
|
# #
|
|
# 2010-01-20 OBN - Added check for variable value matching I_S tables after #
|
|
# variable value change #
|
|
# #
|
|
################################################################################
|
|
|
|
--source include/load_sysvars.inc
|
|
|
|
###########################################################
|
|
# START OF log_slow_queries TESTS #
|
|
###########################################################
|
|
|
|
|
|
######################################################################
|
|
# Saving initial value of log_slow_queries in a temporary variable #
|
|
######################################################################
|
|
|
|
SET @start_value = @@global.log_slow_queries;
|
|
SELECT @start_value;
|
|
|
|
|
|
--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
|
|
###############################################
|
|
# Verify default value of variable #
|
|
###############################################
|
|
|
|
SET @@global.log_slow_queries = DEFAULT;
|
|
SELECT @@global.log_slow_queries = 0;
|
|
|
|
|
|
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
|
|
######################################################################
|
|
# Change the value of log_slow_queries to a valid value #
|
|
######################################################################
|
|
|
|
SET @@global.log_slow_queries = ON;
|
|
SELECT @@global.log_slow_queries;
|
|
SET @@global.log_slow_queries = OFF;
|
|
SELECT @@global.log_slow_queries;
|
|
|
|
--echo '#--------------------FN_DYNVARS_004_03-------------------------#'
|
|
######################################################################
|
|
# Change the value of log_slow_queries to invalid value #
|
|
######################################################################
|
|
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = 2;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = -1;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = TRUEF;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = TRUE_F;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = FALSE0;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = OON;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = ONN;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = OOFF;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = 0FF;
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = ' ';
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = " ";
|
|
--Error ER_WRONG_VALUE_FOR_VAR
|
|
SET @@global.log_slow_queries = '';
|
|
|
|
|
|
--echo '#-------------------FN_DYNVARS_004_04----------------------------#'
|
|
##################################################################
|
|
# Test if accessing session log_slow_queries gives error #
|
|
##################################################################
|
|
|
|
--Error ER_GLOBAL_VARIABLE
|
|
SET @@session.log_slow_queries = OFF;
|
|
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
SELECT @@session.log_slow_queries;
|
|
|
|
|
|
--echo '#----------------------FN_DYNVARS_004_05------------------------#'
|
|
##############################################################################
|
|
# Check if the value in GLOBAL Tables matches values in variable #
|
|
##############################################################################
|
|
|
|
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log_slow_queries';
|
|
|
|
|
|
--echo '#---------------------FN_DYNVARS_004_06----------------------#'
|
|
################################################################
|
|
# Check if 0 and 1 values can be used on variable #
|
|
################################################################
|
|
|
|
SET @@global.log_slow_queries = 0;
|
|
SELECT @@global.log_slow_queries;
|
|
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log_slow_queries';
|
|
SET @@global.log_slow_queries = 1;
|
|
SELECT @@global.log_slow_queries;
|
|
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log_slow_queries';
|
|
|
|
--echo '#---------------------FN_DYNVARS_004_07----------------------#'
|
|
###################################################################
|
|
# Check if TRUE and FALSE values can be used on variable #
|
|
###################################################################
|
|
|
|
SET @@global.log_slow_queries = TRUE;
|
|
SELECT @@global.log_slow_queries;
|
|
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log_slow_queries';
|
|
SET @@global.log_slow_queries = FALSE;
|
|
SELECT @@global.log_slow_queries;
|
|
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log_slow_queries';
|
|
|
|
--echo '#---------------------FN_DYNVARS_004_08----------------------#'
|
|
##############################################################################
|
|
# Check if accessing variable with SESSION,LOCAL and without SCOPE points #
|
|
# to same session variable #
|
|
##############################################################################
|
|
|
|
SET @@global.log_slow_queries = ON;
|
|
SELECT @@log_slow_queries = @@global.log_slow_queries;
|
|
|
|
--echo '#---------------------FN_DYNVARS_004_09----------------------#'
|
|
######################################################################
|
|
# Check if log_slow_queries can be accessed with and without @@ sign #
|
|
######################################################################
|
|
--Error ER_GLOBAL_VARIABLE
|
|
SET log_slow_queries = ON;
|
|
--Error ER_PARSE_ERROR
|
|
SET local.log_slow_queries = OFF;
|
|
--Error ER_UNKNOWN_TABLE
|
|
SELECT local.log_slow_queries;
|
|
--Error ER_PARSE_ERROR
|
|
SET global.log_slow_queries = ON;
|
|
--Error ER_UNKNOWN_TABLE
|
|
SELECT global.log_slow_queries;
|
|
--Error ER_BAD_FIELD_ERROR
|
|
SELECT log_slow_queries = @@session.log_slow_queries;
|
|
|
|
|
|
|
|
##############################
|
|
# Restore initial value #
|
|
##############################
|
|
|
|
SET @@global.log_slow_queries = @start_value;
|
|
SELECT @@global.log_slow_queries;
|
|
|
|
|
|
####################################################
|
|
# END OF log_slow_queries TESTS #
|
|
####################################################
|