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

Server crashes in find_field_in_tables on 2nd execution of PS with versioned table and view

    XMLWordPrintable

    Details

      Description

      CREATE OR REPLACE TABLE t1 (a INT);
      CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
      CREATE OR REPLACE TABLE t2 (b INT) WITH SYSTEM VERSIONING;
       
      PREPARE stmt FROM ' SELECT a FROM v1 INNER JOIN t2 GROUP BY a ORDER BY a';
      EXECUTE stmt;
      EXECUTE stmt;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1, t2;
      

      bb-10.3-temporal 2ae2876a6ce4

      #3  <signal handler called>
      #4  0x000055a52b9eb064 in find_field_in_tables (thd=0x7f2b2c000b00, item=0x7f2b2c086a98, first_table=0x7f2b2c0825f0, last_table=0x0, ref=0x7f2b3df95628, report_error=IGNORE_ERRORS, check_privileges=false, register_tree_change=false) at /data/src/bb-10.3-temporal/sql/sql_base.cc:5915
      #5  0x000055a52bae529b in find_order_in_list (thd=0x7f2b2c000b00, ref_pointer_array=..., tables=0x7f2b2c0825f0, order=0x7f2b2c083aa8, fields=..., all_fields=..., is_group_field=true, from_window_spec=false) at /data/src/bb-10.3-temporal/sql/sql_select.cc:23127
      #6  0x000055a52bae57c5 in setup_group (thd=0x7f2b2c000b00, ref_pointer_array=..., tables=0x7f2b2c0825f0, fields=..., all_fields=..., order=0x7f2b2c083aa8, hidden_group_fields=0x7f2b2c01516f, from_window_spec=false) at /data/src/bb-10.3-temporal/sql/sql_select.cc:23298
      #7  0x000055a52baa7131 in setup_without_group (thd=0x7f2b2c000b00, ref_pointer_array=..., tables=0x7f2b2c0825f0, leaves=..., fields=..., all_fields=..., conds=0x7f2b2c015290, order=0x7f2b2c083c10, group=0x7f2b2c083aa8, win_specs=..., win_funcs=..., hidden_group_fields=0x7f2b2c01516f, reserved=0x7f2b2c08177c) at /data/src/bb-10.3-temporal/sql/sql_select.cc:665
      #8  0x000055a52baa9846 in JOIN::prepare (this=0x7f2b2c014e88, tables_init=0x7f2b2c0825f0, wild_num=0, conds_init=0x7f2b2c0865e0, og_num=2, order_init=0x7f2b2c083c10, skip_order_by=false, group_init=0x7f2b2c083aa8, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f2b2c0814a8, unit_arg=0x7f2b2c080d48) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1237
      #9  0x000055a52bab449b in mysql_select (thd=0x7f2b2c000b00, tables=0x7f2b2c0825f0, wild_num=0, fields=..., conds=0x7f2b2c0865e0, og_num=2, order=0x7f2b2c083c10, group=0x7f2b2c083aa8, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f2b2c083c68, unit=0x7f2b2c080d48, select_lex=0x7f2b2c0814a8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4229
      #10 0x000055a52baa656c in handle_select (thd=0x7f2b2c000b00, lex=0x7f2b2c080c80, result=0x7f2b2c083c68, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:380
      #11 0x000055a52ba7178f in execute_sqlcom_select (thd=0x7f2b2c000b00, all_tables=0x7f2b2c0825f0) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6532
      #12 0x000055a52ba67df6 in mysql_execute_command (thd=0x7f2b2c000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
      #13 0x000055a52ba92cad in Prepared_statement::execute (this=0x7f2b2c181750, expanded_query=0x7f2b3df97430, open_cursor=false) at /data/src/bb-10.3-temporal/sql/sql_prepare.cc:4682
      #14 0x000055a52ba910ca in Prepared_statement::execute_loop (this=0x7f2b2c181750, expanded_query=0x7f2b3df97430, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/bb-10.3-temporal/sql/sql_prepare.cc:4111
      #15 0x000055a52ba8ed18 in mysql_sql_stmt_execute (thd=0x7f2b2c000b00) at /data/src/bb-10.3-temporal/sql/sql_prepare.cc:3218
      #16 0x000055a52ba67e3b in mysql_execute_command (thd=0x7f2b2c000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3765
      #17 0x000055a52ba750e4 in mysql_parse (thd=0x7f2b2c000b00, rawbuf=0x7f2b2c014c48 "EXECUTE stmt", length=12, parser_state=0x7f2b3df985f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7988
      #18 0x000055a52ba628a7 in dispatch_command (command=COM_QUERY, thd=0x7f2b2c000b00, packet=0x7f2b2c11ee21 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1826
      #19 0x000055a52ba612db in do_command (thd=0x7f2b2c000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1371
      #20 0x000055a52bbc7ada in do_handle_one_connection (connect=0x55a52e12b620) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #21 0x000055a52bbc7867 in handle_one_connection (arg=0x55a52e12b620) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #22 0x000055a52c05dcfc in pfs_spawn_thread (arg=0x55a52e133590) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #23 0x00007f2b45a00494 in start_thread (arg=0x7f2b3df99700) at pthread_create.c:333
      #24 0x00007f2b43de693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with MyISAM, InnoDB.
      Not reproducible without versioning on the 2nd table.

        Attachments

          Activity

            People

            Assignee:
            kevg Eugene Kosov (Inactive)
            Reporter:
            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.