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

update of a joined table with a nested subquery with a syntax error crashes mysqld with signal 11

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.4, 5.3.12, 5.5.33a
    • 5.5.34, 10.0.6, 5.3.13
    • None
    • None
    • RHEL 6.4

    Description

      The following example causes my mysqld process to crash and restart:

      create table t1 (id int(11) not null auto_increment, val varchar(100) null,primary key (id)) engine=innodb;
      create table t2 (id int(11) not null auto_increment, val varchar(100) null,primary key (id)) engine=innodb;
       
      insert into t1 (val) values('a');
      insert into t2 (val) values('1');
       
      update 
          (
              select 
                  val
              from
                  (
                      select 
                          v.val
                      from 
                          t2 wrong_table_alias
                  ) t4
          ) t3
          inner join t1 on 
              t1.id=t3.val
      set 
          t1.val=t3.val
      ;

      will cause the client to report:
      ERROR 2013 (HY000): Lost connection to MySQL server during query

      with the following appearing in the mysql-error.log

      Server version: 5.5.32-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=2
      max_threads=502
      thread_count=1
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1232371 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x11bacd30
      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 = 0x7f59a050bd78 thread_stack 0x48000
      ??:0(my_print_stacktrace)[0xa8631e]
      ??:0(handle_fatal_signal)[0x6cdd0b]
      ??:0(??)[0x35e4e0f500]
      ??:0(find_field_in_table(THD*, TABLE*, char const*, unsigned int, bool, unsigned int*))[0x544132]
      ??:0(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned int, char const*, char const*, char const*, Item**, bool, bool, unsigned int*, bool, TABLE_LIST**))[0x544c6f]
      ??:0(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, Item**, find_item_error_report_type, bool, bool))[0x545002]
      ??:0(Item_field::fix_fields(THD*, Item**))[0x6eca07]
      ??:0(setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool))[0x53fe33]
      ??:0(JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x5bd599]
      ??:0(st_select_lex_unit::prepare(THD*, select_result*, unsigned long))[0x60dd8a]
      ??:0(mysql_derived_prepare(THD*, LEX*, TABLE_LIST*))[0x56886e]
      ??:0(mysql_handle_derived(LEX*, unsigned int))[0x569892]
      ??:0(mysql_multi_update_prepare(THD*))[0x6102dd]
      ??:0(mysql_execute_command(THD*))[0x58b08d]
      ??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x58e369]
      ??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x58f790]
      ??:0(do_handle_one_connection(THD*))[0x647cdf]
      ??:0(handle_one_connection)[0x647d7c]
      ??:0(??)[0x35e4e07851]
      ??:0(??)[0x35e4ae890d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f5994004c38): is an invalid pointer
      Connection ID (thread ID): 2
      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=off,table_elimination=on,extended_keys=off
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            mikemacd Michael MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            6 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.