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

Server crashes in TABLE::versioned on 2nd execution of SP

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (a INT);
      CREATE TABLE t2 (b INT);
       
      CREATE PROCEDURE pr() SELECT * FROM t1 WHERE ( 5, 6 ) IN ( SELECT b, b FROM t2 ) AND a IN ( SELECT MAX(b) FROM t2 );
      CALL pr;
      CALL pr;
       
      # Cleanup
      DROP PROCEDURE pr;
      

      bb-10.3-temporal ea49441c4163

      #3  <signal handler called>
      #4  0x000055db7fc25169 in TABLE::versioned (this=0x7fd348049318) at /data/src/bb-10.3-temporal/sql/table.h:1531
      #5  0x000055db7fcd97d5 in st_select_lex::vers_setup_conds (this=0x7fd348091078, thd=0x7fd348000b00, tables=0x7fd34800d1c0, where_expr=0x7fd348047770) at /data/src/bb-10.3-temporal/sql/sql_select.cc:754
      #6  0x000055db7fcdb617 in JOIN::prepare (this=0x7fd348047368, tables_init=0x7fd34800d1c0, wild_num=0, conds_init=0x7fd3480470c8, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fd348091078, unit_arg=0x7fd348090920) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1167
      #7  0x000055db7fce6755 in mysql_select (thd=0x7fd348000b00, tables=0x7fd34800d1c0, wild_num=0, fields=..., conds=0x7fd3480470c8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147749632, result=0x7fd348047348, unit=0x7fd348090920, select_lex=0x7fd348091078) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4236
      #8  0x000055db7fcd88a0 in handle_select (thd=0x7fd348000b00, lex=0x7fd348090858, result=0x7fd348047348, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:382
      #9  0x000055db7fca3a04 in execute_sqlcom_select (thd=0x7fd348000b00, all_tables=0x7fd34800d1c0) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6535
      #10 0x000055db7fc9a048 in mysql_execute_command (thd=0x7fd348000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #11 0x000055db8011159c in sp_instr_stmt::exec_core (this=0x7fd34806dab8, thd=0x7fd348000b00, nextp=0x7fd35f549754) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3407
      #12 0x000055db801109be in sp_lex_keeper::reset_lex_and_exec_core (this=0x7fd34806db08, thd=0x7fd348000b00, nextp=0x7fd35f549754, open_tables=false, instr=0x7fd34806dab8) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3123
      #13 0x000055db8011115c in sp_instr_stmt::execute (this=0x7fd34806dab8, thd=0x7fd348000b00, nextp=0x7fd35f549754) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3310
      #14 0x000055db8010b2a1 in sp_head::execute (this=0x7fd34800c268, thd=0x7fd348000b00, merge_da_on_success=true) at /data/src/bb-10.3-temporal/sql/sp_head.cc:1220
      #15 0x000055db8010d921 in sp_head::execute_procedure (this=0x7fd34800c268, thd=0x7fd348000b00, args=0x7fd3480055f8) at /data/src/bb-10.3-temporal/sql/sp_head.cc:2101
      #16 0x000055db7fc97a2f in do_execute_sp (thd=0x7fd348000b00, sp=0x7fd34800c268) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:2919
      #17 0x000055db7fc98595 in Sql_cmd_call::execute (this=0x7fd348014d00, thd=0x7fd348000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3161
      #18 0x000055db7fca281a in mysql_execute_command (thd=0x7fd348000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6261
      #19 0x000055db7fca7358 in mysql_parse (thd=0x7fd348000b00, rawbuf=0x7fd348014c48 "CALL pr", length=7, parser_state=0x7fd35f54b5f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
      #20 0x000055db7fc94af9 in dispatch_command (command=COM_QUERY, thd=0x7fd348000b00, packet=0x7fd34811ef11 "CALL pr", packet_length=7, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
      #21 0x000055db7fc9352d in do_command (thd=0x7fd348000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
      #22 0x000055db7fdfb21e in do_handle_one_connection (connect=0x55db83b23a50) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #23 0x000055db7fdfafab in handle_one_connection (arg=0x55db83b23a50) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #24 0x000055db80295bfe in pfs_spawn_thread (arg=0x55db83b2bac0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #25 0x00007fd36afb9494 in start_thread (arg=0x7fd35f54c700) at pthread_create.c:333
      #26 0x00007fd36939f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with at least MyISAM, InnoDB, Aria.

      Attachments

        Activity

          People

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