# # Bug#32469090 FAILURE TO FIND BLOBPARTS NOT HANDLED # - Use DBUG to insert error while processing INSERT, UPDATE # and DELETE events on a table with blobs. The binlog thread will # restart and write a LOST_EVENTS to the binlog. # CREATE TABLE t1 ( a int primary key, b blob, c text ) ENGINE = NDB; RESET MASTER; set @save_debug = @@global.debug; set @@global.debug = '+d,ndb_event_fail_read_blob_parts'; # Create and drop dummy table to activate DBUG in binlog thread CREATE TABLE dummy (a int primary key) ENGINE = NDB; DROP TABLE dummy; # Perform INSERT with blob large enough to trigger reading # blob parts and thus event will fail to be processed INSERT INTO t1 VALUES (37, REPEAT("MySQL", 256), REPEAT("Cluster", 1024)); # mysqld1: Wait until ready again... set @@global.debug = @save_debug; # Check that LOST_EVENTS event was written to the binlog for # INSERT and UPDATE. The DELETE should have a normal log entry. include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 # Query # # use `test`; CREATE TABLE dummy (a int primary key) ENGINE = NDB binlog.000001 # Query # # use `test`; DROP TABLE `dummy` /* generated by server */ binlog.000001 # Incident # # #1 (LOST_EVENTS) binlog.000001 # Rotate # # binlog.000002;pos=POS RESET MASTER; set @save_debug = @@global.debug; set @@global.debug = '+d,ndb_event_fail_read_blob_parts'; # Create and drop dummy table to activate DBUG in binlog thread CREATE TABLE dummy (a int primary key) ENGINE = NDB; DROP TABLE dummy; # Perform UPDATE with blob large enough to trigger reading # blob parts and thus event will fail to be processed UPDATE t1 SET b = REPEAT("NDB", 256*1), c = REPEAT("MySQL", 1024*1) WHERE a = 37; # mysqld1: Wait until ready again... set @@global.debug = @save_debug; # Check that LOST_EVENTS event was written to the binlog for # INSERT and UPDATE. The DELETE should have a normal log entry. include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 # Query # # use `test`; CREATE TABLE dummy (a int primary key) ENGINE = NDB binlog.000001 # Query # # use `test`; DROP TABLE `dummy` /* generated by server */ binlog.000001 # Incident # # #1 (LOST_EVENTS) binlog.000001 # Rotate # # binlog.000002;pos=POS RESET MASTER; set @save_debug = @@global.debug; set @@global.debug = '+d,ndb_event_fail_read_blob_parts'; # Create and drop dummy table to activate DBUG in binlog thread CREATE TABLE dummy (a int primary key) ENGINE = NDB; DROP TABLE dummy; # Perform DELETE. The blob in NDB is large but only primary keys # are needed so blob parts are not read. It is possible to configure # "full image" to be logged, but that is not enabled in this test. DELETE FROM t1 WHERE a = 37; # mysqld1: Wait until ready again... set @@global.debug = @save_debug; # Check that LOST_EVENTS event was written to the binlog for # INSERT and UPDATE. The DELETE should have a normal log entry. include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 # Query # # use `test`; CREATE TABLE dummy (a int primary key) ENGINE = NDB binlog.000001 # Query # # use `test`; DROP TABLE `dummy` /* generated by server */ binlog.000001 # Query # # BEGIN binlog.000001 # Table_map # # table_id: # (test.t1) binlog.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) binlog.000001 # Write_rows # # table_id: # binlog.000001 # Delete_rows # # table_id: # flags: STMT_END_F binlog.000001 # Query # # COMMIT DROP TABLE t1;