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

Server crashes in Item_cond::transform on 2nd execution of SP querying from a view

    XMLWordPrintable

Details

    Description

      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
      CREATE OR REPLACE VIEW v1 AS SELECT i FROM t1 WHERE i < 5;
      CREATE OR REPLACE PROCEDURE pr() SELECT i FROM v1;
      CALL pr;
      CALL pr;
       
      # Cleanup
      DROP PROCEDURE pr;
      DROP VIEW v1;
      DROP TABLE t1;
      

      bb-10.3-temporal a3a15126f26

      #3  <signal handler called>
      #4  0x000055e2b9af58c8 in Item_cond::transform (this=0x7f628003aef8, thd=0x7f6280000b00, transformer=&virtual table offset 1192, arg=0x0) at /data/src/bb-10.3-temporal/sql/item_cmpfunc.cc:4748
      #5  0x000055e2b9853da8 in JOIN::vers_check_items (this=0x7f62800854b8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:703
      #6  0x000055e2b9805c1b in JOIN::prepare (this=0x7f62800854b8, tables_init=0x7f6280070578, wild_num=0, conds_init=0x7f628003aef8, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f62800399d8, unit_arg=0x7f6280039280) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1455
      #7  0x000055e2b98b32ca in st_select_lex_unit::prepare_join (this=0x7f6280039280, thd_arg=0x7f6280000b00, sl=0x7f62800399d8, tmp_result=0x7f62800853d0, additional_options=0, is_union_select=false) at /data/src/bb-10.3-temporal/sql/sql_union.cc:674
      #8  0x000055e2b98b4682 in st_select_lex_unit::prepare (this=0x7f6280039280, thd_arg=0x7f6280000b00, sel_result=0x7f62800853d0, additional_options=0) at /data/src/bb-10.3-temporal/sql/sql_union.cc:946
      #9  0x000055e2b9784113 in mysql_derived_prepare (thd=0x7f6280000b00, lex=0x7f6280070c58, derived=0x7f628006f950) at /data/src/bb-10.3-temporal/sql/sql_derived.cc:865
      #10 0x000055e2b978277f in mysql_handle_single_derived (lex=0x7f6280070c58, derived=0x7f628006f950, phases=2) at /data/src/bb-10.3-temporal/sql/sql_derived.cc:197
      #11 0x000055e2b98e0ca0 in TABLE_LIST::handle_derived (this=0x7f628006f950, lex=0x7f6280070c58, phases=2) at /data/src/bb-10.3-temporal/sql/table.cc:8081
      #12 0x000055e2b97a5fde in st_select_lex::handle_derived (this=0x7f6280071478, lex=0x7f6280070c58, phases=2) at /data/src/bb-10.3-temporal/sql/sql_lex.cc:4036
      #13 0x000055e2b98044ec in JOIN::prepare (this=0x7f6280084e78, tables_init=0x7f628006f950, wild_num=0, conds_init=0x7f6280084c38, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f6280071478, unit_arg=0x7f6280070d20) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1133
      #14 0x000055e2b980f7f1 in mysql_select (thd=0x7f6280000b00, tables=0x7f628006f950, wild_num=0, fields=..., conds=0x7f6280084c38, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147749632, result=0x7f6280084e58, unit=0x7f6280070d20, select_lex=0x7f6280071478) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4236
      #15 0x000055e2b980193e in handle_select (thd=0x7f6280000b00, lex=0x7f6280070c58, result=0x7f6280084e58, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:382
      #16 0x000055e2b97ccaa1 in execute_sqlcom_select (thd=0x7f6280000b00, all_tables=0x7f628006f950) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6535
      #17 0x000055e2b97c30e5 in mysql_execute_command (thd=0x7f6280000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #18 0x000055e2b9c3a5f8 in sp_instr_stmt::exec_core (this=0x7f628006ff90, thd=0x7f6280000b00, nextp=0x7f6297767754) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3407
      #19 0x000055e2b9c39a1a in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f628006ffe0, thd=0x7f6280000b00, nextp=0x7f6297767754, open_tables=false, instr=0x7f628006ff90) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3123
      #20 0x000055e2b9c3a1b8 in sp_instr_stmt::execute (this=0x7f628006ff90, thd=0x7f6280000b00, nextp=0x7f6297767754) at /data/src/bb-10.3-temporal/sql/sp_head.cc:3310
      #21 0x000055e2b9c342fd in sp_head::execute (this=0x7f628006ebb8, thd=0x7f6280000b00, merge_da_on_success=true) at /data/src/bb-10.3-temporal/sql/sp_head.cc:1220
      #22 0x000055e2b9c3697d in sp_head::execute_procedure (this=0x7f628006ebb8, thd=0x7f6280000b00, args=0x7f62800055f8) at /data/src/bb-10.3-temporal/sql/sp_head.cc:2101
      #23 0x000055e2b97c0acd in do_execute_sp (thd=0x7f6280000b00, sp=0x7f628006ebb8) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:2919
      #24 0x000055e2b97c1633 in Sql_cmd_call::execute (this=0x7f6280014d00, thd=0x7f6280000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3161
      #25 0x000055e2b97cb8b7 in mysql_execute_command (thd=0x7f6280000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6261
      #26 0x000055e2b97d03f6 in mysql_parse (thd=0x7f6280000b00, rawbuf=0x7f6280014c48 "CALL pr", length=7, parser_state=0x7f62977695f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
      #27 0x000055e2b97bdb97 in dispatch_command (command=COM_QUERY, thd=0x7f6280000b00, packet=0x7f628011ef11 "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
      #28 0x000055e2b97bc5cb in do_command (thd=0x7f6280000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
      #29 0x000055e2b9924354 in do_handle_one_connection (connect=0x55e2bcfa09f0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #30 0x000055e2b99240e1 in handle_one_connection (arg=0x55e2bcfa09f0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #31 0x000055e2b9dbec5a in pfs_spawn_thread (arg=0x55e2bcfa8a60) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #32 0x00007f62a31df494 in start_thread (arg=0x7f629776a700) at pthread_create.c:333
      #33 0x00007f62a15c593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.