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

Server crash in find_field_in_table

    XMLWordPrintable

Details

    Description

      How to trigger

      CREATE TABLE t0 ( c0 MIDDLEINT UNIQUE AUTO_INCREMENT PRIMARY KEY ) WITH SYSTEM VERSIONING ;
      SELECT ( SELECT ca3 FROM ( SELECT ra2 . ca4 ca3 FROM t0 ra3 ) FOR SYSTEM_TIME AS OF NOW ra4 ) AS ca2 FROM ( SELECT ra1 . c0 ca4 FROM t0 ra1 ORDER BY ra1 . c0 LIMIT 1 ) AS ra2 ;
      

      Sever error log

      Server version: 10.11.5-MariaDB source revision: 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=2
      max_threads=153
      thread_count=22
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468037 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fe7940225e8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fe7b00cedb0 thread_stack 0x49000
      mysys/stacktrace.c:215(my_print_stacktrace)[0x55f205038be8]
      sql/signal_handler.cc:241(handle_fatal_signal)[0x55f2048a5623]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7fe7c811d980]
      sql/sql_base.cc:6308(find_field_in_table(THD*, TABLE*, char const*, unsigned long, bool, unsigned short*))[0x55f2044615d7]
      sql/sql_base.cc:6473(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned long, char const*, char const*, char const*, List<TABLE_LIST>*, Item**, bool, bool, unsigned short*, bool, TABLE_LIST**))[0x55f2044620f3]
      sql/sql_base.cc:6790(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, List<TABLE_LIST>*, Item**, find_item_error_report_type, bool, bool))[0x55f2044632f7]
      sql/item.cc:6020(Item_field::fix_fields(THD*, Item**))[0x55f2048d6bfe]
      sql/item.h:1147(Vers_history_point::check_unit(THD*))[0x55f2046886b3]
      sql/table.cc:10355(vers_select_conds_t::check_units(THD*))[0x55f2046885f6]
      sql/sql_select.cc:1268(st_select_lex::vers_setup_conds(THD*, TABLE_LIST*))[0x55f204566253]
      sql/sql_select.cc:1415(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55f204566a15]
      sql/sql_union.cc:1105(st_select_lex_unit::prepare_join(THD*, st_select_lex*, select_result*, unsigned long long, bool))[0x55f204644dd7]
      sql/sql_union.cc:1498(st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long long))[0x55f20463ea14]
      sql/sql_derived.cc:840(mysql_derived_prepare(THD*, LEX*, TABLE_LIST*))[0x55f2044a6c38]
      sql/sql_derived.cc:200(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55f2044a984e]
      sql/table.cc:9523(TABLE_LIST::handle_derived(LEX*, unsigned int))[0x55f2046844cf]
      sql/sql_lex.h:4500(LEX::handle_list_of_derived(TABLE_LIST*, unsigned int))[0x55f2044a5fd1]
      sql/sql_select.cc:1397(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55f20456693f]
      sql/item_subselect.cc:3888(subselect_single_select_engine::prepare(THD*))[0x55f2049e138e]
      sql/item_subselect.cc:295(Item_subselect::fix_fields(THD*, Item**))[0x55f2049d37cd]
      sql/item.h:1147(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x55f2043e18f0]
      sql/sql_base.cc:8014(setup_fields(THD*, Bounds_checked_array<Item*>, List<Item>&, enum_column_usage, List<Item>*, List<Item>*, bool))[0x55f204465a3f]
      sql/sql_select.cc:1484(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55f204566f8e]
      sql/sql_select.cc:5087(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55f2045630c3]
      sql/sql_select.cc:586(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x55f204562e69]
      sql/sql_parse.cc:4728(mysql_execute_command(THD*, bool))[0x55f204512e43]
      sql/sql_parse.cc:8051(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55f204502e17]
      sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55f2044ffe0f]
      sql/sql_parse.cc:1407(do_command(THD*, bool))[0x55f2045033fe]
      sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x55f2046ca783]
      sql/sql_connect.cc:1322(handle_one_connection)[0x55f2046ca407]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55f204ba7d23]
      nptl/pthread_create.c:463(start_thread)[0x7fe7c81126db]
      x86_64/clone.S:97(clone)[0x7fe7c761261f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fe794029060): REPLACE INTO t0 SELECT ( SELECT MIN( ra4 . ca3 ) ca1 FROM ( SELECT ra2 . ca4 ca3 FROM t0 ra3 ) FOR SYSTEM_TIME AS OF NOW ra4 ) AS ca2 FROM ( SELECT ra1 . c0 ca4 FROM t0 ra1 ORDER BY ra1 . c0 LIMIT 1 ) AS ra2
       
      Connection ID (thread ID): 44288
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              wulian jiaqi
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.