Commit a6e27638 authored by mats@kindahl-laptop.dnsalias.net's avatar mats@kindahl-laptop.dnsalias.net

Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl

into  kindahl-laptop.dnsalias.net:/home/bk/b23051-mysql-5.1-rpl
parents 61ac88f3 0341be4e
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
SET BINLOG_FORMAT=STATEMENT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'STATEMENT' binlog mode
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
SET BINLOG_FORMAT=MIXED;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'MIXED' binlog mode
UPDATE t1 SET b = a*a*a WHERE a > 2;
COMMIT;
SET BINLOG_FORMAT=ROW;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation READ-COMMITTED
@@session.binlog_format ROW
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET BINLOG_FORMAT=MIXED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation READ-COMMITTED
@@session.binlog_format ROW
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET BINLOG_FORMAT=STATEMENT;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation READ-COMMITTED
@@session.binlog_format ROW
......@@ -2285,7 +2285,7 @@ ha_innobase::table_flags() const
is called from mysql_lock_tables()) until after this
function has been called (which is called in lock_tables()
before that function calls mysql_lock_tables()). */
ulong const tx_isolation= thd->variables.tx_isolation;
ulong const tx_isolation= thd_tx_isolation(thd);
if (tx_isolation <= ISO_READ_COMMITTED)
{
ulong const binlog_format= thd->variables.binlog_format;
......
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