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

Assertion `table_ref->table || table_ref->view' failed in Field_iterator_table_ref::set_field_iterator

    Details

      Description

      prepare stmt from "CREATE TABLE  tt  AS 
      WITH cte1 AS (SELECT * FROM (SELECT 1) AS A) SELECT * FROM cte1;";
      

      mysqld: /10.4/sql/table.cc:6050: void Field_iterator_table_ref::set_field_iterator(): Assertion `table_ref->table || table_ref->view' failed.

       10.4 befc09f00263d5375b2bb2e
      assert/assert.c:92(__assert_fail_base)[0x7f48f401bbd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f48f401bc82]
      sql/table.cc:6051(Field_iterator_table_ref::set_field_iterator())[0x55fc7a51adf2]
      sql/table.cc:6068(Field_iterator_table_ref::set(TABLE_LIST*))[0x55fc7a51b1fb]
      sql/sql_base.cc:7778(insert_fields(THD*, Name_resolution_context*, char const*, char const*, List_iterator<Item>*, bool, unsigned int*))[0x55fc7a13c13b]
      sql/sql_base.cc:7232(setup_wild(THD*, TABLE_LIST*, List<Item>&, List<Item>*, unsigned int, unsigned int*))[0x55fc7a138ab3]
      sql/sql_select.cc:1088(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55fc7a3072ab]
      sql/sql_union.cc:654(st_select_lex_unit::prepare_join(THD*, st_select_lex*, select_result*, unsigned long, bool))[0x55fc7a4b5311]
      sql/sql_union.cc:977(st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long))[0x55fc7a4b81b4]
      sql/sql_derived.cc:767(mysql_derived_prepare(THD*, LEX*, TABLE_LIST*))[0x55fc7a1c23ab]
      sql/sql_derived.cc:122(mysql_handle_derived(LEX*, unsigned int))[0x55fc7a1bf1bf]
      sql/sql_base.cc:5012(open_normal_and_derived_tables(THD*, TABLE_LIST*, unsigned int, unsigned int))[0x55fc7a12cacb]
      sql/sql_prepare.cc:1778(mysql_test_create_table(Prepared_statement*))[0x55fc7a2c4e0b]
      sql/sql_prepare.cc:2332(check_prepared_statement(Prepared_statement*))[0x55fc7a2c779c]
      sql/sql_prepare.cc:3986(Prepared_statement::prepare(char const*, unsigned int))[0x55fc7a2d03d3]
      sql/sql_prepare.cc:2819(mysql_sql_stmt_prepare(THD*))[0x55fc7a2c9717]
      sql/sql_parse.cc:3780(mysql_execute_command(THD*))[0x55fc7a2750a5]
      sql/sql_parse.cc:8064(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55fc7a28eca5]
      sql/sql_parse.cc:1849(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55fc7a269dcb]
      sql/sql_parse.cc:1392(do_command(THD*))[0x55fc7a266f63]
      sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x55fc7a5b7768]
      sql/sql_connect.cc:1309(handle_one_connection)[0x55fc7a5b7145]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x55fc7b8da513]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f48f4c606ba]
      x86_64/clone.S:111(clone)[0x7f48f40f541d]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                alice Alice Sherepa
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: