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

LP:608834 - RQG: Crash in copy_fields() with subquery cache enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The query for this bug is a superset of the query for bug #608824, but the backtrace is different. For some reason, automatic simplification was not possible so the originally generated, unsimplified query will be provided for this report.

      backtrace:

      #3 0x0827e8f8 in handle_segfault (sig=11) at mysqld.cc:2703
      #4 <signal handler called>
      #5 0x08327aa1 in copy_fields (param=0xb5e7877c) at sql_select.cc:17246
      #6 0x083202ab in end_send_group (join=0xb5e73ae8, join_tab=0xb5e8b438, end_of_records=false) at sql_select.cc:14236
      #7 0x0831df08 in evaluate_join_record (join=0xb5e73ae8, join_tab=0xb5e8b278, error=0) at sql_select.cc:13294
      #8 0x0831d8af in sub_select (join=0xb5e73ae8, join_tab=0xb5e8b278, end_of_records=false) at sql_select.cc:13103
      #9 0x0831df08 in evaluate_join_record (join=0xb5e73ae8, join_tab=0xb5e8b0b8, error=0) at sql_select.cc:13294
      #10 0x0831d8af in sub_select (join=0xb5e73ae8, join_tab=0xb5e8b0b8, end_of_records=false) at sql_select.cc:13103
      #11 0x0831ccae in do_select (join=0xb5e73ae8, fields=0xb5e78888, table=0x0, procedure=0x0) at sql_select.cc:12649
      #12 0x083030cf in JOIN::exec (this=0xb5e73ae8) at sql_select.cc:2355
      #13 0x082352b1 in subselect_single_select_engine::exec (this=0xb5e5e0f8) at item_subselect.cc:2716
      #14 0x0822f9e3 in Item_subselect::exec (this=0xb5e5e038) at item_subselect.cc:481
      #15 0x082308cd in Item_singlerow_subselect::val_int (this=0xb5e5e038) at item_subselect.cc:918
      #16 0x081cf2fc in Item::val_int_result (this=0xb5e5e038) at item.h:779
      #17 0x081cb196 in Item_cache_int::cache_value (this=0xb5e882c0) at item.cc:7712
      #18 0x081d2f4c in Item_cache_wrapper::cache (this=0xb5e88260) at item.cc:6725
      #19 0x081c8812 in Item_cache_wrapper::val_int (this=0xb5e88260) at item.cc:6779
      #20 0x081cf2fc in Item::val_int_result (this=0xb5e88260) at item.h:779
      #21 0x083c2cbc in make_sortkey (param=0xb6d48c18,
      to=0xb5eeb216 "\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"...,
      ref_pos=0xb5ead4a8 "\030\236\300\265\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245h4z\025\355\003") at filesort.cc:852
      #22 0x083c2318 in find_all_keys (param=0xb6d48c18, select=0x0, sort_keys=0xb5ee9c08, buffpek_pointers=0xb6d48a50, tempfile=0xb6d48b34, indexfile=0x0)
      at filesort.cc:625
      #23 0x083c0ed1 in filesort (thd=0xa274fd0, table=0xb5eac240, sortorder=0xb5ecd488, s_length=4, select=0x0, max_rows=18446744073709551615,
      sort_positions=false, examined_rows=0xb6d48d80) at filesort.cc:246
      #24 0x08324a74 in create_sort_index (thd=0xa274fd0, join=0xb5e69e08, order=0xb5e60e58, filesort_limit=18446744073709551615,
      select_limit=18446744073709551615, is_order_by=false) at sql_select.cc:15849
      #25 0x08301d02 in JOIN::exec (this=0xb5e69e08) at sql_select.cc:2068
      #26 0x08303802 in mysql_select (thd=0xa274fd0, rref_pointer_array=0xa276a44, tables=0xb5e5e840, wild_num=0, fields=..., conds=0xb5e60c40, og_num=12,
      order=0xb5e611d0, group=0xb5e60d88, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb5e616f8, unit=0xa2766a8, select_lex=0xa276940)
      at sql_select.cc:2556
      #27 0x082fbecf in handle_select (thd=0xa274fd0, lex=0xa27664c, result=0xb5e616f8, setup_tables_done_option=0) at sql_select.cc:276
      #28 0x0829a5f0 in execute_sqlcom_select (thd=0xa274fd0, all_tables=0xb5e5e840) at sql_parse.cc:5081
      #29 0x08290fd0 in mysql_execute_command (thd=0xa274fd0) at sql_parse.cc:2265
      #30 0x0829c7d1 in mysql_parse (thd=0xa274fd0,
      inBuf=0xb5e31900 "/* cache is on */ SELECT (\nSELECT 4\nFROM DUAL ) AS field1 , SUM( DISTINCT table1 . `pk` ) AS field2 , (\nSELECT MAX( SUBQUERY2_t1 . `col_int_nokey` ) AS SUBQUERY2_field1\nFROM ( C AS SUBQUERY2_t"..., length=1049, found_semicolon=0xb6d4a230) at sql_parse.cc:6027
      #31 0x0828ea02 in dispatch_command (command=COM_QUERY, thd=0xa274fd0,
      packet=0xa28d329 "/* cache is on */ SELECT (\nSELECT 4\nFROM DUAL ) AS field1 , SUM( DISTINCT table1 . `pk` ) AS field2 , (\nSELECT MAX( SUBQUERY2_t1 . `col_int_nokey` ) AS SUBQUERY2_field1\nFROM ( C AS SUBQUERY2_t"..., packet_length=1050) at sql_parse.cc:1184
      #32 0x0828dea8 in do_command (thd=0xa274fd0) at sql_parse.cc:890
      #33 0x0828b008 in handle_one_connection (arg=0xa274fd0) at sql_connect.cc:1153
      #34 0x00a08919 in start_thread () from /lib/libpthread.so.0
      #35 0x00951e5e in clone () from /lib/libc.so.6

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.