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

Error 175 "File too short; Expected more data in file" or Assertion `info->last_key.keyinfo == key->keyinfo' failed in _ma_search_no_save

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
       
      CREATE TABLE t1 (
          pk integer auto_increment,
          a int,
          b varchar(1024),
          primary key (pk)
      ) ENGINE=Aria;
      INSERT INTO t1 (a,b) VALUES (1,'b'),(2,'j'),(3,'p'),(4,'u'),(5,'b'),(6,'i'), (7,'f'),(8,'f'),(9,'t');
       
      CREATE TABLE t2 (
          pk integer auto_increment,
          c varchar(10),
          key (c),
          primary key (pk)
      ) ENGINE=Aria PARTITION BY HASH(pk) PARTITIONS 4;
      INSERT INTO t2 (c) VALUES ('g'),('o'),('t'),('b'),('j');
       
      SELECT t1.pk FROM t1 JOIN t2 WHERE b = c AND (t2.pk = a OR t2.pk = 4);
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.3 39d8652c non-debug

      mysqltest: At line 19: query 'SELECT t1.pk FROM t1 JOIN t2 WHERE b = c AND (t2.pk = a OR t2.pk = 4)' failed: 1030: Got error 175 "File too short; Expected more data in file" from storage engine Aria
      

      10.3 39d8652c debug

      mysqld: /data/src/10.3/storage/maria/ma_search.c:130: _ma_search_no_save: Assertion `info->last_key.keyinfo == key->keyinfo' failed.
      191119 14:58:28 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f294b545f12 in __GI___assert_fail (assertion=0x55ce969991d0 "info->last_key.keyinfo == key->keyinfo", file=0x55ce96999160 "/data/src/10.3/storage/maria/ma_search.c", line=130, function=0x55ce969996a0 <__PRETTY_FUNCTION__.15299> "_ma_search_no_save") at assert.c:101
      #8  0x000055ce9641c103 in _ma_search_no_save (info=0x7f28f002daa0, key=0x7f293d4bff40, nextflag=1, pos=16384, res_page_link=0x7f293d4bfeb0, res_page_buff=0x7f293d4bfeb8) at /data/src/10.3/storage/maria/ma_search.c:130
      #9  0x000055ce9641beeb in _ma_search (info=0x7f28f002daa0, key=0x7f293d4bff40, nextflag=1, pos=16384) at /data/src/10.3/storage/maria/ma_search.c:77
      #10 0x000055ce9641aab0 in maria_rkey (info=0x7f28f002daa0, buf=0x7f28f0049d58 "\377\377", inx=1, key_data=0x7f28f00ea620 "", keypart_map=1, search_flag=HA_READ_KEY_EXACT) at /data/src/10.3/storage/maria/ma_rkey.c:104
      #11 0x000055ce963cd591 in ha_maria::index_read_map (this=0x7f28f00983a8, buf=0x7f28f0049d58 "\377\377", key=0x7f28f00ea620 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/10.3/storage/maria/ha_maria.cc:2283
      #12 0x000055ce95d3bae9 in handler::ha_index_read_map (this=0x7f28f00983a8, buf=0x7f28f0049d58 "\377\377", key=0x7f28f00ea620 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/10.3/sql/handler.cc:2897
      #13 0x000055ce95d441b8 in handler::read_range_first (this=0x7f28f00983a8, start_key=0x7f28f0098498, end_key=0x7f28f00984b8, eq_range_arg=true, sorted=true) at /data/src/10.3/sql/handler.cc:5816
      #14 0x000055ce95bde906 in handler::multi_range_read_next (this=0x7f28f00983a8, range_info=0x7f28f0068140) at /data/src/10.3/sql/multi_range_read.cc:299
      #15 0x000055ce95bdea3f in Mrr_simple_index_reader::get_next (this=0x7f28f0098970, range_info=0x7f28f0068140) at /data/src/10.3/sql/multi_range_read.cc:336
      #16 0x000055ce95be1858 in DsMrr_impl::dsmrr_next (this=0x7f28f0098830, range_info=0x7f28f0068140) at /data/src/10.3/sql/multi_range_read.cc:1406
      #17 0x000055ce963d1358 in ha_maria::multi_range_read_next (this=0x7f28f00983a8, range_info=0x7f28f0068140) at /data/src/10.3/storage/maria/ha_maria.cc:3804
      #18 0x000055ce965679f9 in ha_partition::handle_ordered_index_scan (this=0x7f28f016b758, buf=0x7f28f0049d58 "\377\377", reverse_order=false) at /data/src/10.3/sql/ha_partition.cc:7563
      #19 0x000055ce9656453a in ha_partition::multi_range_read_next (this=0x7f28f016b758, range_info=0x7f293d4c0340) at /data/src/10.3/sql/ha_partition.cc:6505
      #20 0x000055ce95ebac38 in QUICK_RANGE_SELECT::get_next (this=0x7f28f0111f60) at /data/src/10.3/sql/opt_range.cc:11498
      #21 0x000055ce95eccaa5 in rr_quick (info=0x7f28f0017c98) at /data/src/10.3/sql/records.cc:361
      #22 0x000055ce9597eded in READ_RECORD::read_record (this=0x7f28f0017c98) at /data/src/10.3/sql/records.h:69
      #23 0x000055ce95a993ae in join_init_read_record (tab=0x7f28f0017bd0) at /data/src/10.3/sql/sql_select.cc:20462
      #24 0x000055ce95a98f4c in join_init_quick_read_record (tab=0x7f28f0017bd0) at /data/src/10.3/sql/sql_select.cc:20390
      #25 0x000055ce95a96f6b in sub_select (join=0x7f28f0014c58, join_tab=0x7f28f0017bd0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19523
      #26 0x000055ce95a9770e in evaluate_join_record (join=0x7f28f0014c58, join_tab=0x7f28f0017840, error=0) at /data/src/10.3/sql/sql_select.cc:19746
      #27 0x000055ce95a971a5 in sub_select (join=0x7f28f0014c58, join_tab=0x7f28f0017840, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19565
      #28 0x000055ce95a96457 in do_select (join=0x7f28f0014c58, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19066
      #29 0x000055ce95a6d64f in JOIN::exec_inner (this=0x7f28f0014c58) at /data/src/10.3/sql/sql_select.cc:4040
      #30 0x000055ce95a6ca22 in JOIN::exec (this=0x7f28f0014c58) at /data/src/10.3/sql/sql_select.cc:3834
      #31 0x000055ce95a6dd33 in mysql_select (thd=0x7f28f0000af0, tables=0x7f28f0012988, wild_num=0, fields=..., conds=0x7f28f00149e0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f28f0014c30, unit=0x7f28f00049c0, select_lex=0x7f28f0005140) at /data/src/10.3/sql/sql_select.cc:4239
      #32 0x000055ce95a5f7a8 in handle_select (thd=0x7f28f0000af0, lex=0x7f28f00048f8, result=0x7f28f0014c30, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #33 0x000055ce95a2719e in execute_sqlcom_select (thd=0x7f28f0000af0, all_tables=0x7f28f0012988) at /data/src/10.3/sql/sql_parse.cc:6291
      #34 0x000055ce95a1dbd3 in mysql_execute_command (thd=0x7f28f0000af0) at /data/src/10.3/sql/sql_parse.cc:3821
      #35 0x000055ce95a2b497 in mysql_parse (thd=0x7f28f0000af0, rawbuf=0x7f28f00125f8 "SELECT alias1.`pk` AS field1 FROM EE AS alias1 JOIN BB AS alias2 WHERE alias1.`col_varchar_1024_latin1` = alias2.`col_varchar_10_utf8_key` AND (alias2.`pk` = alias1.`col_int` OR alias2.`pk`  = 4)", length=195, parser_state=0x7f293d4c1630, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7815
      #36 0x000055ce95a1801b in dispatch_command (command=COM_QUERY, thd=0x7f28f0000af0, packet=0x7f28f0043481 "", packet_length=195, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #37 0x000055ce95a16963 in do_command (thd=0x7f28f0000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #38 0x000055ce95b8d8fa in do_handle_one_connection (connect=0x55ce98e36460) at /data/src/10.3/sql/sql_connect.cc:1403
      #39 0x000055ce95b8d65c in handle_one_connection (arg=0x55ce98e36460) at /data/src/10.3/sql/sql_connect.cc:1308
      #40 0x00007f294d0bb4a4 in start_thread (arg=0x7f293d4c2700) at pthread_create.c:456
      #41 0x00007f294b602d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Couldn't reproduce on 10.2 or 10.4, only on 10.3.

      Attachments

        Issue Links

          Activity

            People

              elenst Elena Stepanova
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.