rocksdb: crash & corruption, charsets, indexed cols

Bug #1742178 reported by sbester on 2018-01-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to
Status tracked in 5.7
George Ormond Lorch III

Bug Description

Version: '5.7.20-19' (Built on 09 January 2018 with gcc (GCC) 8.0.0 20180101 (experimental))

2018-01-09T15:46:56.677401Z 3 [Note] CHECKTABLE t: Checking table t
2018-01-09T15:46:56.677427Z 3 [Note] CHECKTABLE t: Checking index h
2018-01-09T15:46:56.677499Z 3 [Note] CHECKTABLE t: ... 1 index entries checked (0 had checksums)
2018-01-09T15:46:56.677517Z 3 [Note] CHECKTABLE t: 0 table records had checksums
2018-01-09T15:46:56.686764Z 3 [Note] CHECKTABLE t: Checking table t
2018-01-09T15:46:56.686786Z 3 [Note] CHECKTABLE t: Checking index h

Program received signal SIGSEGV, Segmentation fault.
myrocks::Rdb_key_def::unpack_record at /usr/include/bits/string3.h:51
51 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
(gdb) bt
#0 in myrocks::Rdb_key_def::unpack_record at /usr/include/bits/string3.h:51
#1 in myrocks::ha_rocksdb::secondary_index_read at ./storage/rocksdb/
#2 in myrocks::ha_rocksdb::index_next_with_direction at ./storage/rocksdb/
#3 in myrocks::ha_rocksdb::index_first_intern at ./storage/rocksdb/
#4 in myrocks::ha_rocksdb::index_first at ./storage/rocksdb/
#5 in myrocks::ha_rocksdb::check () at ./storage/rocksdb/
#6 in handler::ha_check at ./sql/
#7 in mysql_admin_table () at ./sql/
#8 in Sql_cmd_check_table::execute at ./sql/
#9 in mysql_execute_command () at ./sql/
#10 in mysql_parse at ./sql/
#11 in dispatch_command () at ./sql/
#12 in do_command at ./sql/
#13 in handle_connection at ./sql/conn_handler/
#14 in pfs_spawn_thread at ./storage/perfschema/
#15 in start_thread at pthread_create.c:308

Built from source:

[x@x percona-server]$ git log | more
commit 473b6703165e37eb93b5bccc848af5f624400d6a
Merge: cbe7ec8 693d018
Author: georgelorchpercona <email address hidden>
Date: Mon Jan 8 13:27:59 2018 -0700

How to repeat

set sql_mode ='';
drop table if exists t;
create table t (
  h varchar(31) character set utf8 collate utf8_bin not null,
  i varchar(19) collate latin1_bin not null,
  primary key(i),
) engine=rocksdb;
insert into t(i,h) values('a','b');
check table t;
alter table t modify h varchar(31) character set cp1257 collate cp1257_bin not null;
check table t;

tags: added: myrocks
George Ormond Lorch III (gl-az) wrote :

MyRocks issues are tracked in thi issue copied to, please watch/subscribe to the JIRA MR issue as no further updates will be made here.

sbester (sbester) wrote :

Oops, couldn't find where to report myrocks issues..
It's here:

George Ormond Lorch III (gl-az) wrote :

Reproduced and reported upstream at

George Ormond Lorch III (gl-az) wrote :

Gah, fat-finger, I meant MYR-232 not 230

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.