Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `covers_key(b)' failed in int myrocks::Rdb_key_def::cmp_full_keys(const rocks db::Slice&, const rocksdb::Slice&) #728

Closed
george-lorch opened this issue Oct 11, 2017 · 1 comment

Comments

@george-lorch
Copy link

Built on the fb-mysql-5.6.35/78909f9bfcee66cd85913f64546c5d91d27dd22c

This is a debug assertion, is this maybe another over aggressive debug assertion or potentially a real problem?

Very simple reproduction case, my.cnf :

[client]
port=10000
socket=/ssd/percona/myrocks/facebook-mysql-install-5.6/var/mysql.sock
user=root

[mysqld]
basedir=/ssd/percona/myrocks/facebook-mysql-install-5.6
datadir=/ssd/percona/myrocks/facebook-mysql-install-5.6/data
tmpdir=/ssd/percona/myrocks/facebook-mysql-install-5.6/tmp
port=10000
socket=/ssd/percona/myrocks/facebook-mysql-install-5.6/var/mysql.sock
pid-file=/ssd/percona/myrocks/facebook-mysql-install-5.6/var/mysql.pid
console
server-id=1
max_connections=1000
rocksdb
default-storage-engine=rocksdb
skip-innodb
default-tmp-storage-engine=MyISAM

And SQL :

mysql> drop database test; create database test; use test;
Query OK, 1 row affected (0.02 sec)

Query OK, 1 row affected (0.00 sec)

Database changed
mysql> CREATE TABLE t2(c1 TINYINT SIGNED KEY,c2 TINYINT UNSIGNED,c3 INT);
Query OK, 0 rows affected (0.03 sec)

mysql> INSERT INTO t2(c1)VALUES(0);
Query OK, 1 row affected (0.01 sec)

mysql> SELECT * FROM t2 WHERE c1<=127 ORDER BY c1 DESC;

And the bt full :

#0 0x00007ffff5f53c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 2708
selftid = 2755
#1 0x00007ffff5f57028 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fffffffdd14, sa_sigaction = 0x7fffffffdd14}, sa_mask = {__val = {140737321227588, 30627240, 245, 4294967295, 140737319855443, 4, 140737353585296, 47244640259,
140736561492744, 140737353585392, 0, 0, 0, 21474836480, 140737354096640, 140737321242648}}, sa_flags = 30627326,
sa_restorer = 0x1d3f720 <myrocks::Rdb_key_def::cmp_full_keys(rocksdb::Slice const&, rocksdb::Slice const&) const::PRETTY_FUNCTION>}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff5f4cbf6 in __assert_fail_base (fmt=0x7ffff60a1018 "%s%s%s:%u: %s%sAssertion %s' failed.\n%n", assertion=assertion@entry=0x1d355fe "covers_key(b)", file=file@entry=0x1d355a8 "/ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/./rdb_datadic.h", line=line@entry=245, function=function@entry=0x1d3f720 <myrocks::Rdb_key_def::cmp_full_keys(rocksdb::Slice const&, rocksdb::Slice const&) const::__PRETTY_FUNCTION__> "int myrocks::Rdb_key_def::cmp_full_keys(const rocksdb::Slice&, const rocksdb::Slice&) const") at assert.c:92 str = 0x7fffc8d01100 "mysqld: /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/./rdb_datadic.h:245: int myrocks::Rdb_key_def::cmp_full_keys(const rocksdb::Slice&, const rocksdb::Slice&) const: Assertion covers_key("...
total = 4096
#3 0x00007ffff5f4cca2 in __GI___assert_fail (assertion=0x1d355fe "covers_key(b)", file=0x1d355a8 "/ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/./rdb_datadic.h", line=245,
function=0x1d3f720 <myrocks::Rdb_key_def::cmp_full_keys(rocksdb::Slice const&, rocksdb::Slice const&) const::PRETTY_FUNCTION> "int myrocks::Rdb_key_def::cmp_full_keys(const rocksdb::Slice&, const rocksdb::Slice&) const") at assert.c:101
No locals.
#4 0x00000000012f2cd5 in myrocks::Rdb_key_def::cmp_full_keys (this=0x7ffff54bb518, a=..., b=...) at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/./rdb_datadic.h:245
PRETTY_FUNCTION = "int myrocks::Rdb_key_def::cmp_full_keys(const rocksdb::Slice&, const rocksdb::Slice&) const"
#5 0x00000000012f2df0 in myrocks::Rdb_key_def::value_matches_prefix (this=0x7ffff54bb518, value=..., prefix=...) at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/./rdb_datadic.h:280
No locals.
#6 0x00000000012d6986 in myrocks::ha_rocksdb::read_before_key (this=0x7fffc8c21b10, kd=..., full_key_match=@0x7ffff7f795bc: true, key_slice=..., ttl_filter_ts=1507761383)
at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:6893
No locals.
#7 0x00000000012d6d69 in myrocks::ha_rocksdb::position_to_correct_key (this=0x7fffc8c21b10, kd=..., find_flag=@0x7ffff7f7958c: HA_READ_PREFIX_LAST_OR_PREV, full_key_match=@0x7ffff7f795bc: true,
key=0x7fffc8d2f040 "\177", keypart_map=@0x7ffff7f79590: 1, key_slice=..., move_forward=0x7ffff7f795cc, ttl_filter_ts=1507761383) at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:6979
rc = 0
PRETTY_FUNCTION = "int myrocks::ha_rocksdb::position_to_correct_key(const myrocks::Rdb_key_def&, const ha_rkey_function&, const bool&, const uchar*, const key_part_map&, const rocksdb::Slice&, bool*, int64_t)"
#8 0x00000000012d8176 in myrocks::ha_rocksdb::index_read_map_impl (this=0x7fffc8c21b10, buf=0x7fffc8c4ec10 "\377\177", key=0x7fffc8d2f040 "\177", keypart_map=1, find_flag=HA_READ_PREFIX_LAST_OR_PREV, end_key=0x0)
at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:7433
move_forward = false
db_stack_frame = {func = 0x1b3f9a4 "handler::ha_index_read_map", file = 0x1b3eb88 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/handler.cc", level = 2147483660, prev = 0x7ffff7f796e0}
PRETTY_FUNCTION = "int myrocks::ha_rocksdb::index_read_map_impl(uchar*, const uchar*, key_part_map, ha_rkey_function, const key_range*)"
kd = @0x7ffff54bb518: {static CF_FLAGS_TO_IGNORE = 4, m_index_number = 270, m_index_number_storage_form = "\000\000\001\016", m_cf_handle = 0x7fffe47ff5c0, m_index_dict_version = 6, m_index_type = 1 '\001',
m_kv_format_version = 13, m_is_reverse_cf = false, m_is_per_partition_cf = false, m_name = "PRIMARY", m_stats = {m_gl_index_id = {cf_id = 0, index_id = 0}, m_data_size = 0, m_rows = 0,
m_actual_disk_size = 0, m_entry_deletes = 0, m_entry_single_deletes = 0, m_entry_merges = 0, m_entry_others = 0, m_distinct_keys_per_prefix = std::vector of length 1, capacity 1 = {0}, m_name = ""},
m_index_flags_bitmap = 0, m_total_index_flags_length = 0, m_ttl_rec_offset = 4294967295, m_ttl_duration = 0, m_ttl_column = "", m_pk_key_parts = 0, m_pk_part_no = 0x0, m_pack_info = 0x7fffc8cff020,
m_keyno = 0, m_key_parts = 1, m_ttl_pk_key_part_offset = 4294967295, m_ttl_field_offset = 4294967295, m_prefix_extractor = std::shared_ptr (empty) 0x0, m_maxlength = 5, m_mutex = {m_mutex = {global = {
__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 2, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}},
__size = '\000' <repeats 16 times>, "\002", '\000' <repeats 22 times>, __align = 0}, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 3, __spins = 0, __elision = 0,
__list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 16 times>, "\003", '\000' <repeats 22 times>, align = 0},
file = 0x1d44170 "/ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/rdb_datadic.cc", line = 149, count = 0, thread = 0}, m_psi = 0x0}}
packed_size = 5
end_key_packed_size = 0
actual_key_parts = 1
using_full_key = true
bytes_changed_by_succ = 2
use_all_keys = false
tx = 0x7fffc8d09180
is_new_snapshot = false
rc = 0
slice = {data
= 0x7fffc8c1c0c8 "", size
= 5}
eq_cond_len = 4
#9 0x00000000012d7b1e in myrocks::ha_rocksdb::index_read_map (this=0x7fffc8c21b10, buf=0x7fffc8c4ec10 "\377\177", key=0x7fffc8d2f040 "\177", keypart_map=1, find_flag=HA_READ_PREFIX_LAST_OR_PREV)
at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:7295
db_stack_frame = {func = 0x1b3f9a4 "handler::ha_index_read_map", file = 0x1b3eb88 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/handler.cc", level = 2147483660, prev = 0x7ffff7f796e0}
PRETTY_FUNCTION = "virtual int myrocks::ha_rocksdb::index_read_map(uchar*, const uchar*, key_part_map, ha_rkey_function)"
#10 0x0000000000d6f5e0 in handler::ha_index_read_map (this=0x7fffc8c21b10, buf=0x7fffc8c4ec10 "\377\177", key=0x7fffc8d2f040 "\177", keypart_map=1, find_flag=HA_READ_PREFIX_LAST_OR_PREV)
at /ssd/percona/myrocks/facebook-mysql-5.6/sql/handler.cc:3017
locker = 0x7ffff7f79700
state = {m_flags = 3, m_io_operation = PSI_TABLE_FETCH_ROW, m_table = 0x7fffe1400000, m_table_share = 0x1cd15e8, m_thread = 0x7fffe0c03ac0, m_timer_start = 17185206811821486,
m_timer = 0x12b2854 <my_timer_cycles>, m_wait = 0x7fffc8d2f010, m_index = 0}
result = 32767
db_stack_frame = {func = 0x1cd2daa "QUICK_SELECT_DESC::get_next", file = 0x1cd15e8 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/opt_range.cc", level = 2147483659, prev = 0x7ffff7f79770}
PRETTY_FUNCTION = "int handler::ha_index_read_map(uchar*, const uchar*, key_part_map, ha_rkey_function)"
#11 0x00000000011344e6 in QUICK_SELECT_DESC::get_next (this=0x7fffc8d09300) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/opt_range.cc:11151
result = 15213327
eqrange_all_keyparts = false
db_stack_frame = {func = 0x1bfecc8 "sub_select", file = 0x1bfe9e0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc", level = 2147483658, prev = 0x7ffff7f79860}
PRETTY_FUNCTION = "virtual int QUICK_SELECT_DESC::get_next()"
#12 0x0000000000e82577 in rr_quick (info=0x7fffc8c763d0) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/records.cc:369
tmp = 32767
#13 0x0000000000f19607 in join_init_read_record (tab=0x7fffc8c76340) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc:2440
error = 0
#14 0x0000000000f16e88 in sub_select (join=0x7fffc8c31e60, join_tab=0x7fffc8c76340, end_of_records=false) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc:1297
error = 29354464
db_stack_frame = {func = 0x1bfec01 "do_select", file = 0x1bfe9e0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc", level = 2147483657, prev = 0x7ffff7f798e0}
info = 0x7fffc8c763d0
rc = NESTED_LOOP_OK
in_first_read = false
#15 0x0000000000f16760 in do_select (join=0x7fffc8c31e60) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc:953
join_tab = 0x7fffc8c76340
rc = 0
error = NESTED_LOOP_OK
db_stack_frame = {func = 0x1bfea1c "JOIN::exec", file = 0x1bfe9e0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc", level = 2147483656, prev = 0x7ffff7f79960}
PRETTY_FUNCTION = "int do_select(JOIN*)"
#16 0x0000000000f14709 in JOIN::exec (this=0x7fffc8c31e60) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_executor.cc:207
trace = 0x7fffd1baa630
trace_wrapper = {<Opt_trace_struct> = {started = false, requires_key = 154, has_disabled_I_S = 247, empty = 247, stmt = 0x1109bf0 <mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int)+997>,
saved_key = 0x7ffff7f799b0 "\b", previous_key = "\000\000\000\000\001\000\000\000\000(\303\310\377\177\000\000\000p\272\321\377\177\000\000\b"}, }
trace_steps = {<Opt_trace_struct> = {started = false, requires_key = 154, has_disabled_I_S = 247, empty = 247, stmt = 0x1ac9077 <db_enter+567>, saved_key = 0x7ffff7f79a90 "\212{\301\001",
previous_key = "\000b^\364K\356-\aP{\301\001\000\000\000\000X\272\272\321\377\177\000\000P"}, }
columns_list = 0x7fffd1baaf08
PRETTY_FUNCTION = "void JOIN::exec()"
FUNCTION = "exec"
trace_exec = {<Opt_trace_struct> = {started = false, requires_key = 124, has_disabled_I_S = 193, empty = true, stmt = 0x0, saved_key = 0xc17d10 "_addEPKcx",
previous_key = "@\341\300\310\000\000\001\000\000\232\367\367\377\177\000\000\236f\254\001\000\000\000\000\200"}, }
db_stack_frame = {func = 0x1c17cf6 "mysql_execute_select", file = 0x1c17b50 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc", level = 2147483655, prev = 0x7ffff7f79a90}
#17 0x0000000000f80b2f in mysql_execute_select (thd=0x7fffd1ba7000, select_lex=0x7fffd1baade8, free_join=true) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc:1134
err = false
join = 0x7fffc8c31e60
PRETTY_FUNCTION = "bool mysql_execute_select(THD*, SELECT_LEX*, bool)"
FUNCTION = "mysql_execute_select"
db_stack_frame = {func = 0x1c17b8a "handle_select", file = 0x1c17b50 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc", level = 2147483654, prev = 0x7ffff7f79bf0}
#18 0x0000000000f80e09 in mysql_select (thd=0x7fffd1ba7000, tables=0x7fffc8c31280, wild_num=1, fields=..., conds=0x7fffc8c31a20, order=0x7fffd1baafb0, group=0x7fffd1baaee8, having=0x0, select_options=2147748608,
result=0x7fffc8c31e38, unit=0x7fffd1baa790, select_lex=0x7fffd1baade8) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc:1255
free_join = true
first_order = 0x7fffc8c31d30
FUNCTION = "mysql_select"
og_num = 1
first_group = 0x0
db_stack_frame = {func = 0x1c17b8a "handle_select", file = 0x1c17b50 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc", level = 2147483654, prev = 0x7ffff7f79bf0}
#19 0x0000000000f7ecde in handle_select (thd=0x7fffd1ba7000, result=0x7fffc8c31e38, setup_tables_done_option=0) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_select.cc:126
unit = 0x7fffd1baa790
pid = 0
lex = 0x7fffd1baa6d0
select_lex = 0x7fffd1baade8
res = false
db_stack_frame = {func = 0x1c0dba9 "mysql_execute_command", file = 0x1c0d0d0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc", level = 2147483653, prev = 0x7ffff7f79ef0}
#20 0x0000000000f54fb2 in execute_sqlcom_select (thd=0x7fffd1ba7000, all_tables=0x7fffc8c31280, last_timer=0x7ffff7f7b430) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc:6390
save_result = 0x7fffc8c31e38
analyse_result = 0x0
lex = 0x7fffd1baa6d0
result = 0x7fffc8c31e38
statement_timer_armed = false
res = false
#21 0x0000000000f4cbe5 in mysql_execute_command (thd=0x7fffd1ba7000, statement_start_time=0x7ffff7f7b268, post_parse=0x7ffff7f7b430) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc:3575
up_result = 0
select_lex = 0x7fffd1baade8
unit = 0x7fffd1baa790
PRETTY_FUNCTION = "int mysql_execute_command(THD*, ulonglong*, ulonglong*)"
trace_command = {<Opt_trace_struct> = {started = false, requires_key = false, has_disabled_I_S = false, empty = false, stmt = 0x7fffc8c13080,
saved_key = 0x7fffc8c31017 "* FROM t2 WHERE c1<=127 ORDER BY c1 DESC", previous_key = "\004\000\000\000\377\177\000\000\020\245J\002\000\000\000\000\031\020\303\310\377\177\000\000\004"}, }
trace_command_steps = {<Opt_trace_struct> = {started = false, requires_key = false, has_disabled_I_S = false, empty = false, stmt = 0x7fff00000004, saved_key = 0x24accb8 <symbols+15000> "\332F\300\001",
previous_key = "!\020\303\310\377\177\000\000\005\000\000\000\377\177\000\000\000\000\000\000\000\000\000\000\002"}, }
FUNCTION = "mysql_execute_command"
have_table_map_for_update = false
ots = {ctx = 0x7fffd1baa630, error = false}
lex = 0x7fffd1baa6d0
first_table = 0x7fffc8c31280
time_beg = {tv_sec = 0, tv_nsec = 6983826}
res = 0
all_tables = 0x7fffc8c31280
db_stack_frame = {func = 0x1c0ef60 "mysql_parse", file = 0x1c0d0d0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc", level = 2147483652, prev = 0x7ffff7f7b2b0}
#22 0x0000000000f57f56 in mysql_parse (thd=0x7fffd1ba7000, rawbuf=0x7fffc8c31010 "SELECT * FROM t2 WHERE c1<=127 ORDER BY c1 DESC", length=47, parser_state=0x7ffff7f7bcd0, last_timer=0x7ffff7f7b430,
async_commit=0x7ffff7f7b3fc "") at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc:7783
attrs = {connection_attrs_map = 0x7fffd1baa670, query_attrs_map = 0x7fffd1baa640, database = 0x7fffc8c1c090 "test"}
lex = 0x7fffd1baa6d0
err = false
qlen = 47
query_throttled = false
found_semicolon = 0x0
statement_start_time = 17185206810660141
PRETTY_FUNCTION = "void mysql_parse(THD*, char*, uint, Parser_state*, ulonglong*, my_bool*)"
FUNCTION = "mysql_parse"
error = 0
db_stack_frame = {func = 0x1c0d3e5 "dispatch_command", file = 0x1c0d0d0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc", level = 2147483651, prev = 0x7ffff7f7b520}
#23 0x0000000000f4870e in dispatch_command (command=COM_QUERY, thd=0x7fffd1ba7000, packet=0x7fffcea0c001 "", packet_length=47, srv_session=0x0) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc:1862
query_ptr = 0x7fffcea0c001 ""
query_len = 47
packet_end = 0x7fffc8c3103f ""
parser_state = {m_input = {m_compute_digest = false}, m_lip = {m_thd = 0x7fffd1ba7000, yylineno = 1, yytoklen = 2, yylval = 0x7ffff7f7a370, lookahead_token = -1, lookahead_yylval = 0x0,
m_ptr = 0x7fffc8c31040 "\004", m_tok_start = 0x7fffc8c31040 "\004", m_tok_end = 0x7fffc8c31040 "\004", m_end_of_query = 0x7fffc8c3103f "", m_tok_start_prev = 0x7fffc8c3103f "",
m_buf = 0x7fffc8c31010 "SELECT * FROM t2 WHERE c1<=127 ORDER BY c1 DESC", m_buf_length = 47, m_echo = true, m_echo_saved = 127, m_cpp_buf = 0x7fffc8c310a8 "SELECT * FROM t2 WHERE c1<=127 ORDER BY c1 DESC",
m_cpp_ptr = 0x7fffc8c310d7 "", m_cpp_tok_start = 0x7fffc8c310d7 "", m_cpp_tok_start_prev = 0x7fffc8c310d7 "", m_cpp_tok_end = 0x7fffc8c310d7 "", m_body_utf8 = 0x0, m_body_utf8_ptr = 0x1b134e6 "localhost",
m_cpp_utf8_processed_ptr = 0x0, next_state = MY_LEX_END, found_semicolon = 0x0, tok_bitmap = 0 '\000', ignore_space = false, stmt_prepare_mode = false, multi_statements = true, in_comment = NO_COMMENT,
in_comment_saved = (unknown: 4160209808), m_cpp_text_start = 0x7fffc8c310d0 "c1 DESC", m_cpp_text_end = 0x7fffc8c310d2 " DESC", m_underscore_cs = 0x0, m_digest = 0x0}, m_yacc = {yacc_yyss = 0x0,
yacc_yyvs = 0x0, m_set_signal_info = {m_item = {0x0 <repeats 12 times>}}, m_lock_type = TL_READ_DEFAULT, m_mdl_type = MDL_SHARED_READ, m_ha_rkey_mode = HA_READ_KEY_EXACT}, m_digest_psi = 0x7fffd1baa1d0}
t_name_binlog_gtid = '\000' <repeats 15 times>
t_name_binlog = '\000' <repeats 15 times>
last_timer = 17185206811125498
db_stack_frame = {func = 0x1c0d24f "do_command", file = 0x1c0d0d0 "/ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc", level = 2147483650, prev = 0x7ffff7f7c980}
PRETTY_FUNCTION = "bool dispatch_command(enum_server_command, THD*, char*, uint, Srv_session*)"
net = 0x7fffd1ba8258
query_start_status = {created_tmp_disk_tables = 140737353595008, created_tmp_tables = 28086934, ha_commit_count = 140737353595056, ha_delete_count = 283487407791, ha_read_first_count = 12884901921,
ha_read_last_count = 140736561492096, ha_read_key_count = 140737353594512, ha_read_next_count = 281478344794432, ha_read_prev_count = 140737353594528, ha_read_rnd_count = 28075678,
ha_read_rnd_next_count = 140736561492096, ha_key_skipped_count = 140736561492096, ha_delete_skipped_count = 140737353595104, ha_multi_range_read_init_count = 28086934, ha_rollback_count = 140737353595152,
ha_update_count = 283487407791, ha_write_count = 12884901921, ha_prepare_count = 140736561492096, ha_discover_count = 1, ha_savepoint_count = 281478344794432, ha_savepoint_rollback_count = 140737353594624,
ha_external_lock_count = 28075678, opened_tables = 140736561492096, opened_shares = 19566255, table_open_cache_hits = 30604626, table_open_cache_misses = 19566255, table_open_cache_overflows = 30604626,
select_full_join_count = 0, select_full_range_join_count = 140737353594688, select_range_count = 281478344794432, select_range_check_count = 140737353594704, select_scan_count = 28075678,
long_query_count = 140736561492096, filesort_merge_passes = 140736561492096, filesort_range_count = 140737353595280, filesort_rows = 28086934, filesort_scan_count = 140737353595328,
com_stmt_prepare = 283487407791, com_stmt_reprepare = 12884901921, com_stmt_execute = 140736561492096, com_stmt_send_long_data = 140737353594784, com_stmt_fetch = 281478344794432,
com_stmt_reset = 140737353594800, com_stmt_close = 28075678, read_requests = 140736561492096, rows_examined = 140736561492096, rows_sent = 140737353595376, bytes_received = 28086934,
bytes_sent = 140737353595424, command_time = 283487407791, parse_time = 12884901921, pre_exec_time = 140736561492096, exec_time = 38765792, open_table_time = 281478344794432, read_time = 140737353594896,
max_statement_time_exceeded = 28075678, max_statement_time_set = 140736561492096, max_statement_time_set_failed = 140736561492096, tmp_table_bytes_written = 140737353595472, questions = 28086934,
com_other = 140737353595520, com_stat = {286835945600, 12884901921, 140736561492096, 140737353595552, 287225937920, 12884901921, 140736561492096, 140737353595072, 28071301, 140737353595072, 32794378,
17870283321406128128, 140736561500928, 140737353595176, 140736561500960, 38765792, 72057598064459776, 0, 140736762699912, 140737353595168, 28071301, 140737353595168, 32794378, 18014398509481984000,
19566255, 30604626, 19566255, 140736561501088, 140736762720384, 140737353595248, 28070907, 140737353595200, 32794378, 2305843009213693952, 140736561501312, 140737353595352, 140737310353008, 8455174512,
72057596185411584, 140736561501088, 140736762720384, 140737353595344, 28070907, 140737353595344, 32794378, 3458764513820540928, 140736561501280, 140737353595448, 140736561501312, 4333733088,
72057596185411584, 140736561501088, 140736762720384, 140737353595440, 28070907, 140737353595440, 28153453, 4035225266123964416, 6, 140737353595856, 6, 140736930344964, 38765792, 3368113280, 6,
140737353595536, 28071107, 140737353595536, 140737353595856, 2131293128827600902, 0, 38765792, 140736762553992, 38765792, 26266034127, 0, 140736762720392, 140737353595664, 28072153, 140737353595632,
140736762720384, 72879684566, 140737353595856, 2131293128827600902, 0, 38765792, 140736762553992, 140737353595680, 4323034444, 140737310290464, 140737310353008, 140736561501312, 19566255, 29279357, 0,
140736762720384, 281478344794432, 140737353595728, 28075678, 140736561492096, 140736561492096, 140737353596304, 28086934, 140737353596528, 49481592582288, 8589934625, 140736561492096, 1, 140737353596295,
140736964083920, 17179869193, 140736964083676, 140736964082368, 140737353595888, 20916993792, 140736762720384, 140737310353040, 7524389236345471013, 2666131138324755311, 7165064281379008256,
128039139175521, 140737353596304, 15737859, 140736561533184, 140736712054306, 140736712053760, 140736712044544, 4160208048, 140736561546752, 4, 15, 7165064281379008370, 128039139175521, 2147483652,
517331542207259136, 140737353596304, 15476217, 0, 19566255, 29351280, 0, 29277087, 281478344794432, 140737353596096, 28075678, 24842940544}, last_query_cost = 6.9533282466750427e-310,
last_query_partial_plans = 140737353596144}
FUNCTION = "dispatch_command"
error = false
init_timer = 17185206810660141
start_perf_read = {bytes = 0, requests = 0, svc_time = 0, svc_time_max = 0, wait_time = 0, wait_time_max = 0, slow_ios = 0}
start_perf_read_blob = {bytes = 0, requests = 0, svc_time = 0, svc_time_max = 0, wait_time = 0, wait_time_max = 0, slow_ios = 0}
start_perf_read_primary = {bytes = 0, requests = 0, svc_time = 0, svc_time_max = 0, wait_time = 0, wait_time_max = 0, slow_ios = 0}
start_perf_read_secondary = {bytes = 0, requests = 0, svc_time = 0, svc_time_max = 0, wait_time = 0, wait_time_max = 0, slow_ios = 0}
async_commit = 0 '\000'
query_start_status_ptr = 0x0
#24 0x0000000000f46af8 in do_command (thd=0x7fffd1ba7000) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_parse.cc:1207
return_value = false
packet = 0x7fffcea0c000 "\001"
packet_length = 48
net = 0x7fffd1ba8258
command = COM_QUERY
PRETTY_FUNCTION = "bool do_command(THD*)"
FUNCTION = "do_command"
db_stack_frame = {func = 0x1f4672d "?func", file = 0x1f46733 "?file", level = 2147483649, prev = 0x0}
#25 0x0000000000f048d7 in do_handle_one_connection (thd_arg=0x7fffd1ba7000) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_connect.cc:1142
rc = false
net = 0x7fffd1ba8258
t_name_connection = '\000' <repeats 15 times>
start_time = 17185054218907197
launch_time = 1073
us = 0x27a2d60 <other_user_stats>
conn_timeout = 28800
connection_create_time = 4342180
thd = 0x7fffd1ba7000
timeout_error_msg_buf = "\326\a#HY000Closed connection: idle timeout after 28800s", '\000' <repeats 40 times>, "\001\000\000\000\024\313\367\367\377\177\000\000\360:\300\340\377\177\000\000\000\000\000\000\000\000\000\001\257\216*\001\000\000\000\000\320\312\367\367\377\177\000\000ԏ*\001\000\000\000\000\360\312\367\367\006\000\000\000\200\001\000\000\000\000\000\000\300\000\200\365\377\177\000\000\257\216*\001\000\000\000\000\000\313\367\367\377\177\000\000\000\000@\365\377\177\000\000\060\n\200\365\377\177\000\000\300"...
attrs = {connection_attrs_map = 0x0, query_attrs_map = 0x0, database = 0x0}
#26 0x0000000000f042ee in handle_one_connection (arg=0x7fffd1ba7000) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_connect.cc:963
thd = 0x7fffd1ba7000
#27 0x0000000001a9b363 in pfs_spawn_thread (arg=0x7ffff54bbe00) at /ssd/percona/myrocks/facebook-mysql-5.6/storage/perfschema/pfs.cc:1860
typed_arg = 0x7ffff54bbe00
user_arg = 0x7fffd1ba7000
pfs = 0x7fffe0c03ac0
user_start_routine = 0xf042bb <handle_one_connection(void*)>
klass = 0x7ffff5658540
#28 0x00007ffff6b0e184 in start_thread (arg=0x7ffff7f7d700) at pthread_create.c:312
__res =
pd = 0x7ffff7f7d700
now =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737353602816, 4112610725934258863, 1, 0, 140737353603520, 140737353602816, -4112628385098376529, -4112630010016179537}, mask_was_saved = 0}}, priv = {pad = {0x0,
0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
pagesize_m1 =
sp =
freesize =
PRETTY_FUNCTION = "start_thread"
#29 0x00007ffff601affd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

@hermanlee
Copy link
Contributor

@georgelorchpercona Yes, I think this check did not account for the code path where we calculate the successor key of the where conditional to position the iterator in the cases of find_flag = HA_READ_PREFIX_LAST_OR_PREV (or a couple others). In this case, the lookup key is the last key in the index: (e.g. 00 00 01 04 ff), so the successor key changes the four byte index_prefix: (e.g. 00 00 01 05 00). The calculation is correct, but the lookup key ends up being outside the range of the current index and triggers the failure.

We'll need to change the assert when checking the lookup key.

cc: @yoshinorim

facebook-github-bot pushed a commit that referenced this issue Oct 16, 2017
Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes #730

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: dc85b91
jmfaleiro pushed a commit to jmfaleiro/mysql-5.6 that referenced this issue Oct 23, 2017
…book#728)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730
GitHub Author: Yoshinori Matsunobu <yoshinori@fb.com>

Github PR Sync: {sync, type="child", parent="github", parentrepo="facebook/mysql-5.6", parentprnum="730", parentprfbid="130952380895779"}

Test Plan: mtr

Reviewers: generatedunixname499836121, svcscm

Reviewed By: svcscm

Subscribers: webscalesql-eng@fb.com

Differential Revision: https://phabricator.intern.facebook.com/D6053481

Signature: 6053481:1508180303:9daea859dcb9216b7544390358eebd530a66b9b5
facebook-github-bot pushed a commit that referenced this issue Dec 23, 2019
Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes #730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 12, 2020
…ook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 9, 2020
…ook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 16, 2020
…ook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Oct 5, 2020
…ook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Nov 11, 2020
…ook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Test Plan: mtr

Differential Revision: D6053481

Pulled By: yoshinorim

fbshipit-source-id: 69344b9
facebook-github-bot pushed a commit that referenced this issue Mar 8, 2021
Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes #730

Differential Revision: D6053481 (1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 16, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 17, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 30, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 30, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 31, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 1, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 2, 2021
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481 (facebook@1d01321)

Pulled By: yoshinorim

fbshipit-source-id: fc6d3f38b58
hermanlee pushed a commit that referenced this issue Jan 10, 2022
Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes #730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jan 17, 2022
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue May 20, 2022
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue May 23, 2022
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
laurynas-biveinis pushed a commit to laurynas-biveinis/mysql-5.6 that referenced this issue Aug 11, 2022
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Mar 25, 2023
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Mar 28, 2023
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jun 1, 2023
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jun 14, 2023
…ook#730) (facebook#730)

Summary:
This diff removes an extra assertion on covers_key(b).
Prefix condition might be incremented by successor(). It may
overflow and points to outside of the index_id. This is an expected
behavior and it should not fail.
Closes facebook#730

Differential Revision: D6053481

Pulled By: yoshinorim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants