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

Assertion in '(*select_ref)->fixed' failed

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.4
    • None
    • None

    Description

      This test fails:

      CREATE TABLE t1(a INT, b INT, c INT, d INT);
      CREATE TABLE t2 (x INT, y BLOB, z BLOB, w BLOB);
       
      INSERT INTO t1 VALUES (1,2,1,1),(1,3,0,4),(2,4,2,2);
      INSERT INTO t2 VALUES (2,'aab','aab','x'),(1,'aa','b','.'),
                            (1,'ddd','n ','s'), (1,'ddd','ddd ','d');
       
      SELECT (
        SELECT (
          SELECT t1_out.a
          FROM t1 AS t1_in
          GROUP BY t1_in.a
          HAVING t1_out.a > 1
          LIMIT 1
        )
        FROM t1 AS t1_out
        GROUP BY t1_out.a
        LIMIT 1
      ) FROM t2 GROUP BY t2.x;
       
      drop table t1,t2;
      

      mysqld: /home/galina/mariadb/5.5-mariadb/sql/item.cc:4629: Item** resolve_ref_in_select_and_group(THD*, Item_ident*, SELECT_LEX*): Assertion `(*select_ref)->fixed' failed.
      190702 11:20:40 [ERROR] mysqld got signal 6 ;
       
      stdlib/abort.c:81(__GI_abort)[0x7ff382c82801]
      assert/assert.c:89(__assert_fail_base)[0x7ff382c7239a]
      /lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7ff382c72412]
      sql/item.cc:4630(resolve_ref_in_select_and_group(THD*, Item_ident*, st_select_lex*))[0x55db67f738c2]
      sql/item.cc:6826(Item_ref::fix_fields(THD*, Item**))[0x55db67f7938e]
      sql/item_func.cc:204(Item_func::fix_fields(THD*, Item**))[0x55db67fb4525]
      sql/sql_select.cc:770(JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55db67dbfbb0]
      sql/item_subselect.cc:3084(subselect_single_select_engine::prepare(THD*))[0x55db67ff7bab]
      sql/item_subselect.cc:249(Item_subselect::fix_fields(THD*, Item**))[0x55db67fef5c0]
      sql/sql_base.cc:8206(setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, List<Item>*, bool))[0x55db67d34b3c]
      sql/sql_select.cc:732(JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55db67dbf7a9]
      sql/item_subselect.cc:3084(subselect_single_select_engine::prepare(THD*))[0x55db67ff7bab]
      sql/item_subselect.cc:249(Item_subselect::fix_fields(THD*, Item**))[0x55db67fef5c0]
      sql/sql_base.cc:8206(setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, List<Item>*, bool))[0x55db67d34b3c]
      sql/sql_select.cc:732(JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55db67dbf7a9]
      sql/sql_select.cc:3111(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55db67dc888f]
      sql/sql_select.cc:311(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55db67dbe8b8]
      sql/sql_parse.cc:4680(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55db67d94b63]
      sql/sql_parse.cc:2225(mysql_execute_command(THD*))[0x55db67d8d600]
      sql/sql_parse.cc:5925(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55db67d97a87]
      sql/sql_parse.cc:1069(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x55db67d8a9a4]
      sql/sql_parse.cc:793(do_command(THD*))[0x55db67d89b45]
      sql/sql_connect.cc:1268(do_handle_one_connection(THD*))[0x55db67e9fe01]
      sql/sql_connect.cc:1185(handle_one_connection)[0x55db67e9fb6b]
      perfschema/pfs.cc:1017(pfs_spawn_thread)[0x55db6825a7e2]
      nptl/pthread_create.c:463(start_thread)[0x7ff3839656db]
      x86_64/clone.S:97(clone)[0x7ff382d6388f]
       
      Query (0x7ff374007688): SELECT ( SELECT ( SELECT t1_out.a FROM t1 AS t1_in GROUP BY t1_in.a HAVING t1_out.a > 1 LIMIT 1 ) FROM t1 AS t1_out GROUP BY t1_out.a LIMIT 1 ) FROM t2 GROUP BY t2.x
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            shagalla Galina Shalygina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.