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

Partition: assertion in ha_commit_trans() for sub-statement

    XMLWordPrintable

    Details

      Description

      Assertion `0' failed in ha_commit_trans / partition_info::vers_scan_min_max.

      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time INTERVAL 1 DAY (PARTITION p1 HISTORY, PARTITION pc CURRENT);
      CREATE OR REPLACE TABLE t2 (f INT);
      CREATE TRIGGER tr BEFORE INSERT ON t2 FOR EACH ROW SELECT table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' INTO @a;
      INSERT INTO t2 VALUES (1);
       
      # Cleanup
      DROP TABLE t1, t2;
      

      bb-10.3-temporal 617e108fb6e2b

      mysqld: /data/src/bb-10.3-temporal/sql/handler.cc:1337: int ha_commit_trans(THD*, bool): Assertion `0' failed.
      171220 17:17:28 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f8ac0a78ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055f495eb8074 in ha_commit_trans (thd=0x7f8aa0000b00, all=false) at /data/src/bb-10.3-temporal/sql/handler.cc:1337
      #9  0x000055f495d1bc19 in partition_info::vers_scan_min_max (this=0x7f8aa0063858, thd=0x7f8aa0000b00, part=0x7f8aa0063a90) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1114
      #10 0x000055f495d14289 in partition_info::vers_setup_stats (this=0x7f8aa0063858, thd=0x7f8aa0000b00, is_create_table_ind=false) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1227
      #11 0x000055f495ce8b1d in open_table_from_share (thd=0x7f8aa0000b00, share=0x7f8aa005b128, alias=0x7f8aa0052b10 "t1", db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7f8aa00607f0, is_create_table=false) at /data/src/bb-10.3-temporal/sql/table.cc:3525
      #12 0x000055f495b51f99 in open_table (thd=0x7f8aa0000b00, table_list=0x7f8aa0052b18, ot_ctx=0x7f8ab6ccacc0) at /data/src/bb-10.3-temporal/sql/sql_base.cc:1907
      #13 0x000055f495b54dc1 in open_and_process_table (thd=0x7f8aa0000b00, lex=0x7f8ab6ccafc0, tables=0x7f8aa0052b18, counter=0x7f8ab6ccad8c, flags=1346, prelocking_strategy=0x7f8ab6ccad90, has_prelocking_list=false, ot_ctx=0x#14 0x000055f495b55f76 in open_tables (thd=0x7f8aa0000b00, options=..., start=0x7f8ab6ccad70, counter=0x7f8ab6ccad8c, flags=1346, prelocking_strategy=0x7f8ab6ccad90) at /data/src/bb-10.3-temporal/sql/sql_base.cc:3987
      #15 0x000055f495b4e61c in open_tables (thd=0x7f8aa0000b00, tables=0x7f8ab6ccad70, counter=0x7f8ab6ccad8c, flags=1346, prelocking_strategy=0x7f8ab6ccad90) at /data/src/bb-10.3-temporal/sql/sql_base.h:237
      #16 0x000055f495b57abd in open_normal_and_derived_tables (thd=0x7f8aa0000b00, tables=0x7f8aa0052b18, flags=1346, dt_phases=35) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4805
      #17 0x000055f495b57c96 in open_tables_only_view_structure (thd=0x7f8aa0000b00, table_list=0x7f8aa0052b18, can_deadlock=true) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4862
      #18 0x000055f495c780b7 in fill_schema_table_by_open (thd=0x7f8aa0000b00, mem_root=0x7f8ab6ccc860, is_show_fields_or_keys=false, table=0x7f8aa003f788, schema_table=0x55f497151740 <schema_tables+1920>, orig_db_name=0x7f8aa00506e8, orig_table_name=0x7f8aa00503e8, open_tables_state_backup=0x7f8ab6ccc8a0, can_deadlock=true) at /data/src/bb-10.3-temporal/sql/sql_show.cc:4575
      #19 0x000055f495c79e31 in get_all_tables (thd=0x7f8aa0000b00, tables=0x7f8aa0182ae0, cond=0x7f8aa01832d8) at /data/src/bb-10.3-temporal/sql/sql_show.cc:5287
      #20 0x000055f495c89d12 in get_schema_tables_result (join=0x7f8aa003f100, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/bb-10.3-temporal/sql/sql_show.cc:8660
      #21 0x000055f495c232b8 in JOIN::exec_inner (this=0x7f8aa003f100) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4037
      #22 0x000055f495c22810 in JOIN::exec (this=0x7f8aa003f100) at /data/src/bb-10.3-temporal/sql/sql_select.cc:3868
      #23 0x000055f495c23c29 in mysql_select (thd=0x7f8aa0000b00, tables=0x7f8aa0182ae0, wild_num=0, fields=..., conds=0x7f8aa01832d8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684357376, result=0x7f8aa0183440, unit=0x7f8aa0038a10, select_lex=0x7f8aa0039170) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4280
      #24 0x000055f495c15a58 in handle_select (thd=0x7f8aa0000b00, lex=0x7f8aa0038948, result=0x7f8aa0183440, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:380
      #25 0x000055f495be0c3d in execute_sqlcom_select (thd=0x7f8aa0000b00, all_tables=0x7f8aa0182ae0) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6532
      #26 0x000055f495bd72a4 in mysql_execute_command (thd=0x7f8aa0000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #27 0x000055f496049c3a in sp_instr_stmt::exec_core (this=0x7f8aa01834c0, thd=0x7f8aa0000b00, nextp=0x7f8ab6cceb54) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3407
      #28 0x000055f49604905c in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f8aa0183510, thd=0x7f8aa0000b00, nextp=0x7f8ab6cceb54, open_tables=false, instr=0x7f8aa01834c0) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3123
      #29 0x000055f4960497fa in sp_instr_stmt::execute (this=0x7f8aa01834c0, thd=0x7f8aa0000b00, nextp=0x7f8ab6cceb54) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3310
      #30 0x000055f49604393f in sp_head::execute (this=0x7f8aa0181aa8, thd=0x7f8aa0000b00, merge_da_on_success=false) at /data/src/bb-10.3-temporal/sql/sp_head.cc:1220
      #31 0x000055f496044a63 in sp_head::execute_trigger (this=0x7f8aa0181aa8, thd=0x7f8aa0000b00, db_name=0x7f8aa0095168, table_name=0x7f8aa0095178, grant_info=0x7f8aa0181708) at /data/src/bb-10.3-temporal/sql/sp_head.cc:1635
      #32 0x000055f495cc1979 in Table_triggers_list::process_triggers (this=0x7f8aa00926f8, thd=0x7f8aa0000b00, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_BEFORE, old_row_is_record1=true) at /data/src/bb-10.3-temporal/sql/sql_trigger.cc:2215
      #33 0x000055f495b60dcf in fill_record_n_invoke_before_triggers (thd=0x7f8aa0000b00, table=0x7f8aa000daf0, ptr=0x7f8aa0006998, values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at /data/src/bb-10.3-temporal/sql/sql_base.cc:8395
      #34 0x000055f495ba3bb7 in mysql_insert (thd=0x7f8aa0000b00, table_list=0x7f8aa0014d38, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-temporal/sql/sql_insert.cc:1022
      #35 0x000055f495bd9e5a in mysql_execute_command (thd=0x7f8aa0000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:4706
      #36 0x000055f495be4592 in mysql_parse (thd=0x7f8aa0000b00, rawbuf=0x7f8aa0014c58 "INSERT INTO t2 VALUES (1)", length=25, parser_state=0x7f8ab6cd05f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7988
      #37 0x000055f495bd1d55 in dispatch_command (command=COM_QUERY, thd=0x7f8aa0000b00, packet=0x7f8aa011ee41 "INSERT INTO t2 VALUES (1)", packet_length=25, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1826
      #38 0x000055f495bd0789 in do_command (thd=0x7f8aa0000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1371
      #39 0x000055f495d37e38 in do_handle_one_connection (connect=0x55f4990e79d0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #40 0x000055f495d37bc5 in handle_one_connection (arg=0x55f4990e79d0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #41 0x000055f4961ce224 in pfs_spawn_thread (arg=0x55f4990ef940) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #42 0x00007f8ac274f494 in start_thread (arg=0x7f8ab6cd1700) at pthread_create.c:333
      #43 0x00007f8ac0b3593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with MyISAM, InnoDB, Aria.
      Not reproducible without system-versioned partitioning.

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            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.