Bug #48815 Slave stops with error code 1644 but row event executed by SQL thread

Submitted: 16 Nov 2009 19:54 Modified: 14 Jan 2010 13:11
Reporter: Serge Kozlov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1-rep+3 OS:Any
Assigned to: Alfranio Tavares Correia Junior CPU Architecture:Any
Tags: binlog, error 1644, row, statement

[16 Nov 2009 19:54] Serge Kozlov
Description:
There is chained replication by schema A->B->C where binlog formats are ROW and STATEMENT for these channels:

Server1 ---ROW---> Server2 ---STATEMENT---> Server3

Server1 send the row event. Server2 executes it (data appears on server) and then slave SQL thread stops with error:

Error 'Cannot execute row injection: binlogging impossible since BINLOG_FORMAT = STATEMENT.' on opening tables, Error_code: 1644
Warning: Cannot execute row injection: binlogging impossible since BINLOG_FORMAT = STATEMENT. Error_code: 1644

The expected behavior: the slave shouldn't execute row event from relay log because write to binlog is failed.

How to repeat:
Use attached test case (try to run and look into log files).
[16 Nov 2009 20:00] Serge Kozlov
test case

Attachment: bug48815.tgz (application/x-gzip, text), 740 bytes.

[16 Nov 2009 20:04] Sven Sandberg
Suggested update of existing test case to test for this bug

Attachment: rpl_ndb_binlog_format_errors.test.diff (text/x-patch), 4.14 KiB.

[29 Nov 2009 19:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/92012

364 Serge Kozlov	2009-11-29
      1. Test cases for bugs: bug#48815, bug#48819, bug#48845, bug#48903, bug#48908
      2. Added sorting test cases by their file names.
      3. Added test template Replication.pm
      added:
        lib/My/Nuts/Library/Tests/Replication.pm
        suites/bugs/
        suites/bugs/bug48815.pm
        suites/bugs/bug48819.pm
        suites/bugs/bug48845.pm
        suites/bugs/bug48903.pm
        suites/bugs/bug48908.pm
      modified:
        bin/Driver.pm
[4 Dec 2009 18:56] Matthias Leich
Most probably more simple test:
-------------------------------
--source include/master-slave.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 ( f1 BIGINT) ENGINE=myisam;
SET SESSION BINLOG_FORMAT = ROW;
COMMIT;

INSERT INTO t1 ( f1 ) VALUES ( 13 );

COMMIT;
--sync_slave_with_master

connection master;
DROP TABLE t1;

Observations:
-------------
mysql-5.1-rep+3 Dec 2009
./mysql-test-run --mysqld=--binlog_format=<format> <test>
shows error 1644  when <format>=STATEMENT
The error does not come up when <format> IN ROW,MIXED

mysql-5.1-bugteam and mysql-6.0-codebase-bugfixing
do not show this bug.
[28 Dec 2009 21:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/95765

365 Serge Kozlov	2009-12-29
      1. Test cases for bugs: bug#48815, bug#48819, bug#48845, bug#48903, bug#48908
      2. Added sorting test cases by their file names.
      3. Added test template Replication.pm
      added:
        lib/My/Nuts/Library/Tests/Replication.pm
        suites/bugs/
        suites/bugs/bug48815.pm
        suites/bugs/bug48819.pm
        suites/bugs/bug48845.pm
        suites/bugs/bug48903.pm
        suites/bugs/bug48908.pm
      modified:
        bin/Driver.pm
[31 Dec 2009 12:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/95836

3130 Alfranio Correia	2009-12-31
      BUG#48815 Slave stops with error code 1644 but row event executed by SQL thread
      
      Updated rpl_ndb_binlog_format_errors.test to check error ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.