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

Assertion `0' failed in row_sel_convert_mysql_key_to_innobase

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 (f1 INT, f2 INT, f3 INT, f4 INT, KEY (f4,f3))
      ENGINE=InnoDB
      PARTITION BY RANGE (f1) (
        PARTITION p1 VALUES LESS THAN (128),
        PARTITION p2 VALUES LESS THAN MAXVALUE
      );
       
      CREATE ALGORITHM = MERGE VIEW v1 AS SELECT a1.f1, a1.f2, a1.f3, a2.f4
        FROM t1 AS a1, t1 AS a2 WHERE a1.f3 >= a2.f3 WITH CHECK OPTION;
       
      INSERT INTO t1 VALUES (156,NULL,0,0),(3,8,0,0),(0,3,2,4),(0,5,0,NULL);
      UPDATE v1 SET f3 = 6, f2 = 9 WHERE f4 <= 0;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.0 0c4d11e8199f4c7

      2017-11-17  2:05:00 140640119027456 [Warning] InnoDB: Using a partial-field key prefix in search, index `f4` of table `test`.`t1` /* Partition `p2` */. Last data field length 5 bytes, key ptr now exceeds key end by 4 bytes. Key value in the MySQL format:
       len 6; hex 000000000200; asc       ;
      mysqld: /data/src/10.2/storage/innobase/row/row0sel.cc:2724: void row_sel_convert_mysql_key_to_innobase(dtuple_t*, byte*, ulint, dict_index_t*, const byte*, ulint, trx_t*): Assertion `0' failed.
      171117  2:05:00 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb7c471aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005645ddae0400 in row_sel_convert_mysql_key_to_innobase (tuple=0x7fb76803a688, buf=0x7fb76803a490 "", buf_len=8, index=0x7fb768131568, key_ptr=0x7fb7680467ed "\t", key_len=6, trx=0x7fb7be68b878) at /data/src/10.2/storage/innobase/row/row0sel.cc:2724
      #9  0x00005645dd9730e9 in ha_innobase::index_read (this=0x7fb768037198, buf=0x7fb768130c10 "\245\245\245\245\245\245\245\245\245\002", key_ptr=0x7fb7680467e3 "", key_len=6, find_flag=HA_READ_KEY_EXACT) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9783
      #10 0x00005645dd9749c2 in ha_innobase::rnd_pos (this=0x7fb768037198, buf=0x7fb768130c10 "\245\245\245\245\245\245\245\245\245\002", pos=0x7fb7680467e3 "") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:10392
      #11 0x00005645dd6608a3 in handler::ha_rnd_pos (this=0x7fb768037198, buf=0x7fb768130c10 "\245\245\245\245\245\245\245\245\245\002", pos=0x7fb7680467e3 "") at /data/src/10.2/sql/handler.cc:2603
      #12 0x00005645ddd86175 in ha_partition::rnd_pos (this=0x7fb768036248, buf=0x7fb768130c10 "\245\245\245\245\245\245\245\245\245\002", pos=0x7fb7680467e1 "\001") at /data/src/10.2/sql/ha_partition.cc:5071
      #13 0x00005645dd66084d in handler::ha_rnd_pos (this=0x7fb768036248, buf=0x7fb768130c10 "\245\245\245\245\245\245\245\245\245\002", pos=0x7fb7680467e1 "\001") at /data/src/10.2/sql/handler.cc:2603
      #14 0x00005645dd4daf76 in multi_update::do_updates (this=0x7fb768017b78) at /data/src/10.2/sql/sql_update.cc:2418
      #15 0x00005645dd4db6e7 in multi_update::send_eof (this=0x7fb768017b78) at /data/src/10.2/sql/sql_update.cc:2560
      #16 0x00005645dd459f0e in do_select (join=0x7fb768017c40, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18236
      #17 0x00005645dd4343e3 in JOIN::exec_inner (this=0x7fb768017c40) at /data/src/10.2/sql/sql_select.cc:3514
      #18 0x00005645dd433892 in JOIN::exec (this=0x7fb768017c40) at /data/src/10.2/sql/sql_select.cc:3309
      #19 0x00005645dd434a5b in mysql_select (thd=0x7fb768000b00, tables=0x7fb768012550, wild_num=0, fields=..., conds=0x7fb768013080, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=1342177408, result=0x7fb768017b78, unit=0x7fb7680046a0, select_lex=0x7fb768004dd8) at /data/src/10.2/sql/sql_select.cc:3709
      #20 0x00005645dd4d8296 in mysql_multi_update (thd=0x7fb768000b00, table_list=0x7fb768012550, fields=0x7fb768004f00, values=0x7fb7680053c8, conds=0x7fb768013080, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7fb7680046a0, select_lex=0x7fb768004dd8, result=0x7fb7bc384910) at /data/src/10.2/sql/sql_update.cc:1604
      #21 0x00005645dd3ed841 in mysql_execute_command (thd=0x7fb768000b00) at /data/src/10.2/sql/sql_parse.cc:4336
      #22 0x00005645dd3f8abe in mysql_parse (thd=0x7fb768000b00, rawbuf=0x7fb768012448 "UPDATE v1 SET f3 = 6, f2 = 9 WHERE f4 <= 0", length=42, parser_state=0x7fb7bc385200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7869
      #23 0x00005645dd3e6a4a in dispatch_command (command=COM_QUERY, thd=0x7fb768000b00, packet=0x7fb7680088a1 "UPDATE v1 SET f3 = 6, f2 = 9 WHERE f4 <= 0", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1805
      #24 0x00005645dd3e53a8 in do_command (thd=0x7fb768000b00) at /data/src/10.2/sql/sql_parse.cc:1360
      #25 0x00005645dd53298d in do_handle_one_connection (connect=0x5645e1656250) at /data/src/10.2/sql/sql_connect.cc:1354
      #26 0x00005645dd53271a in handle_one_connection (arg=0x5645e1656250) at /data/src/10.2/sql/sql_connect.cc:1260
      #27 0x00005645dd94fe1a in pfs_spawn_thread (arg=0x5645e16607c0) at /data/src/10.2/storage/perfschema/pfs.cc:1863
      #28 0x00007fb7c63f1494 in start_thread (arg=0x7fb7bc386700) at pthread_create.c:333
      #29 0x00007fb7c47d793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration