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

Server crashes in bitmap_bits_set or bitmap_is_set upon UPDATE IGNORE .. FOR PORTION with binary logging

    XMLWordPrintable

    Details

      Description

      Note: There are two test cases in this item, please make sure both are fixed.

      --source include/have_log_bin.inc
       
      CREATE OR REPLACE TABLE t1 (f INT, s DATE, e DATE, PERIOD FOR app(s,e));
      INSERT INTO t1 VALUES (1,'2016-09-21','2019-06-14');
      UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 3568427d

      #3  <signal handler called>
      #4  0x000055da10f85838 in bitmap_bits_set (map=0x0) at /data/src/10.4/mysys/my_bitmap.c:603
      #5  0x000055da10926570 in pack_row (table=0x7ff9a4135980, cols=0x0, row_data=0x7ff9a412e559 '\245' <repeats 17 times>, '\217' <repeats 183 times>..., record=0x7ff9a412cf90 "\375\001") at /data/src/10.4/sql/rpl_record.cc:65
      #6  0x000055da1041e961 in THD::binlog_update_row (this=0x7ff9a4000b00, table=0x7ff9a4135980, is_trans=false, before_record=0x7ff9a412cfa0 "\375\001", after_record=0x7ff9a412cf90 "\375\001") at /data/src/10.4/sql/sql_class.cc:6777
      #7  0x000055da107e0ea4 in Update_rows_log_event::binlog_row_logging_function (thd=0x7ff9a4000b00, table=0x7ff9a4135980, is_transactional=false, before_record=0x7ff9a412cfa0 "\375\001", after_record=0x7ff9a412cf90 "\375\001") at /data/src/10.4/sql/log_event.h:4879
      #8  0x000055da107da3e1 in binlog_log_row_internal (table=0x7ff9a4135980, before_record=0x7ff9a412cfa0 "\375\001", after_record=0x7ff9a412cf90 "\375\001", log_func=0x55da107e0e1a <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /data/src/10.4/sql/handler.cc:6375
      #9  0x000055da107da513 in binlog_log_row (table=0x7ff9a4135980, before_record=0x7ff9a412cfa0 "\375\001", after_record=0x7ff9a412cf90 "\375\001", log_func=0x55da107e0e1a <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /data/src/10.4/sql/handler.cc:6395
      #10 0x000055da107dbda7 in handler::ha_update_row (this=0x7ff9a412d3e8, old_data=0x7ff9a412cfa0 "\375\001", new_data=0x7ff9a412cf90 "\375\001") at /data/src/10.4/sql/handler.cc:6754
      #11 0x000055da1058c723 in mysql_update (thd=0x7ff9a4000b00, table_list=0x7ff9a4015898, fields=..., values=..., conds=0x7ff9a4016cf8, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=true, found_return=0x7ff9c27b0840, updated_return=0x7ff9c27b0900) at /data/src/10.4/sql/sql_update.cc:1017
      #12 0x000055da10487fd1 in mysql_execute_command (thd=0x7ff9a4000b00) at /data/src/10.4/sql/sql_parse.cc:4695
      #13 0x000055da1049448b in mysql_parse (thd=0x7ff9a4000b00, rawbuf=0x7ff9a40155d8 "UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1", length=79, parser_state=0x7ff9c27b1180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8205
      #14 0x000055da1047fabb in dispatch_command (command=COM_QUERY, thd=0x7ff9a4000b00, packet=0x7ff9a4139261 "UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1", packet_length=79, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #15 0x000055da1047e2a1 in do_command (thd=0x7ff9a4000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #16 0x000055da105f8109 in do_handle_one_connection (connect=0x55da143be430) at /data/src/10.4/sql/sql_connect.cc:1399
      #17 0x000055da105f7e7a in handle_one_connection (arg=0x55da143be430) at /data/src/10.4/sql/sql_connect.cc:1302
      #18 0x000055da10aeda89 in pfs_spawn_thread (arg=0x55da143c4a10) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #19 0x00007ff9ca358494 in start_thread (arg=0x7ff9c27b2700) at pthread_create.c:333
      #20 0x00007ff9c873e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      --source include/have_log_bin.inc
       
      CREATE OR REPLACE TABLE t1 (b LONGTEXT, f INT, s DATE, e DATE, PERIOD FOR app(s,e));
      INSERT INTO t1 VALUES ('',1,'2016-09-21','2019-06-14');
      UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1;
       
      # Cleanup
      DROP TABLE t1;
      

      #3  <signal handler called>
      #4  0x0000556cb2760d52 in bitmap_is_set (map=0x0, bit=0) at /data/src/10.4/include/my_bitmap.h:133
      #5  0x0000556cb2779081 in max_row_length (table=0x7f7904135980, cols=0x0, data=0x7f790412cf90 "\374") at /data/src/10.4/sql/table.cc:7974
      #6  0x0000556cb25e48a7 in THD::binlog_update_row (this=0x7f7904000b00, table=0x7f7904135980, is_trans=false, before_record=0x7f790412cfa8 "\374", after_record=0x7f790412cf90 "\374") at /data/src/10.4/sql/sql_class.cc:6765
      #7  0x0000556cb29a6ea4 in Update_rows_log_event::binlog_row_logging_function (thd=0x7f7904000b00, table=0x7f7904135980, is_transactional=false, before_record=0x7f790412cfa8 "\374", after_record=0x7f790412cf90 "\374") at /data/src/10.4/sql/log_event.h:4879
      #8  0x0000556cb29a03e1 in binlog_log_row_internal (table=0x7f7904135980, before_record=0x7f790412cfa8 "\374", after_record=0x7f790412cf90 "\374", log_func=0x556cb29a6e1a <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /data/src/10.4/sql/handler.cc:6375
      #9  0x0000556cb29a0513 in binlog_log_row (table=0x7f7904135980, before_record=0x7f790412cfa8 "\374", after_record=0x7f790412cf90 "\374", log_func=0x556cb29a6e1a <Update_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /data/src/10.4/sql/handler.cc:6395
      #10 0x0000556cb29a1da7 in handler::ha_update_row (this=0x7f790412d3e8, old_data=0x7f790412cfa8 "\374", new_data=0x7f790412cf90 "\374") at /data/src/10.4/sql/handler.cc:6754
      #11 0x0000556cb2752723 in mysql_update (thd=0x7f7904000b00, table_list=0x7f7904015898, fields=..., values=..., conds=0x7f7904016cf8, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=true, found_return=0x7f7920d7b840, updated_return=0x7f7920d7b900) at /data/src/10.4/sql/sql_update.cc:1017
      #12 0x0000556cb264dfd1 in mysql_execute_command (thd=0x7f7904000b00) at /data/src/10.4/sql/sql_parse.cc:4695
      #13 0x0000556cb265a48b in mysql_parse (thd=0x7f7904000b00, rawbuf=0x7f79040155d8 "UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1", length=79, parser_state=0x7f7920d7c180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8205
      #14 0x0000556cb2645abb in dispatch_command (command=COM_QUERY, thd=0x7f7904000b00, packet=0x7f7904139261 "UPDATE IGNORE t1 FOR PORTION OF app FROM '2019-03-13' TO '2019-03-14' SET f = 1", packet_length=79, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #15 0x0000556cb26442a1 in do_command (thd=0x7f7904000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #16 0x0000556cb27be109 in do_handle_one_connection (connect=0x556cb5c02430) at /data/src/10.4/sql/sql_connect.cc:1399
      #17 0x0000556cb27bde7a in handle_one_connection (arg=0x556cb5c02430) at /data/src/10.4/sql/sql_connect.cc:1302
      #18 0x0000556cb2cb3a89 in pfs_spawn_thread (arg=0x556cb5c08a10) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #19 0x00007f7928923494 in start_thread (arg=0x7f7920d7d700) at pthread_create.c:333
      #20 0x00007f7926d0993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible with patches fbaa2e8f and 2e1e3bdb from the pull request 1225 applied.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: