Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31838

Assertion fails in binlog_log_row_online_alter upon parallel replication with two-phase alter and MINIMAL binlog_row_image

    XMLWordPrintable

Details

    Description

      I don't know why IGNORE is important in the update. It causes concerns in itself, as there is nothing to ignore, UPDATE is valid.

      Run the test case with --mysqld=--binlog-alter-two-phase=ON --mysqld=--slave_parallel_threads=4 --mysqld=--binlog_row_image=MINIMAL
      Somehow setting them dynamically doesn't cause the same effect, or maybe I'm not doing it correctly.

      --source include/have_debug_sync.inc
      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t (id INT, a INT, PRIMARY KEY(id)) ENGINE=Aria;
      INSERT INTO t VALUES (1,0);
       
      --connection master1
      --send set debug_sync= 'now wait_for go_dml'
       
      --connection master
      set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
      --send
      ALTER TABLE t FORCE, ALGORITHM=COPY, LOCK=NONE;
       
      --connection master1
      --reap
      UPDATE IGNORE t SET a = 1;
      set debug_sync= 'now signal go_alter';
       
      --connection master
      --reap
       
      --sync_slave_with_master
       
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      bb-11.2-oalter 67d0139c

      mariadbd: /data/src/bb-11.2-oalter-debug/sql/log.cc:2285: int binlog_log_row_online_alter(TABLE*, const uchar*, const uchar*, bool (*)(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, ulong, const uchar*, const uchar*)): Assertion `!before_record || bitmap_is_set_all(table->read_set)' failed.
      230803 19:03:18 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f1d04453df2 in __GI___assert_fail (assertion=0x5591f232e1e0 "!before_record || bitmap_is_set_all(table->read_set)", file=0x5591f232d0a8 "/data/src/bb-11.2-oalter-debug/sql/log.cc", line=2285, function=0x5591f232e218 "int binlog_log_row_online_alter(TABLE*, const uchar*, const uchar*, bool (*)(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, ulong, const uchar*, const uchar*))") at ./assert/assert.c:101
      #10 0x00005591f1838634 in binlog_log_row_online_alter (table=0x7f1c7c015ef8, before_record=0x7f1c7c016388 "\375\001", after_record=0x7f1c7c016378 "\375\001", log_func=0x5591f16f6454 <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>) at /data/src/bb-11.2-oalter-debug/sql/log.cc:2285
      #11 0x00005591f16ee848 in handler::binlog_log_row (this=0x7f1c7c016800, before_record=0x7f1c7c016388 "\375\001", after_record=0x7f1c7c016378 "\375\001", log_func=0x5591f16f6454 <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>) at /data/src/bb-11.2-oalter-debug/sql/handler.cc:7295
      #12 0x00005591f16f1663 in handler::ha_update_row (this=0x7f1c7c016800, old_data=0x7f1c7c016388 "\375\001", new_data=0x7f1c7c016378 "\375\001") at /data/src/bb-11.2-oalter-debug/sql/handler.cc:7889
      #13 0x00005591f1889b39 in Update_rows_log_event::do_exec_row (this=0x7f1c9003fb58, rgi=0x7f1c9003d950) at /data/src/bb-11.2-oalter-debug/sql/log_event_server.cc:8018
      #14 0x00005591f18801e6 in Rows_log_event::do_apply_event (this=0x7f1c9003fb58, rgi=0x7f1c9003d950) at /data/src/bb-11.2-oalter-debug/sql/log_event_server.cc:5131
      #15 0x00005591f186a36c in Log_event::apply_event (this=0x7f1c9003fb58, rgi=0x7f1c9003d950) at /data/src/bb-11.2-oalter-debug/sql/log_event.cc:3880
      #16 0x00005591f11af347 in apply_event_and_update_pos_apply (ev=0x7f1c9003fb58, thd=0x7f1c7c000dc8, rgi=0x7f1c9003d950, reason=0) at /data/src/bb-11.2-oalter-debug/sql/slave.cc:3877
      #17 0x00005591f11afbba in apply_event_and_update_pos_for_parallel (ev=0x7f1c9003fb58, thd=0x7f1c7c000dc8, rgi=0x7f1c9003d950) at /data/src/bb-11.2-oalter-debug/sql/slave.cc:4074
      #18 0x00005591f15874d4 in rpt_handle_event (qev=0x7f1c9003fdf8, rpt=0x7f1c9000d420) at /data/src/bb-11.2-oalter-debug/sql/rpl_parallel.cc:61
      #19 0x00005591f158b38b in handle_rpl_parallel_thread (arg=0x7f1c9000d420) at /data/src/bb-11.2-oalter-debug/sql/rpl_parallel.cc:1429
      #20 0x00005591f19fb438 in pfs_spawn_thread (arg=0x7f1c9000e8c8) at /data/src/bb-11.2-oalter-debug/storage/perfschema/pfs.cc:2201
      #21 0x00007f1d044a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #22 0x00007f1d045285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.