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

Assertion `table_list->table' failed in find_field_in_table_ref

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (f INT);
      INSERT INTO t1 VALUES (1),(2); # Optional
       
      CREATE ALGORITHM = MERGE VIEW v1 AS SELECT * FROM t1;
      CREATE ALGORITHM = TEMPTABLE VIEW v2 AS SELECT * FROM t1;
       
      PREPARE ps FROM 'SELECT * FROM v1 RIGHT JOIN v2 ON v1.f = v2.f';
      EXECUTE ps;
      EXECUTE ps;
       
      # Cleanup
      DROP VIEW v1, v2;
      DROP TABLE t1;
      

      10.3 b8c92d752c34

      mysqld: /data/src/10.3/sql/sql_base.cc:5793: Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, uint, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**): Assertion `table_list->table' failed.
      180128 17:47:21 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f71d4458ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000564496136194 in find_field_in_table_ref (thd=0x7f71bc000b00, table_list=0x7f71bc076960, name=0x7f71bc077128 "f", length=1, item_name=0x7f71bc077128 "f", db_name=0x0, table_name=0x0, ref=0x7f71bc0772d0, check_privileges=true, allow_rowid=true, cached_field_index_ptr=0x7f71bc077204, register_tree_change=true, actual_table=0x7f71ce6c39e8) at /data/src/10.3/sql/sql_base.cc:5793
      #9  0x00005644961369ff in find_field_in_tables (thd=0x7f71bc000b00, item=0x7f71bc077130, first_table=0x7f71bc0762e0, last_table=0x7f71bc076960, ref=0x7f71bc0772d0, report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /data/src/10.3/sql/sql_base.cc:6024
      #10 0x00005644964c1e0f in Item_field::fix_fields (this=0x7f71bc077130, thd=0x7f71bc000b00, reference=0x7f71bc0772d0) at /data/src/10.3/sql/item.cc:6074
      #11 0x0000564496516597 in Item_func::fix_fields (this=0x7f71bc077238, thd=0x7f71bc000b00, ref=0x7f71bc076320) at /data/src/10.3/sql/item_func.cc:361
      #12 0x000056449613b9ec in setup_on_expr (thd=0x7f71bc000b00, table=0x7f71bc0794b0, is_update=false) at /data/src/10.3/sql/sql_base.cc:7922
      #13 0x000056449613bf32 in setup_conds (thd=0x7f71bc000b00, tables=0x7f71bc0794b0, leaves=..., conds=0x7f71bc0158a8) at /data/src/10.3/sql/sql_base.cc:8040
      #14 0x00005644961f22f8 in setup_without_group (thd=0x7f71bc000b00, ref_pointer_array=..., tables=0x7f71bc0794b0, leaves=..., fields=..., all_fields=..., conds=0x7f71bc0158a8, order=0x0, group=0x0, win_specs=..., win_funcs=..., hidden_group_fields=0x7f71bc015787, reserved=0x7f71bc07868c) at /data/src/10.3/sql/sql_select.cc:643
      #15 0x00005644961f4b8d in JOIN::prepare (this=0x7f71bc0154a0, tables_init=0x7f71bc0794b0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f71bc0783b8, unit_arg=0x7f71bc077c60) at /data/src/10.3/sql/sql_select.cc:1217
      #16 0x00005644962a255b in st_select_lex_unit::prepare_join (this=0x7f71bc077c60, thd_arg=0x7f71bc000b00, sl=0x7f71bc0783b8, tmp_result=0x7f71bc0153b8, additional_options=0, is_union_select=false) at /data/src/10.3/sql/sql_union.cc:675
      #17 0x00005644962a3912 in st_select_lex_unit::prepare (this=0x7f71bc077c60, thd_arg=0x7f71bc000b00, sel_result=0x7f71bc0153b8, additional_options=0) at /data/src/10.3/sql/sql_union.cc:947
      #18 0x0000564496173e87 in mysql_derived_prepare (thd=0x7f71bc000b00, lex=0x7f71bc0749a0, derived=0x7f71bc0762e0) at /data/src/10.3/sql/sql_derived.cc:755
      #19 0x0000564496172c6b in mysql_handle_single_derived (lex=0x7f71bc0749a0, derived=0x7f71bc0762e0, phases=2) at /data/src/10.3/sql/sql_derived.cc:197
      #20 0x00005644962d02e8 in TABLE_LIST::handle_derived (this=0x7f71bc0762e0, lex=0x7f71bc0749a0, phases=2) at /data/src/10.3/sql/table.cc:8077
      #21 0x0000564496195c84 in st_select_lex::handle_derived (this=0x7f71bc0751c0, lex=0x7f71bc0749a0, phases=2) at /data/src/10.3/sql/sql_lex.cc:4036
      #22 0x00005644961f44dd in JOIN::prepare (this=0x7f71bc014e50, tables_init=0x7f71bc0762e0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f71bc0751c0, unit_arg=0x7f71bc074a68) at /data/src/10.3/sql/sql_select.cc:1106
      #23 0x00005644961ff8f9 in mysql_select (thd=0x7f71bc000b00, tables=0x7f71bc0762e0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f71bc077a88, unit=0x7f71bc074a68, select_lex=0x7f71bc0751c0) at /data/src/10.3/sql/sql_select.cc:4236
      #24 0x00005644961f18fc in handle_select (thd=0x7f71bc000b00, lex=0x7f71bc0749a0, result=0x7f71bc077a88, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:379
      #25 0x00005644961bc6fc in execute_sqlcom_select (thd=0x7f71bc000b00, all_tables=0x7f71bc0762e0) at /data/src/10.3/sql/sql_parse.cc:6530
      #26 0x00005644961b2de6 in mysql_execute_command (thd=0x7f71bc000b00) at /data/src/10.3/sql/sql_parse.cc:3751
      #27 0x00005644961dde0f in Prepared_statement::execute (this=0x7f71bc06f410, expanded_query=0x7f71ce6c6410, open_cursor=false) at /data/src/10.3/sql/sql_prepare.cc:4736
      #28 0x00005644961dc212 in Prepared_statement::execute_loop (this=0x7f71bc06f410, expanded_query=0x7f71ce6c6410, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/10.3/sql/sql_prepare.cc:4165
      #29 0x00005644961d9e06 in mysql_sql_stmt_execute (thd=0x7f71bc000b00) at /data/src/10.3/sql/sql_prepare.cc:3271
      #30 0x00005644961b2e2b in mysql_execute_command (thd=0x7f71bc000b00) at /data/src/10.3/sql/sql_parse.cc:3767
      #31 0x00005644961c0050 in mysql_parse (thd=0x7f71bc000b00, rawbuf=0x7f71bc014c38 "EXECUTE ps", length=10, parser_state=0x7f71ce6c75f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7987
      #32 0x00005644961ad87f in dispatch_command (command=COM_QUERY, thd=0x7f71bc000b00, packet=0x7f71bc00b141 "EXECUTE ps", packet_length=10, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1826
      #33 0x00005644961ac2b3 in do_command (thd=0x7f71bc000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #34 0x00005644963137e8 in do_handle_one_connection (connect=0x564498a15e80) at /data/src/10.3/sql/sql_connect.cc:1401
      #35 0x0000564496313575 in handle_one_connection (arg=0x564498a15e80) at /data/src/10.3/sql/sql_connect.cc:1307
      #36 0x00005644967b11b4 in pfs_spawn_thread (arg=0x564498a31660) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #37 0x00007f71d612f494 in start_thread (arg=0x7f71ce6c8700) at pthread_create.c:333
      #38 0x00007f71d451593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            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.