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

Assertion `!prebuilt->index->is_primary()' failed in row_search_idx_cond_check

    Details

      Description

      --source include/have_innodb.inc
       
      SET @stats.save= @@innodb_stats_persistent;
      SET GLOBAL innodb_stats_persistent= ON;
       
      CREATE TABLE t1 (
          a INT,
          b VARCHAR(10),
          c VARCHAR(1024),
          KEY (b),
          KEY (c)
      ) ENGINE=InnoDB;
       
      INSERT INTO t1 VALUES
        (1,'w','z'), (1,'X','o'), (1,'q','c'), (5,'w','c'), (2,'j','m'),
        (2,'Q','s'), (9,'e','J'), (2,'p','W'), (9,'o','F'), (2,'g','S'),
        (1,'Y','a'), (NULL,'Y','p'), (NULL,'s','x'), (NULL,'i','S'),
        (1,'l','q'), (7,'r','e'), (4,'b','h'), (NULL,'E','c'),
        (NULL,'M','a'), (3,'e','X'), (NULL,'p','r'), (9,'e','i');
       
      CREATE TABLE t2 (d INT) ENGINE=MyISAM;
       
      SELECT a FROM t1 LEFT JOIN t2 ON a = d WHERE c < 'k' AND b > 't' ORDER BY a;
       
      # Cleanup
      DROP TABLE t1, t2;
      SET GLOBAL innodb_stats_persistent= @stats.save;
      

      10.4 223c550d

      mysqld: /data/src/10.4/storage/innobase/row/row0sel.cc:3906: ICP_RESULT row_search_idx_cond_check(byte*, row_prebuilt_t*, const rec_t*, const ulint*): Assertion `!prebuilt->index->is_primary()' failed.
      190702  2:52:40 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd21b70df12 in __GI___assert_fail (assertion=0x55bbcd9d4ca8 "!prebuilt->index->is_primary()", file=0x55bbcd9d3be0 "/data/src/10.4/storage/innobase/row/row0sel.cc", line=3906, function=0x55bbcd9d7dc0 <row_search_idx_cond_check(unsigned char*, row_prebuilt_t*, unsigned char const*, unsigned long const*)::__PRETTY_FUNCTION__> "ICP_RESULT row_search_idx_cond_check(byte*, row_prebuilt_t*, const rec_t*, const ulint*)") at assert.c:101
      #8  0x000055bbcd263c8f in row_search_idx_cond_check (mysql_rec=0x7fd1b8131658 "\370\001", prebuilt=0x7fd1b8131f28, rec=0x7fd2009881ca "", offsets=0x7fd218159db0) at /data/src/10.4/storage/innobase/row/row0sel.cc:3906
      #9  0x000055bbcd2675e7 in row_search_mvcc (buf=0x7fd1b8131658 "\370\001", mode=PAGE_CUR_GE, prebuilt=0x7fd1b8131f28, match_mode=1, direction=0) at /data/src/10.4/storage/innobase/row/row0sel.cc:5220
      #10 0x000055bbcd0c1785 in ha_innobase::index_read (this=0x7fd1b8130e98, buf=0x7fd1b8131658 "\370\001", key_ptr=0x7fd1b8063440 "", key_len=6, find_flag=HA_READ_KEY_EXACT) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9339
      #11 0x000055bbcd0c28e7 in ha_innobase::rnd_pos (this=0x7fd1b8130e98, buf=0x7fd1b8131658 "\370\001", pos=0x7fd1b8063440 "") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9843
      #12 0x000055bbcce92314 in handler::ha_rnd_pos (this=0x7fd1b8130e98, buf=0x7fd1b8131658 "\370\001", pos=0x7fd1b8063440 "") at /data/src/10.4/sql/handler.cc:2866
      #13 0x000055bbcd022343 in rr_from_pointers (info=0x7fd1b8065828) at /data/src/10.4/sql/records.cc:543
      #14 0x000055bbccaa7fe7 in READ_RECORD::read_record (this=0x7fd1b8065828) at /data/src/10.4/sql/records.h:69
      #15 0x000055bbccbcd4bd in join_init_read_record (tab=0x7fd1b8065760) at /data/src/10.4/sql/sql_select.cc:21055
      #16 0x000055bbccbcb141 in sub_select (join=0x7fd1b80163d0, join_tab=0x7fd1b8065760, end_of_records=false) at /data/src/10.4/sql/sql_select.cc:20111
      #17 0x000055bbccbca6d0 in do_select (join=0x7fd1b80163d0, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:19652
      #18 0x000055bbccba0aad in JOIN::exec_inner (this=0x7fd1b80163d0) at /data/src/10.4/sql/sql_select.cc:4391
      #19 0x000055bbccb9fc5a in JOIN::exec (this=0x7fd1b80163d0) at /data/src/10.4/sql/sql_select.cc:4173
      #20 0x000055bbccba12ff in mysql_select (thd=0x7fd1b8000b00, tables=0x7fd1b80135c0, wild_num=0, fields=..., conds=0x7fd1b8015758, og_num=1, order=0x7fd1b80159d0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fd1b80163a8, unit=0x7fd1b8004a28, select_lex=0x7fd1b8012ff8) at /data/src/10.4/sql/sql_select.cc:4605
      #21 0x000055bbccb918ee in handle_select (thd=0x7fd1b8000b00, lex=0x7fd1b8004960, result=0x7fd1b80163a8, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:425
      #22 0x000055bbccb5b48f in execute_sqlcom_select (thd=0x7fd1b8000b00, all_tables=0x7fd1b80135c0) at /data/src/10.4/sql/sql_parse.cc:6340
      #23 0x000055bbccb512d6 in mysql_execute_command (thd=0x7fd1b8000b00) at /data/src/10.4/sql/sql_parse.cc:3882
      #24 0x000055bbccb5f223 in mysql_parse (thd=0x7fd1b8000b00, rawbuf=0x7fd1b8012ef8 "SELECT a FROM t1 LEFT JOIN t2 ON a = d WHERE c < 'k' AND b > 't' ORDER BY a", length=75, parser_state=0x7fd21815c1d0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7892
      #25 0x000055bbccb4b4cd in dispatch_command (command=COM_QUERY, thd=0x7fd1b8000b00, packet=0x7fd1b8142621 "", packet_length=75, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1827
      #26 0x000055bbccb49c8b in do_command (thd=0x7fd1b8000b00) at /data/src/10.4/sql/sql_parse.cc:1360
      #27 0x000055bbcccc2f81 in do_handle_one_connection (connect=0x55bbd0803b40) at /data/src/10.4/sql/sql_connect.cc:1403
      #28 0x000055bbcccc2ce5 in handle_one_connection (arg=0x55bbd0803b40) at /data/src/10.4/sql/sql_connect.cc:1306
      #29 0x00007fd21d2824a4 in start_thread (arg=0x7fd21815d700) at pthread_create.c:456
      #30 0x00007fd21b7cad0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Not reproducible with the provided test case on 10.3.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                elenst Elena Stepanova
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: