Commit 7eebcf2f authored by unknown's avatar unknown

BUG#23051 (READ COMMITTED breaks mixed and statement-based replication):

Post-merge fixes.


BitKeeper/deleted/.del-ndb_binlog_basic2.test:
  Delete: mysql-test/t/ndb_binlog_basic2.test
BitKeeper/deleted/.del-ndb_binlog_basic2.result:
  Delete: mysql-test/r/ndb_binlog_basic2.result
mysql-test/r/binlog_innodb.result:
  Result change
mysql-test/r/binlog_multi_engine.result:
  Result change
mysql-test/t/binlog_multi_engine.test:
  Changed error code
mysql-test/t/partition_hash.test:
  Changed error code
sql/sql_class.h:
  Fixes to select_create constructor argument list.
parent 95d678f8
......@@ -14,12 +14,12 @@ SET BINLOG_FORMAT=STATEMENT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
UPDATE t1 SET b = 1*a WHERE a > 1;
ERROR HY000: Logging not possible. Message: InnoDB: Transaction level 'READ-UNCOMMITTED' is not safe for binlog mode 'STATEMENT'
ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-UNCOMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
UPDATE t1 SET b = 2*a WHERE a > 2;
ERROR HY000: Logging not possible. Message: InnoDB: Transaction level 'READ-COMMITTED' is not safe for binlog mode 'STATEMENT'
ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
......
......@@ -5,12 +5,12 @@ SET SESSION BINLOG_FORMAT=STATEMENT;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
ERROR HY000: Attempting to log statement in in statement format, but statement format is not possible with this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement-based format required for this statement, but not allowed by this combination of engines
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
ERROR HY000: Attempting to log statement in in statement format, but statement format is not possible with this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement-based format required for this statement, but not allowed by this combination of engines
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: It is not possible to log anything with this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format
TRUNCATE t1m;
TRUNCATE t1b;
TRUNCATE t1n;
......@@ -21,20 +21,20 @@ INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: It is not possible to log anything with this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format
TRUNCATE t1m;
TRUNCATE t1b;
TRUNCATE t1n;
SET SESSION BINLOG_FORMAT=ROW;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
ERROR HY000: Attempting to log statement in in row format, but row format is not possible with this combination of engines
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
ERROR HY000: Attempting to log statement in in row format, but row format is not possible with this combination of engines
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: It is not possible to log anything with this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format
TRUNCATE t1m;
TRUNCATE t1b;
TRUNCATE t1n;
......@@ -51,9 +51,10 @@ master-bin.000001 # Query # # use `test`; TRUNCATE t1b
master-bin.000001 # Query # # use `test`; TRUNCATE t1n
master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2)
master-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2)
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f
master-bin.000001 # Table_map # # table_id: # (test.t1m)
master-bin.000001 # Table_map # # table_id: # (test.t1n)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; TRUNCATE t1m
master-bin.000001 # Query # # use `test`; TRUNCATE t1b
master-bin.000001 # Query # # BEGIN
......
set session binlog_format=row;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
set session binlog_format=statement;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
set global binlog_format=row;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
set global binlog_format=statement;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
set session binlog_format=default;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
set global binlog_format=default;
ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet
......@@ -9,13 +9,13 @@ SET SESSION BINLOG_FORMAT=STATEMENT;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
error ER_BINLOG_STMT_FORMAT_FORBIDDEN;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
error ER_BINLOG_STMT_FORMAT_FORBIDDEN;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
error ER_BINLOG_ENGINES_INCOMPATIBLE;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
TRUNCATE t1m;
......@@ -30,7 +30,7 @@ INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
error ER_BINLOG_ENGINES_INCOMPATIBLE;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
TRUNCATE t1m;
......@@ -40,14 +40,14 @@ TRUNCATE t1n;
SET SESSION BINLOG_FORMAT=ROW;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
error ER_BINLOG_ROW_FORMAT_FORBIDDEN;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
error ER_BINLOG_ROW_FORMAT_FORBIDDEN;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
error ER_BINLOG_ENGINES_INCOMPATIBLE;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
TRUNCATE t1m;
......
-- source include/have_ndb.inc
-- source include/have_log_bin.inc
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set session binlog_format=row;
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set session binlog_format=statement;
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set global binlog_format=row;
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set global binlog_format=statement;
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set session binlog_format=default;
--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT
set global binlog_format=default;
......@@ -134,7 +134,7 @@ drop table t1;
--disable_warnings
CREATE TABLE t1 (s1 int) ENGINE=BLACKHOLE PARTITION BY HASH (s1);
--enable_warnings
--error 0,ER_BINLOG_ROW_FORMAT_FORBIDDEN
--error 0,ER_BINLOG_LOGGING_IMPOSSIBLE
INSERT INTO t1 VALUES (0);
DROP TABLE t1;
......
......@@ -1998,13 +1998,14 @@ class select_create: public select_insert {
public:
select_create (TABLE_LIST *table_arg,
HA_CREATE_INFO *create_info_par,
List<create_field> &fields_par,
List<Key> &keys_par,
Alter_info *alter_info_arg,
List<Item> &select_fields,enum_duplicates duplic, bool ignore,
TABLE_LIST *select_tables_arg)
:select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore),
create_table(table_arg),
create_info(create_info_par), select_tables(select_tables_arg)
create_info(create_info_par),
select_tables(select_tables_arg),
alter_info(alter_info_arg)
{}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
......
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