Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3841 LevelDB storage engine
  3. MDEV-4076

LevelDB: Assertion `0' fails in ha_leveldb::index_read_map on range select with ORDER BY .. DESC

    XMLWordPrintable

Details

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

    Description

      CREATE TABLE t1 (pk INT PRIMARY KEY, a CHAR(1)) ENGINE=LevelDB;
      INSERT INTO t1 VALUES (1,'a'),(2,'b');
      SELECT * FROM t1 WHERE pk <= 10 ORDER BY pk DESC;

      EXPLAIN EXTENDED SELECT * FROM t1 WHERE pk <= 10 ORDER BY pk DESC;
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
      1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	10	100.00	Using where
      Warnings:
      Note	1003	/* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`pk` <= 10) order by `test`.`t1`.`pk` desc

      mysqld: mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:1018: virtual int ha_leveldb::index_read_map(uchar*, const uchar*, key_part_map, ha_rkey_function): Assertion `0' failed.
      mysqld got signal 6 ;

      #6  0x00007f82a77d7d4d in __GI___assert_fail (assertion=0xff5171 "0", file=<optimized out>, line=1018, function=<optimized out>) at assert.c:81
      #7  0x0000000000a5f745 in ha_leveldb::index_read_map (this=0x2add860, buf=0x2addb48 "\377", key=0x2abd0a0 "\n", keypart_map=1, find_flag=HA_READ_PREFIX_LAST_OR_PREV) at mysql-5.6-leveldb/storage/leveldb/ha_leveldb.cc:1018
      #8  0x0000000000618890 in handler::ha_index_read_map (this=0x2add860, buf=0x2addb48 "\377", key=0x2abd0a0 "\n", keypart_map=1, find_flag=HA_READ_PREFIX_LAST_OR_PREV) at mysql-5.6-leveldb/sql/handler.cc:2668
      #9  0x000000000091eaff in QUICK_SELECT_DESC::get_next (this=0x2a94260) at mysql-5.6-leveldb/sql/opt_range.cc:10631
      #10 0x00000000009359e6 in rr_quick (info=0x2abe0f8) at mysql-5.6-leveldb/sql/records.cc:367
      #11 0x0000000000773c92 in join_init_read_record (tab=0x2abe068) at mysql-5.6-leveldb/sql/sql_executor.cc:2373
      #12 0x0000000000771561 in sub_select (join=0x2a85630, join_tab=0x2abe068, end_of_records=false) at mysql-5.6-leveldb/sql/sql_executor.cc:1246
      #13 0x0000000000770ffb in do_select (join=0x2a85630) at mysql-5.6-leveldb/sql/sql_executor.cc:933
      #14 0x000000000076f0b2 in JOIN::exec (this=0x2a85630) at mysql-5.6-leveldb/sql/sql_executor.cc:191
      #15 0x00000000007c945b in mysql_execute_select (thd=0x29a8e70, select_lex=0x29ab588, free_join=true) at mysql-5.6-leveldb/sql/sql_select.cc:1085
      #16 0x00000000007c9740 in mysql_select (thd=0x29a8e70, tables=0x2a84b50, wild_num=1, fields=..., conds=0x2a85278, order=0x29ab750, group=0x29ab688, having=0x0, select_options=2147748608, result=0x2a85608, unit=0x29aaf48, select_lex=0x29ab588) at mysql-5.6-leveldb/sql/sql_select.cc:1206
      #17 0x00000000007c797a in handle_select (thd=0x29a8e70, result=0x2a85608, setup_tables_done_option=0) at mysql-5.6-leveldb/sql/sql_select.cc:110
      #18 0x00000000007a4778 in execute_sqlcom_select (thd=0x29a8e70, all_tables=0x2a84b50) at mysql-5.6-leveldb/sql/sql_parse.cc:4982
      #19 0x000000000079d5ea in mysql_execute_command (thd=0x29a8e70) at mysql-5.6-leveldb/sql/sql_parse.cc:2552
      #20 0x00000000007a6b9a in mysql_parse (thd=0x29a8e70, rawbuf=0x2a84920 "SELECT * FROM t1 WHERE pk <= 10 ORDER BY pk DESC", length=48, parser_state=0x7f82a9162110) at mysql-5.6-leveldb/sql/sql_parse.cc:6097
      #21 0x000000000079a9d7 in dispatch_command (command=COM_QUERY, thd=0x29a8e70, packet=0x2a7c5d1 "", packet_length=48) at mysql-5.6-leveldb/sql/sql_parse.cc:1312
      #22 0x0000000000799b9a in do_command (thd=0x29a8e70) at mysql-5.6-leveldb/sql/sql_parse.cc:1036
      #23 0x0000000000764f91 in do_handle_one_connection (thd_arg=0x29a8e70) at mysql-5.6-leveldb/sql/sql_connect.cc:969
      #24 0x00000000007649b6 in handle_one_connection (arg=0x29a8e70) at mysql-5.6-leveldb/sql/sql_connect.cc:885
      #25 0x0000000000d0db27 in pfs_spawn_thread (arg=0x2a5ac20) at mysql-5.6-leveldb/storage/perfschema/pfs.cc:1853
      #26 0x00007f82a82f4efc in start_thread (arg=0x7f82a9163700) at pthread_create.c:304
      #27 0x00007f82a788df4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      revision-id: psergey@askmonty.org-20130123185233-7xokxc9ck9nosb2l
      revno: 4509
      branch-nick: mysql-5.6-leveldb

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.