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

InnoDB: Failing assertion: field->prefix_len > 0 upon DML on table with BLOB index

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TEMPORARY TABLE t1 (f BLOB, UNIQUE(f)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
      --error ER_INDEX_COLUMN_TOO_LONG
      ALTER TABLE t1 ADD KEY (f);
      TRUNCATE TABLE t1;
      SELECT * FROM t1 WHERE f LIKE 'foo';
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 3b47587f

      2019-03-02 17:43:32 0x7f18152bd700  InnoDB: Assertion failure in file /data/src/10.4/storage/innobase/row/row0sel.cc line 2582
      InnoDB: Failing assertion: field->prefix_len > 0
       
      #5  0x00007f181bf9c3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x000055d4a1305260 in ut_dbg_assertion_failed (expr=0x55d4a191b903 "field->prefix_len > 0", file=0x55d4a191b1e0 "/data/src/10.4/storage/innobase/row/row0sel.cc", line=2582) at /data/src/10.4/storage/innobase/ut/ut0dbg.cc:60
      #7  0x000055d4a127d1f5 in row_sel_convert_mysql_key_to_innobase (tuple=0x7f17cc1a53a8, buf=0x0, buf_len=0, index=0x7f17cc151258, key_ptr=0x7f17cc1a1348 "", key_len=3) at /data/src/10.4/storage/innobase/row/row0sel.cc:2582
      #8  0x000055d4a10ea51e in ha_innobase::records_in_range (this=0x7f17cc1a2b78, keynr=0, min_key=0x0, max_key=0x7f18152b96d0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:13537
      #9  0x000055d4a0c18531 in handler::multi_range_read_info_const (this=0x7f17cc1a2b78, keyno=0, seq=0x7f18152b98d0, seq_init_param=0x7f18152b9900, n_ranges_arg=0, bufsz=0x7f18152b97d4, flags=0x7f18152b97d0, cost=0x7f18152b9f90) at /data/src/10.4/sql/multi_range_read.cc:177
      #10 0x000055d4a0c1bf44 in DsMrr_impl::dsmrr_info_const (this=0x7f17cc1a2fd0, keyno=0, seq=0x7f18152b98d0, seq_init_param=0x7f18152b9900, n_ranges=0, bufsz=0x7f18152b9e88, flags=0x7f18152b9e84, cost=0x7f18152b9f90) at /data/src/10.4/sql/multi_range_read.cc:1579
      #11 0x000055d4a10f4c54 in ha_innobase::multi_range_read_info_const (this=0x7f17cc1a2b78, keyno=0, seq=0x7f18152b98d0, seq_init_param=0x7f18152b9900, n_ranges=0, bufsz=0x7f18152b9e88, flags=0x7f18152b9e84, cost=0x7f18152b9f90) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:20289
      #12 0x000055d4a0f1a43a in check_quick_select (param=0x7f18152ba200, idx=0, index_only=false, tree=0x7f17cc1a13e0, update_tbl_stats=true, mrr_flags=0x7f18152b9e84, bufsize=0x7f18152b9e88, cost=0x7f18152b9f90) at /data/src/10.4/sql/opt_range.cc:11070
      #13 0x000055d4a0f10db2 in get_key_scans_params (param=0x7f18152ba200, tree=0x7f17cc1a1350, index_read_must_be_used=false, update_tbl_stats=true, read_time=3.3000000000000003) at /data/src/10.4/sql/opt_range.cc:7374
      #14 0x000055d4a0f058df in SQL_SELECT::test_quick_select (this=0x7f17cc018950, thd=0x7f17cc000b00, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false, ordered_output=false, remove_false_parts_of_where=true, only_single_index_range_scan=false) at /data/src/10.4/sql/opt_range.cc:2902
      #15 0x000055d4a0aa5f5e in get_quick_record_count (thd=0x7f17cc000b00, select=0x7f17cc018950, table=0x7f17cc00d120, keys=0x7f17cc0178d0, limit=18446744073709551615) at /data/src/10.4/sql/sql_select.cc:4622
      #16 0x000055d4a0aa87a5 in make_join_statistics (join=0x7f17cc016e50, tables_list=..., keyuse_array=0x7f17cc017140) at /data/src/10.4/sql/sql_select.cc:5348
      #17 0x000055d4a0a9d191 in JOIN::optimize_inner (this=0x7f17cc016e50) at /data/src/10.4/sql/sql_select.cc:2167
      #18 0x000055d4a0a9ad4e in JOIN::optimize (this=0x7f17cc016e50) at /data/src/10.4/sql/sql_select.cc:1551
      #19 0x000055d4a0aa5c30 in mysql_select (thd=0x7f17cc000b00, tables=0x7f17cc015b10, wild_num=1, fields=..., conds=0x7f17cc016418, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f17cc016e28, unit=0x7f17cc004a18, select_lex=0x7f17cc015558) at /data/src/10.4/sql/sql_select.cc:4564
      #20 0x000055d4a0a96274 in handle_select (thd=0x7f17cc000b00, lex=0x7f17cc004950, result=0x7f17cc016e28, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:424
      #21 0x000055d4a0a5f6e7 in execute_sqlcom_select (thd=0x7f17cc000b00, all_tables=0x7f17cc015b10) at /data/src/10.4/sql/sql_parse.cc:6604
      #22 0x000055d4a0a5498e in mysql_execute_command (thd=0x7f17cc000b00) at /data/src/10.4/sql/sql_parse.cc:3841
      #23 0x000055d4a0a63636 in mysql_parse (thd=0x7f17cc000b00, rawbuf=0x7f17cc0154a8 "SELECT * FROM t1 WHERE f LIKE 'foo'", length=35, parser_state=0x7f18152bc180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #24 0x000055d4a0a4ed24 in dispatch_command (command=COM_QUERY, thd=0x7f17cc000b00, packet=0x7f17cc139fd1 "SELECT * FROM t1 WHERE f LIKE 'foo'", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #25 0x000055d4a0a4d4f8 in do_command (thd=0x7f17cc000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #26 0x000055d4a0bc7003 in do_handle_one_connection (connect=0x55d4a3230d10) at /data/src/10.4/sql/sql_connect.cc:1399
      #27 0x000055d4a0bc6d74 in handle_one_connection (arg=0x55d4a3230d10) at /data/src/10.4/sql/sql_connect.cc:1302
      #28 0x000055d4a10bdd17 in pfs_spawn_thread (arg=0x55d4a3276b80) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #29 0x00007f181dc6a494 in start_thread (arg=0x7f18152bd700) at pthread_create.c:333
      #30 0x00007f181c05093f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Non-debug fails the same way.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.