mirror of
https://github.com/MariaDB/server.git
synced 2025-05-25 13:42:52 +03:00
Clarified error messages related to unsafe statements: - avoid the internal technical term "row injection" - use 'binary log' instead of 'binlog' - avoid the word 'unsafeness' mysql-test/extra/binlog_tests/blackhole.test: updated suppression pattern mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_insert_id.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_loaddata.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_mixing_engines.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_start_stop_slave.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_stm_000001.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_stop_middle_group.test: updated suppression pattern mysql-test/r/archive.result: updated result file mysql-test/r/commit_1innodb.result: updated result file mysql-test/r/ctype_cp932_binlog_stm.result: updated result file mysql-test/r/partition_innodb_stmt.result: updated result file mysql-test/suite/binlog/r/binlog_innodb.result: updated result file mysql-test/suite/binlog/r/binlog_killed.result: updated result file mysql-test/suite/binlog/r/binlog_multi_engine.result: updated result file mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: updated result file mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: updated result file mysql-test/suite/binlog/r/binlog_stm_blackhole.result: updated result file mysql-test/suite/binlog/r/binlog_stm_do_db.result: updated result file mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: updated result file mysql-test/suite/binlog/r/binlog_stm_ps.result: updated result file mysql-test/suite/binlog/r/binlog_stm_row.result: updated result file mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result: updated result file mysql-test/suite/binlog/r/binlog_unsafe.result: updated result file mysql-test/suite/binlog/t/binlog_killed.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_multi_engine.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_ps.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_row.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_tmp_table.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_unsafe.test: updated suppression pattern mysql-test/suite/ndb/r/ndb_binlog_format.result: updated result file mysql-test/suite/ndb/t/ndb_binlog_format.test: updated suppression pattern mysql-test/suite/perfschema/r/binlog_stmt.result: updated result file mysql-test/suite/perfschema/t/binlog_stmt.test: updated suppression pattern mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result: updated result file mysql-test/suite/rpl/r/rpl_blackhole.result: updated result file mysql-test/suite/rpl/r/rpl_concurrency_error.result: updated result file mysql-test/suite/rpl/r/rpl_get_lock.result: updated result file mysql-test/suite/rpl/r/rpl_insert_id.result: updated result file mysql-test/suite/rpl/r/rpl_insert_ignore.result: updated result file mysql-test/suite/rpl/r/rpl_misc_functions.result: updated result file mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_mysql_upgrade.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result: updated result file mysql-test/suite/rpl/r/rpl_read_only.result: updated result file mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: updated result file mysql-test/suite/rpl/r/rpl_row_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_slow_query_log.result: updated result file mysql-test/suite/rpl/r/rpl_sp.result: updated result file mysql-test/suite/rpl/r/rpl_stm_000001.result: updated result file mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result: updated result file mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_stm_loadfile.result: updated result file mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result: updated result file mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result: updated result file mysql-test/suite/rpl/r/rpl_temp_temporary.result: updated result file mysql-test/suite/rpl/r/rpl_variables_stm.result: updated result file mysql-test/suite/rpl/t/rpl000013.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_blackhole.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_concurrency_error.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_get_lock.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert_id.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert_ignore.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_invoked_features.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_misc_functions.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_mysql_upgrade.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_optimize.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_read_only.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_semi_sync.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_semi_sync_event.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_session_var.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_slow_query_log.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_sp.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_found_rows.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_loadfile.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temp_table.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temp_temporary.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temporary.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_timezone.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_trigger.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_udf.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_user_variables.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_variables_stm.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_view_multi.test: updated suppression pattern mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result: updated result file mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test: updated suppression pattern mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: updated suppression pattern mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: updated suppression pattern mysql-test/t/archive.test: updated suppression pattern mysql-test/t/commit_1innodb.test: updated suppression pattern mysql-test/t/create_select_tmp.test: updated suppression pattern mysql-test/t/ctype_cp932_binlog_stm.test: updated suppression pattern mysql-test/t/lock_sync.test: updated suppression pattern mysql-test/t/mysqlbinlog.test: updated suppression pattern mysql-test/t/mysqldump.test: updated suppression pattern mysql-test/t/sp_trans.test: updated suppression pattern sql/log_event.cc: Clarified error message. sql/share/errmsg-utf8.txt: Clarified error messages.
108 lines
4.7 KiB
Plaintext
108 lines
4.7 KiB
Plaintext
###############################################################################
|
|
# #
|
|
# Variable Name: init_slave #
|
|
# Scope: GLOBAL #
|
|
# Access Type: Dynamic #
|
|
# Data Type: string #
|
|
# Default Value: #
|
|
# Range: #
|
|
# #
|
|
# #
|
|
# Creation Date: 2008-03-08 #
|
|
# Author: Rizwan #
|
|
# Modified: HHunger 2008-09-29 Fixed the bug by inserting the usual wait and #
|
|
# SQL-Satements to control master and slave, #
|
|
# deleted the sleep and made improvements like: #
|
|
# - Replaced the opt file by dynamic variables, #
|
|
# - Made the tests independant of the initial #
|
|
# values of the global variables, #
|
|
# - Reduced the test to the needed test case to #
|
|
# save run time, #
|
|
# - Beautification. #
|
|
# #
|
|
# Description: Test Cases of Dynamic System Variable init_slave #
|
|
# that checks the behavior of this variable #
|
|
# #
|
|
# Reference: #
|
|
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
|
# #
|
|
###############################################################################
|
|
|
|
source include/master-slave.inc;
|
|
--echo connection slave
|
|
connection slave;
|
|
--disable_query_log
|
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
--enable_query_log
|
|
#
|
|
# save the current values
|
|
|
|
SET @start_max_connections= @@global.max_connections;
|
|
SET @start_init_slave= @@global.init_slave;
|
|
|
|
# setting of a global value with an effect on the next start of the slave server
|
|
# check that @@global.init_slave could be set
|
|
SET NAMES utf8;
|
|
let $my_init_slave=
|
|
'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий';
|
|
eval SET @@global.init_slave = $my_init_slave;
|
|
|
|
# show the data type of the variable
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
|
|
--enable_warnings
|
|
DESCRIBE t1;
|
|
select length(my_column) from t1;
|
|
DROP TABLE t1;
|
|
#
|
|
# check that the new setting of @@global.init_slave becomes immediately visible
|
|
eval SELECT @@global.init_slave = $my_init_slave;
|
|
--echo Expect 1
|
|
# wait for the slave threads have set the global variable.
|
|
let $wait_timeout= 90;
|
|
let $wait_condition= SELECT @@global.max_connections = @start_max_connections;
|
|
--source include/wait_condition_sp.inc
|
|
# check that the action in init_slave does not happen immediately
|
|
SELECT @@global.max_connections= @start_max_connections;
|
|
--echo Expect 1
|
|
#
|
|
# reset of the server
|
|
STOP SLAVE;
|
|
--wait_for_slave_to_stop
|
|
RESET MASTER;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
source include/wait_for_slave_to_start.inc;
|
|
#
|
|
# wait for the slave threads have set the global variable.
|
|
let $wait_timeout= 90;
|
|
let $wait_condition= SELECT @@global.max_connections = @start_max_connections + 1;
|
|
--source include/wait_condition_sp.inc
|
|
# check that the action in init_slave was executed and had the intended effect
|
|
SELECT @@global.max_connections = @start_max_connections + 1;
|
|
--echo Expect 1
|
|
#
|
|
# Setting a variable(which is local to a session) and must not be visible
|
|
SET @@global.init_slave = "SET @a=5";
|
|
#
|
|
STOP SLAVE;
|
|
--wait_for_slave_to_stop
|
|
RESET MASTER;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
source include/wait_for_slave_to_start.inc;
|
|
#
|
|
SHOW VARIABLES LIKE 'init_slave';
|
|
# expect NULL
|
|
SELECT @a;
|
|
--echo Expect NULL
|
|
#
|
|
# Clean up
|
|
SET @@global.max_connections= @start_max_connections;
|
|
SET @@global.init_slave= @start_init_slave;
|
|
##################################################
|
|
# End of functionality Testing for init_slave #
|
|
##################################################
|
|
|