mariadb/mysql-test/suite/rpl/t/rpl_conditional_comments.test
Michael Widenius 83c02f3237 Increased the version number to 10.0
- Fixed code that was not ready for a major version number > 9
- Fixed test cases that assumed max major version number could be 9
Updated version number for depricated options (will be removed in a later commit)

VERSION:
  Version number 10.0.0
client/mysqlbinlog.cc:
  Added support for major version numbers > 9
cmake/mysql_version.cmake:
  Added support for version numbers that is 0
mysql-test/r/comments.result:
  Modified test to handle version number 100000
mysql-test/r/func_system.result:
  Modified test to handle version number 100000
mysql-test/r/log_state.result:
  Updated depricated error message
mysql-test/r/sp.result:
  Modified test to handle version number 100000
mysql-test/r/subselect4.result:
  Updated depricated error message
mysql-test/r/variables.result:
  Updated depricated error message
mysql-test/suite/rpl/r/rpl_conditional_comments.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_conditional_comments.test:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Modified test to handle version number 100000
mysql-test/suite/sys_vars/r/debug_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/multi_range_count_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_big_selects_func.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_func.result:
  Updated depricated error message
mysql-test/t/comments.test:
  Modified test to handle version number 100000
mysql-test/t/file_contents.test:
  Modified test to handle version number 100000
mysql-test/t/func_system.test:
  Modified test to handle version number 100000
mysql-test/t/parser_not_embedded.test:
  Modified test to handle version number 100000
mysql-test/t/sp.test:
  Modified test to handle version number 100000
sql/mysqld.cc:
  Updated version number for depricated options (will be removed in a later commit)
sql/slave.cc:
  Modified test to handle version number 100000
  Better error messages
sql/sql_lex.cc:
  Modified test to handle version number 100000 in comment syntax
sql/sys_vars.cc:
  Updated version number for depricated options (will be removed in a later commit)
2012-05-31 22:39:11 +03:00

74 lines
2.4 KiB
Text

###############################################################################
# After the patch for BUG#49124:
# - Use ' ' instead of '!' in the conditional comments which are not applied on
# master. So they become common comments and will not be applied on slave.
#
# - Example:
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!999999 ,(3)*/
# will be binlogged as
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'.
###############################################################################
source include/master-slave.inc;
source include/have_binlog_format_statement.inc;
CREATE TABLE t1(c1 INT);
source include/show_binlog_events.inc;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
--echo
--echo # Case 1:
--echo # ------------------------------------------------------------------
--echo # In a statement, some CCs are applied while others are not. The CCs
--echo # which are not applied on master will be binlogged as common comments.
/*!999999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!999999 ,(11)*/;
source include/show_binlog_events.inc;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
--let $diff_tables= master:t1,slave:t1
--source include/diff_tables.inc
--echo
--echo # Case 2:
--echo # -----------------------------------------------------------------
--echo # Verify whether it can be binlogged correctly when executing prepared
--echo # statement.
--connection master
PREPARE stmt FROM 'INSERT INTO /*!999999 blabla*/ t1 VALUES(60) /*!999999 ,(61)*/';
EXECUTE stmt;
DROP TABLE t1;
CREATE TABLE t1(c1 INT);
EXECUTE stmt;
sync_slave_with_master;
--let $diff_tables= master:t1,slave:t1
--source include/diff_tables.inc
--connection master
--echo
SET @value=62;
PREPARE stmt FROM 'INSERT INTO /*!999999 blabla */ t1 VALUES(?) /*!999999 ,(63)*/';
EXECUTE stmt USING @value;
DROP TABLE t1;
CREATE TABLE t1(c1 INT);
EXECUTE stmt USING @value;
source include/show_binlog_events.inc;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
--let $diff_tables= master:t1,slave:t1
--source include/diff_tables.inc
--echo
--echo # Case 3:
--echo # -----------------------------------------------------------------
--echo # Verify it can restore the '!', if the it is an uncomplete conditional
--echo # comments
--connection master
--error 1064
SELECT c1 FROM /*!999999 t1 WHEREN;
DROP TABLE t1;
--source include/rpl_end.inc