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

Server crashes in String_list::append_str / make_used_partitions_str

    XMLWordPrintable

Details

    Description

      Note: The test case is once again similar to MDEV-14844 and MDEV-14817, but now we are getting a crash different from MDEV-14817, and not the assertion failure as in MDEV-14844, so I'm filing it separately just in case.

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (pk int) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY system_time INTERVAL 4 HOUR (PARTITION p1 HISTORY, PARTITION pn CURRENT);
      LOCK TABLE t1 WRITE;
      ALTER TABLE t1 FORCE;
      --error ER_SAME_NAME_PARTITION
      SET STATEMENT system_versioning_alter_history=KEEP FOR ALTER TABLE t1 ADD PARTITION (PARTITION p1 HISTORY);
      SELECT *, sys_trx_start, sys_trx_end FROM t1 FOR system_time ALL;
       
      # Cleanup
      DROP TABLE t1;
      

      bb-10.3-temporal a3a15126f260e26b

      #3  <signal handler called>
      #4  0x00007faf7c137496 in strlen () from /lib/x86_64-linux-gnu/libc.so.6
      #5  0x00005569779a818e in String_list::append_str (this=0x7faf1c017a98, mem_root=0x7faf1c005ee8, str=0x0) at /data/src/bb-10.3-temporal/sql/sql_explain.cc:1381
      #6  0x0000556977cc2789 in make_used_partitions_str (alloc=0x7faf1c005ee8, part_info=0x7faf1c072ff8, parts_str=0x7faf1c017a58, used_partitions_list=...) at /data/src/bb-10.3-temporal/sql/sql_partition.cc:7314
      #7  0x000055697788dfd7 in st_join_table::save_explain_data (this=0x7faf1c016c80, eta=0x7faf1c017a18, prefix_tables=0, distinct_arg=false, first_top_tab=0x7faf1c016c80) at /data/src/bb-10.3-temporal/sql/sql_select.cc:25234
      #8  0x00005569778900d0 in JOIN::save_explain_data_intern (this=0x7faf1c0157d8, output=0x7faf1c0177a0, need_tmp_table_arg=false, need_order_arg=false, distinct_arg=false, message=0x0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:25805
      #9  0x0000556977856231 in JOIN::save_explain_data (this=0x7faf1c0157d8, output=0x7faf1c0177a0, can_overwrite=false, need_tmp_table=false, need_order=false, distinct=false) at /data/src/bb-10.3-temporal/sql/sql_select.cc:3807
      #10 0x000055697784df24 in JOIN::build_explain (this=0x7faf1c0157d8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1517
      #11 0x000055697784e0f4 in JOIN::optimize (this=0x7faf1c0157d8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1562
      #12 0x0000556977857814 in mysql_select (thd=0x7faf1c000b00, tables=0x7faf1c0150e0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2149845760, result=0x7faf1c0157b8, unit=0x7faf1c004898, select_lex=0x7faf1c004ff0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4244
      #13 0x000055697784993e in handle_select (thd=0x7faf1c000b00, lex=0x7faf1c0047d0, result=0x7faf1c0157b8, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:382
      #14 0x0000556977814aa1 in execute_sqlcom_select (thd=0x7faf1c000b00, all_tables=0x7faf1c0150e0) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6535
      #15 0x000055697780b0e5 in mysql_execute_command (thd=0x7faf1c000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #16 0x00005569778183f6 in mysql_parse (thd=0x7faf1c000b00, rawbuf=0x7faf1c014c48 "SELECT *, sys_trx_start, sys_trx_end FROM t1 FOR system_time ALL", length=64, parser_state=0x7faf744e95f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
      #17 0x0000556977805b97 in dispatch_command (command=COM_QUERY, thd=0x7faf1c000b00, packet=0x7faf1c120201 "SELECT *, sys_trx_start, sys_trx_end FROM t1 FOR system_time ALL", packet_length=64, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
      #18 0x00005569778045cb in do_command (thd=0x7faf1c000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
      #19 0x000055697796c354 in do_handle_one_connection (connect=0x55697a7705a0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #20 0x000055697796c0e1 in handle_one_connection (arg=0x55697a7705a0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #21 0x0000556977e06c5a in pfs_spawn_thread (arg=0x55697a7b6de0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #22 0x00007faf7ddb9494 in start_thread (arg=0x7faf744ea700) at pthread_create.c:333
      #23 0x00007faf7c19f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible on tempesta-tech/mariadb 52f9f635a5fa688.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.