Commit 8949aaee authored by Sven Sandberg's avatar Sven Sandberg

post-push fixes for BUG#39934: updating test cases

mysql-test/r/partition_innodb_stmt.result:
  Error message changed.
mysql-test/r/sp_trans.result:
  Error message changed.
mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
  Error message changed.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Test now uses udf's, so needs to source include/have_udf.inc
mysql-test/suite/parts/r/rpl_partition.result:
  updated result file
mysql-test/suite/parts/t/rpl_partition.test:
  We no longer allow a slave that has binlog_format=statement
  to execute row events. Hence we force the slave to have
  binlog_format=row.
mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test:
  The test uses the example plugin, hence it must
  source include/have_example_plugin.inc.
parent 86a3e213
......@@ -42,7 +42,7 @@ id
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN;
INSERT INTO t1 VALUES(9);
ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
ERROR HY000: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
COMMIT;
COMMIT;
DROP TABLE t1;
......@@ -507,7 +507,16 @@ until table_size > max_table_size*2 end repeat;
end|
call bug14210_fill_table()|
Warnings:
Note 1592 Unsafe statement binlogged as statement since BINLOG_FORMAT is STATEMENT.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: delete from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 (a) values (repeat('a', 255))
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t3 select a from t3
drop procedure bug14210_fill_table|
create table t4 like t3|
create procedure bug14210()
......
......@@ -4,10 +4,10 @@ CREATE TABLE t1 (a int, b int, primary key (a));
INSERT INTO t1 VALUES (1,2), (2,3);
UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: UPDATE t1 SET b='4' WHERE a=1 LIMIT 1
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1
DROP TABLE t1;
### NOT filtered database => assertion: binlog disabled and warnings ARE NOT shown
SET SQL_LOG_BIN= 0;
......
......@@ -92,6 +92,7 @@
# related to logging format (not just 'Unsafe statement binlogged in
# statement mode since BINLOG_FORMAT = STATEMENT').
source include/have_udf.inc;
source include/have_log_bin.inc;
source include/have_binlog_format_statement.inc;
......
......@@ -11,6 +11,17 @@ SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format ROW
@@session.binlog_format ROW
[on slave]
set @old_global_binlog_format= @@global.binlog_format;
set @old_session_binlog_format= @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format ROW
@@session.binlog_format ROW
include/stop_slave.inc
include/start_slave.inc
[on master]
DROP TABLE IF EXISTS t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
......@@ -189,3 +200,6 @@ DROP TABLE t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
[on slave]
set @@global.binlog_format= @old_global_binlog_format;
set @@session.binlog_format= @old_session_binlog_format;
......@@ -11,6 +11,19 @@ set @old_session_binlog_format= @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
--echo [on slave]
connection slave;
set @old_global_binlog_format= @@global.binlog_format;
set @old_session_binlog_format= @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
# restart slave so that slave sql thread's binlog format is re-read
# from @@global.binlog_format
--source include/stop_slave.inc
--source include/start_slave.inc
--echo [on master]
connection master;
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3;
......@@ -158,8 +171,9 @@ DROP TABLE t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
save_master_pos;
connection slave;
sync_with_master;
--echo [on slave]
sync_slave_with_master;
set @@global.binlog_format= @old_global_binlog_format;
set @@session.binlog_format= @old_session_binlog_format;
# End of 5.1 tests
......@@ -20,7 +20,10 @@
# given for the case when an unsafe statement is executed and
# binlog_format = STATEMENT.
# Need debug so that 'SET @@session.debug' works.
--source include/have_debug.inc
# Need example plugin because it is the only statement-only engine.
--source include/have_example_plugin.inc
# The test changes binlog_format, so there is no reason to run it
# under more than one binlog format.
--source include/have_binlog_format_row.inc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment