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

Server crashes in _ma_unpin_all_pages with SELECT SQ and FROM SQ or MERGE view, Aria tables

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.0, 5.5
    • Fix Version/s: 10.1, 10.0, 5.5
    • Component/s: Storage Engine - Aria
    • Labels:
      None

      Description

      Note: The test case looks very similar to MDEV-7848, so maybe it's the same problem; but the stack trace is different, so I'm filing it separately, just in case.

      CREATE TABLE t1 (i INT, KEY(i)) ENGINE=Aria;
      INSERT INTO t1 VALUES (1);
      
      CREATE TABLE t2 (f INT) ENGINE=Aria;
      
      SELECT ( SELECT MIN( sq.i ) FROM t2 ) FROM (SELECT * FROM t1) sq;
      
      Stack trace from 5.5 commit 6264451f25143c43e1ad8e045054b720effaf8cb
      #3  <signal handler called>
      #4  _ma_unpin_all_pages (info=0x7ffa4353f060, undo_lsn=0) at 5.5/storage/maria/ma_key_recover.c:71
      #5  0x0000000000bd1290 in _ma_search (info=0x7ffa4353f060, key=0x7ffa43fb34c0, nextflag=42, pos=8192) at 5.5/storage/maria/ma_search.c:93
      #6  0x0000000000bcfe5e in maria_rkey (info=0x7ffa4353f060, buf=0x7ffa43458a78 "\375\001", inx=0, key_data=0x7ffa43fb3700 "\001\067\373C\372\177", keypart_map=1, search_flag=HA_READ_AFTER_KEY) at 5.5/storage/maria/ma_rkey.c:103
      #7  0x0000000000b8bb3e in ha_maria::index_read_map (this=0x7ffa43478078, buf=0x7ffa43458a78 "\375\001", key=0x7ffa43fb3700 "\001\067\373C\372\177", keypart_map=1, find_flag=HA_READ_AFTER_KEY) at 5.5/storage/maria/ha_maria.cc:2300
      #8  0x00000000005cfb0a in handler::ha_index_read_map (this=0x7ffa43478078, buf=0x7ffa43458a78 "\375\001", key=0x7ffa43fb3700 "\001\067\373C\372\177", keypart_map=1, find_flag=HA_READ_AFTER_KEY) at 5.5/sql/sql_class.h:4211
      #9  0x00000000009098bc in get_index_min_value (table=0x7ffa435ae460, ref=0x7ffa43fb3690, item_field=0x7ffa4356ac88, range_fl=6, prefix_len=0) at 5.5/sql/opt_sum.cc:156
      #10 0x000000000090a066 in opt_sum_query (thd=0x7ffa44550060, tables=..., all_fields=..., conds=0x0) at 5.5/sql/opt_sum.cc:400
      #11 0x0000000000665b9a in JOIN::optimize (this=0x7ffa4358bac8) at 5.5/sql/sql_select.cc:1170
      #12 0x000000000062b470 in st_select_lex::optimize_unflattened_subqueries (this=0x7ffa44553a60, const_only=false) at 5.5/sql/sql_lex.cc:3507
      #13 0x000000000077b7ee in JOIN::optimize_unflattened_subqueries (this=0x7ffa4358b078) at 5.5/sql/opt_subselect.cc:4962
      #14 0x0000000000667925 in JOIN::optimize (this=0x7ffa4358b078) at 5.5/sql/sql_select.cc:1663
      #15 0x000000000066c719 in mysql_select (thd=0x7ffa44550060, rref_pointer_array=0x7ffa44553cd0, tables=0x7ffa4356a4e8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7ffa4356ab68, unit=0x7ffa44553380, select_lex=0x7ffa44553a60) at 5.5/sql/sql_select.cc:3078
      #16 0x0000000000663295 in handle_select (thd=0x7ffa44550060, lex=0x7ffa445532d0, result=0x7ffa4356ab68, setup_tables_done_option=0) at 5.5/sql/sql_select.cc:319
      #17 0x000000000063c4d4 in execute_sqlcom_select (thd=0x7ffa44550060, all_tables=0x7ffa4356a4e8) at 5.5/sql/sql_parse.cc:4689
      #18 0x00000000006356b6 in mysql_execute_command (thd=0x7ffa44550060) at 5.5/sql/sql_parse.cc:2234
      #19 0x000000000063efba in mysql_parse (thd=0x7ffa44550060, rawbuf=0x7ffa43687078 "SELECT ( SELECT MIN( sq.i ) FROM t2 ) FROM (SELECT * FROM t1) sq", length=64, parser_state=0x7ffa43fb5620) at 5.5/sql/sql_parse.cc:5909
      #20 0x0000000000632bfd in dispatch_command (command=COM_QUERY, thd=0x7ffa44550060, packet=0x7ffa44607061 "SELECT ( SELECT MIN( sq.i ) FROM t2 ) FROM (SELECT * FROM t1) sq", packet_length=64) at 5.5/sql/sql_parse.cc:1079
      #21 0x0000000000631d89 in do_command (thd=0x7ffa44550060) at 5.5/sql/sql_parse.cc:793
      #22 0x00000000007349ea in do_handle_one_connection (thd_arg=0x7ffa44550060) at 5.5/sql/sql_connect.cc:1266
      #23 0x00000000007344a9 in handle_one_connection (arg=0x7ffa44550060) at 5.5/sql/sql_connect.cc:1181
      #24 0x0000000000b6d365 in pfs_spawn_thread (arg=0x7ffa44571ca0) at 5.5/storage/perfschema/pfs.cc:1015
      #25 0x00007ffa4a66db50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #26 0x00007ffa4892395d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: