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

Assertion failed in find_field_in_table_ref

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 11.3.2
    • N/A
    • Server
    • None

    Description

      After executing the following statements, the server crashed.

      CREATE OR REPLACE TABLE t1 ( c1 INT );
      SELECT ca5 FROM (SELECT c1 AS ca5 FROM t1 GROUP BY ca5) AS ta2 JOIN (SELECT c1 AS ca10 FROM t1) AS ta3 ON ca5 <= DEFAULT(ca10);
      

      I got the following trace.

      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737288267328) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=140737288267328) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=140737288267328, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x00007ffff7558476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00007ffff753e7f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007ffff753e71b in __assert_fail_base (fmt=0x7ffff76f3130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555556e30235 "name",
          file=0x555556e2db30 "/home/jellyfish/mariadb-11.3.2/sql/sql_base.cc", line=6476, function=<optimized out>) at ./assert/assert.c:92
      #6  0x00007ffff754fe96 in __GI___assert_fail (assertion=0x555556e30235 "name", file=0x555556e2db30 "/home/jellyfish/mariadb-11.3.2/sql/sql_base.cc", line=6476,
          function=0x555556e30178 "Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, size_t, const char*, const char*, const char*, ignored_tables_list_t, Item**, bool, bool, field_index_t*, bool, TABLE_LIST**)") at ./assert/assert.c:101
      #7  0x0000555555eeb661 in find_field_in_table_ref (thd=0x7fffa4000dc8, table_list=0x7fffa40162c8, name=0x0, length=0, item_name=0x0, db_name=0x0, table_name=0x0, ignored_tables=0x0,
          ref=0x7fffa4071de8, check_privileges=true, allow_rowid=false, cached_field_index_ptr=0x7fffa4071d30, register_tree_change=true, actual_table=0x7ffff412b9e8)
          at /home/jellyfish/mariadb-11.3.2/sql/sql_base.cc:6476
      #8  0x0000555555eec71d in find_field_in_tables (thd=0x7fffa4000dc8, item=0x7fffa4071c40, first_table=0x7fffa40162c8, last_table=0x0, ignored_tables=0x0, ref=0x7fffa4071de8,
          report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /home/jellyfish/mariadb-11.3.2/sql/sql_base.cc:6855
      #9  0x00005555563ed402 in Item_field::fix_fields (this=0x7fffa4071c40, thd=0x7fffa4000dc8, reference=0x7fffa4071de8) at /home/jellyfish/mariadb-11.3.2/sql/item.cc:6033
      #10 0x0000555555e6b1e2 in Item::fix_fields_if_needed (this=0x7fffa4071c40, thd=0x7fffa4000dc8, ref=0x7fffa4071de8) at /home/jellyfish/mariadb-11.3.2/sql/item.h:1166
      #11 0x000055555644a61e in Item_func::fix_fields (this=0x7fffa4071d60, thd=0x7fffa4000dc8, ref=0x7fffa4070600) at /home/jellyfish/mariadb-11.3.2/sql/item_func.cc:359
      #12 0x000055555600c75f in JOIN::optimize_inner (this=0x7fffa40703f0) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:2350
      #13 0x000055555600b1c3 in JOIN::optimize (this=0x7fffa40703f0) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:1966
      #14 0x0000555555f3d11e in mysql_derived_optimize (thd=0x7fffa4000dc8, lex=0x7fffa4005170, derived=0x7fffa40162c8) at /home/jellyfish/mariadb-11.3.2/sql/sql_derived.cc:1037
      #15 0x0000555555f3abcf in mysql_handle_single_derived (lex=0x7fffa4005170, derived=0x7fffa40162c8, phases=4) at /home/jellyfish/mariadb-11.3.2/sql/sql_derived.cc:200
      #16 0x000055555600d03d in JOIN::optimize_inner (this=0x7fffa406fb40) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:2473
      #17 0x000055555600b1c3 in JOIN::optimize (this=0x7fffa406fb40) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:1966
      #18 0x0000555556017487 in mysql_select (thd=0x7fffa4000dc8, tables=0x7fffa40162c8, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
          select_options=2164525824, result=0x7fffa406fb18, unit=0x7fffa4005250, select_lex=0x7fffa4014548) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:5290
      #19 0x00005555560059eb in handle_select (thd=0x7fffa4000dc8, lex=0x7fffa4005170, result=0x7fffa406fb18, setup_tables_done_option=0) at /home/jellyfish/mariadb-11.3.2/sql/sql_select.cc:630
      #20 0x0000555555fa8969 in execute_sqlcom_select (thd=0x7fffa4000dc8, all_tables=0x7fffa40162c8) at /home/jellyfish/mariadb-11.3.2/sql/sql_parse.cc:6094
      #21 0x0000555555fa07bb in mysql_execute_command (thd=0x7fffa4000dc8, is_called_from_prepared_stmt=false) at /home/jellyfish/mariadb-11.3.2/sql/sql_parse.cc:3943
      #22 0x0000555555fad976 in mysql_parse (thd=0x7fffa4000dc8,
          rawbuf=0x7fffa40143f0 "SELECT ca5 FROM (SELECT c1 AS ca5 FROM t1 GROUP BY ca5) AS ta2 JOIN (SELECT c1 AS ca10 FROM t1) AS ta3 ON ca5 <= DEFAULT(ca10)", length=126,
          parser_state=0x7ffff412d2b0) at /home/jellyfish/mariadb-11.3.2/sql/sql_parse.cc:7815
      #23 0x0000555555f9a2c5 in dispatch_command (command=COM_QUERY, thd=0x7fffa4000dc8,
          packet=0x7fffa400bbc9 "SELECT ca5 FROM (SELECT c1 AS ca5 FROM t1 GROUP BY ca5) AS ta2 JOIN (SELECT c1 AS ca10 FROM t1) AS ta3 ON ca5 <= DEFAULT(ca10)", packet_length=126,
          blocking=true) at /home/jellyfish/mariadb-11.3.2/sql/sql_parse.cc:1893
      #24 0x0000555555f98c0b in do_command (thd=0x7fffa4000dc8, blocking=true) at /home/jellyfish/mariadb-11.3.2/sql/sql_parse.cc:1406
      #25 0x0000555556194732 in do_handle_one_connection (connect=0x555558b345c8, put_in_cache=true) at /home/jellyfish/mariadb-11.3.2/sql/sql_connect.cc:1437
      #26 0x000055555619449b in handle_one_connection (arg=0x555558b345c8) at /home/jellyfish/mariadb-11.3.2/sql/sql_connect.cc:1339
      #27 0x000055555672aa05 in pfs_spawn_thread (arg=0x555558b30658) at /home/jellyfish/mariadb-11.3.2/storage/perfschema/pfs.cc:2201
      #28 0x00007ffff75aaac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007ffff763c850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              John Jove John Jove
              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.