Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
--source include/have_partition.inc
|
|
CREATE TABLE t1 (a INT); |
INSERT INTO t1 () VALUES (1),(NULL),(2); |
|
CREATE TABLE t2 (b INT, c INT, KEY(b), KEY(c)) PARTITION BY HASH(b); |
INSERT INTO t2 VALUES (NULL,4),(NULL,6),(7,8); |
|
SELECT * FROM t1 WHERE a NOT IN (SELECT c FROM t2 WHERE a IN (SELECT c FROM t2) AND b != 9); |
|
# Cleanup
|
DROP TABLE t1, t2; |
10.5 b546913b |
mariadbd: /data/src/10.5/sql/handler.h:4357: virtual void handler::disable_pushed_rowid_filter(): Assertion `pushed_rowid_filter != __null && save_pushed_rowid_filter == __null' failed.
|
220703 15:42:49 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f9a8f174662 in __GI___assert_fail (assertion=0x55a3fff1aad8 "pushed_rowid_filter != __null && save_pushed_rowid_filter == __null", file=0x55a3fff1a546 "/data/src/10.5/sql/handler.h", line=4357, function=0x55a3fff1aaa0 "virtual void handler::disable_pushed_rowid_filter()") at assert.c:101
|
No locals.
|
#8 0x000055a3ff34dd6d in handler::disable_pushed_rowid_filter (this=0x7f9a780609d0) at /data/src/10.5/sql/handler.h:4357
|
__PRETTY_FUNCTION__ = "virtual void handler::disable_pushed_rowid_filter()"
|
#9 0x000055a3ff42a197 in subselect_single_select_engine::exec (this=0x7f9a78019840) at /data/src/10.5/sql/item_subselect.cc:4085
|
cond_guard = 0x7f9a78073188
|
i = 0
|
tab = 0x7f9a78075c60
|
changed_tabs = {0x7f9a78224aa8, 0x7f9a78084be8, 0x7f9a89b2ff60, 0x55a3ffc2ac62 <_my_thread_var+20>, 0x7f9a89b2ff60, 0x55a3ffc2ad8e <my_thread_var_dbug+31>, 0x2, 0x7f9a78000b60, 0x7f9a89b2ff80, 0x55a3ffc5797b <code_state+167>, 0x7f9a78000ce0, 0x7f9a78000cb8, 0x7f9a89b2ffb0, 0x55a3ffc5a19c <_db_pargs_+20>, 0x55a400037c49, 0xad00000001, 0x2, 0xa49f3700, 0x55a3ffdbc268, 0x0, 0x7f9a89b2ffe0, 0x10000ffc2ad8e, 0x7f9a89b30000, 0x55a3ffc5ad6d <DoTrace+150>, 0x7f9a89b30000, 0x7f9a78000ce0, 0x7f9a78000ce0, 0x178000cb8, 0x7f9a89b30240, 0xffc59fdf, 0x55a3fff26a90, 0x0, 0x7f9a89b30040, 0x10000ffc2ad8e, 0x7f9a89b30060, 0x55a3ffc5ad6d <DoTrace+150>, 0x7f9a89b30060, 0x7f9a78000ce0, 0x7f9a78000ce0, 0x178000cb8, 0x7f9a89b302a0, 0x55a3ffc59fdf <_db_return_+209>, 0x7f9a780840d0, 0x89b302d0, 0x55a3fff418e8, 0x0, 0x7f9a89b300b0, 0x55a3ffc2ac62 <_my_thread_var+20>, 0x7f9a89b300c0, 0x55a3ffc2ad8e <my_thread_var_dbug+31>, 0x7f9a89b300d0, 0x7f9a78000b60, 0x7f9a89b300e0, 0x55a3ffc5797b <code_state+167>, 0x7f9a78000ce0, 0x7f9a78000cb8, 0x7f9a89b30120, 0x55a3ffc5ae90 <_db_keyword_+52>, 0x55a3fff41650, 0x178006a78, 0x55a3fff41981}
|
last_changed_tab = 0x7f9a89b2ff20
|
_db_stack_frame_ = {func = 0x55a3fff418e8 "Item_subselect::exec", file = 0x55a3fff41650 "/data/src/10.5/sql/item_subselect.cc", level = 2147483663, line = -1, prev = 0x7f9a89b30150}
|
save_where = 0x55a3ffd55578 "order clause"
|
save_select = 0x7f9a78015428
|
#10 0x000055a3ff41cff3 in Item_subselect::exec (this=0x7f9a780195f8) at /data/src/10.5/sql/item_subselect.cc:837
|
org_engine = 0x7f9a78019840
|
_db_stack_frame_ = {func = 0x55a3fff41a86 "Item_in_subselect::exec", file = 0x55a3fff41650 "/data/src/10.5/sql/item_subselect.cc", level = 2147483662, line = -1, prev = 0x7f9a89b301c0}
|
__PRETTY_FUNCTION__ = "virtual bool Item_subselect::exec()"
|
res = false
|
#11 0x000055a3ff41d6b9 in Item_in_subselect::exec (this=0x7f9a780195f8) at /data/src/10.5/sql/item_subselect.cc:1017
|
_db_stack_frame_ = {func = 0x55a3fff2afde " Item_in_optimizer::val_int", file = 0x55a3fff2aad0 "/data/src/10.5/sql/item_cmpfunc.cc", level = 2147483661, line = 1017, prev = 0x7f9a89b30270}
|
__PRETTY_FUNCTION__ = "virtual bool Item_in_subselect::exec()"
|
#12 0x000055a3ff42155e in Item_in_subselect::val_bool (this=0x7f9a780195f8) at /data/src/10.5/sql/item_subselect.cc:1947
|
__PRETTY_FUNCTION__ = "virtual bool Item_in_subselect::val_bool()"
|
#13 0x000055a3fee9c7ef in Item::val_bool_result (this=0x7f9a780195f8) at /data/src/10.5/sql/item.h:1575
|
No locals.
|
#14 0x000055a3ff383bab in Item_in_optimizer::val_int (this=0x7f9a7806f788) at /data/src/10.5/sql/item_cmpfunc.cc:1638
|
item_subs = 0x7f9a780195f8
|
all_left_cols_null = true
|
ncols = 1
|
tmp = 137
|
__PRETTY_FUNCTION__ = "virtual longlong Item_in_optimizer::val_int()"
|
_db_stack_frame_ = {func = 0x55a3fff26b48 "Item_cache_wrapper::val_bool", file = 0x55a3fff2418c "/data/src/10.5/sql/item.cc", level = 2147483660, line = -1, prev = 0x7f9a89b30330}
|
#15 0x000055a3fee9c763 in Item::val_int_result (this=0x7f9a7806f788) at /data/src/10.5/sql/item.h:1571
|
No locals.
|
#16 0x000055a3ff3722b7 in Item_cache_int::cache_value (this=0x7f9a7807dd08) at /data/src/10.5/sql/item.cc:10045
|
No locals.
|
#17 0x000055a3ff37ab5a in Item_cache_wrapper::cache (this=0x7f9a7807dc40) at /data/src/10.5/sql/item.cc:8808
|
No locals.
|
#18 0x000055a3ff36f05d in Item_cache_wrapper::val_bool (this=0x7f9a7807dc40) at /data/src/10.5/sql/item.cc:8994
|
cached_value = 0x0
|
_db_stack_frame_ = {func = 0x55a3ffd58af3 "evaluate_join_record", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483659, line = -1, prev = 0x7f9a89b30410}
|
#19 0x000055a3ff37eacc in Item_func_not::val_int (this=0x7f9a78019880) at /data/src/10.5/sql/item_cmpfunc.cc:202
|
__PRETTY_FUNCTION__ = "virtual longlong Item_func_not::val_int()"
|
value = false
|
#20 0x000055a3ff04e82f in evaluate_join_record (join=0x7f9a7801a2c8, join_tab=0x7f9a78070d60, error=0) at /data/src/10.5/sql/sql_select.cc:21029
|
shortcut_for_distinct = false
|
found_records = 0
|
select_cond = 0x7f9a78019880
|
select_cond_result = true
|
_db_stack_frame_ = {func = 0x55a3ffd58ae8 "sub_select", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483658, line = -1, prev = 0x7f9a89b304b0}
|
#21 0x000055a3ff04e5d8 in sub_select (join=0x7f9a7801a2c8, join_tab=0x7f9a78070d60, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20970
|
_db_stack_frame_ = {func = 0x55a3ffd58908 "do_select", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483657, line = -1, prev = 0x7f9a89b30550}
|
error = 0
|
rc = NESTED_LOOP_OK
|
info = 0x7f9a78070e28
|
pfs_batch_update = false
|
skip_over = false
|
#22 0x000055a3ff04d859 in do_select (join=0x7f9a7801a2c8, procedure=0x0) at /data/src/10.5/sql/sql_select.cc:20463
|
join_tab = 0x7f9a78070d60
|
rc = 0
|
error = NESTED_LOOP_OK
|
_db_stack_frame_ = {func = 0x55a3ffd56101 "JOIN::exec_inner", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483656, line = -1, prev = 0x7f9a89b305b0}
|
__PRETTY_FUNCTION__ = "int do_select(JOIN*, Procedure*)"
|
#23 0x000055a3ff020e13 in JOIN::exec_inner (this=0x7f9a7801a2c8) at /data/src/10.5/sql/sql_select.cc:4540
|
columns_list = 0x7f9a78015578
|
_db_stack_frame_ = {func = 0x55a3ffd561df "mysql_select", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483655, line = -1, prev = 0x7f9a89b306f0}
|
__PRETTY_FUNCTION__ = "void JOIN::exec_inner()"
|
trace_wrapper = {<Json_writer_struct> = {_vptr.Json_writer_struct = 0x55a4005b8d08 <vtable for Json_writer_object+16>, my_writer = 0x0, context = {writer = 0x0}, closed = false}, <No data fields>}
|
trace_exec = {<Json_writer_struct> = {_vptr.Json_writer_struct = 0x55a4005b8d08 <vtable for Json_writer_object+16>, my_writer = 0x0, context = {writer = 0x0}, closed = false}, <No data fields>}
|
trace_steps = {<Json_writer_struct> = {_vptr.Json_writer_struct = 0x55a4005b8ce8 <vtable for Json_writer_array+16>, my_writer = 0x0, context = {writer = 0x0}, closed = false}, <No data fields>}
|
#24 0x000055a3ff01ff15 in JOIN::exec (this=0x7f9a7801a2c8) at /data/src/10.5/sql/sql_select.cc:4320
|
No locals.
|
#25 0x000055a3ff02176b in mysql_select (thd=0x7f9a78000db8, tables=0x7f9a78015a38, fields=@0x7f9a78015578: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x7f9a780159f0, last = 0x7f9a780159f0, elements = 1}, <No data fields>}, conds=0x7f9a78019880, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f9a7801a2a0, unit=0x7f9a78004f60, select_lex=0x7f9a78015428) at /data/src/10.5/sql/sql_select.cc:4797
|
err = 0
|
free_join = true
|
_db_stack_frame_ = {func = 0x55a3ffd550b0 "handle_select", file = 0x55a3ffd54fc8 "/data/src/10.5/sql/sql_select.cc", level = 2147483654, line = -1, prev = 0x7f9a89b307b0}
|
join = 0x7f9a7801a2c8
|
#26 0x000055a3ff011135 in handle_select (thd=0x7f9a78000db8, lex=0x7f9a78004e98, result=0x7f9a7801a2a0, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:444
|
unit = 0x7f9a78004f60
|
res = false
|
select_lex = 0x7f9a78015428
|
_db_stack_frame_ = {func = 0x55a3ffd46998 "mysql_execute_command", file = 0x55a3ffd45d20 "/data/src/10.5/sql/sql_parse.cc", level = 2147483653, line = -1, prev = 0x7f9a89b30e00}
|
#27 0x000055a3fefd3f48 in execute_sqlcom_select (thd=0x7f9a78000db8, all_tables=0x7f9a78015a38) at /data/src/10.5/sql/sql_parse.cc:6314
|
save_protocol = 0x0
|
lex = 0x7f9a78004e98
|
result = 0x7f9a7801a2a0
|
res = false
|
__PRETTY_FUNCTION__ = "bool execute_sqlcom_select(THD*, TABLE_LIST*)"
|
#28 0x000055a3fefcb27f in mysql_execute_command (thd=0x7f9a78000db8) at /data/src/10.5/sql/sql_parse.cc:4005
|
privileges_requested = SELECT_ACL
|
res = 0
|
up_result = 0
|
lex = 0x7f9a78004e98
|
select_lex = 0x7f9a78015428
|
first_table = 0x7f9a78015a38
|
all_tables = 0x7f9a78015a38
|
unit = 0x7f9a78004f60
|
have_table_map_for_update = false
|
rpl_filter = 0x0
|
_db_stack_frame_ = {func = 0x55a3ffd47cef "mysql_parse", file = 0x55a3ffd45d20 "/data/src/10.5/sql/sql_parse.cc", level = 2147483652, line = -1, prev = 0x7f9a89b31210}
|
__PRETTY_FUNCTION__ = "int mysql_execute_command(THD*)"
|
ots = {ctx = 0x7f9a78004b60, traceable = false}
|
trace_command = {<Json_writer_struct> = {_vptr.Json_writer_struct = 0x55a4005b8d08 <vtable for Json_writer_object+16>, my_writer = 0x0, context = {writer = 0x0}, closed = false}, <No data fields>}
|
trace_command_steps = {<Json_writer_struct> = {_vptr.Json_writer_struct = 0x55a4005b8ce8 <vtable for Json_writer_array+16>, my_writer = 0x0, context = {writer = 0x0}, closed = false}, <No data fields>}
|
orig_binlog_format = BINLOG_FORMAT_MIXED
|
orig_current_stmt_binlog_format = BINLOG_FORMAT_STMT
|
#29 0x000055a3fefd8d19 in mysql_parse (thd=0x7f9a78000db8, rawbuf=0x7f9a78015310 "SELECT * FROM t1 WHERE a NOT IN (SELECT c FROM t2 WHERE a IN (SELECT c FROM t2) AND b != 9)", length=91, parser_state=0x7f9a89b313d0, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8100
|
found_semicolon = 0x0
|
error = 32666
|
lex = 0x7f9a78004e98
|
err = false
|
_db_stack_frame_ = {func = 0x55a3ffd461b2 "dispatch_command", file = 0x55a3ffd45d20 "/data/src/10.5/sql/sql_parse.cc", level = 2147483651, line = -1, prev = 0x7f9a89b313b0}
|
__PRETTY_FUNCTION__ = "void mysql_parse(THD*, char*, uint, Parser_state*, bool, bool)"
|
#30 0x000055a3fefc4e52 in dispatch_command (command=COM_QUERY, thd=0x7f9a78000db8, packet=0x7f9a7800b5c9 "", packet_length=91, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
|
packet_end = 0x7f9a7801536b ""
|
parser_state = {m_lip = {lookahead_token = -1, lookahead_yylval = 0x0, m_thd = 0x7f9a78000db8, m_ptr = 0x7f9a7801536c "\004", m_tok_start = 0x7f9a7801536c "\004", m_tok_end = 0x7f9a7801536c "\004", m_end_of_query = 0x7f9a7801536b "", m_tok_start_prev = 0x7f9a7801536b "", m_buf = 0x7f9a78015310 "SELECT * FROM t1 WHERE a NOT IN (SELECT c FROM t2 WHERE a IN (SELECT c FROM t2) AND b != 9)", m_buf_length = 91, m_echo = true, m_echo_saved = 108, m_cpp_buf = 0x7f9a780153c8 "SELECT * FROM t1 WHERE a NOT IN (SELECT c FROM t2 WHERE a IN (SELECT c FROM t2) AND b != 9)", m_cpp_ptr = 0x7f9a78015423 "", m_cpp_tok_start = 0x7f9a78015423 "", m_cpp_tok_start_prev = 0x7f9a78015423 "", m_cpp_tok_end = 0x7f9a78015423 "", m_body_utf8 = 0x0, m_body_utf8_ptr = 0x7f9a78000ce0 "\242\276\257\305\375\177", m_cpp_utf8_processed_ptr = 0x0, next_state = MY_LEX_END, found_semicolon = 0x0, ignore_space = false, stmt_prepare_mode = false, multi_statements = true, yylineno = 1, m_digest = 0x0, in_comment = NO_COMMENT, in_comment_saved = (DISCARD_COMMENT | unknown: 0x7f98), m_cpp_text_start = 0x7f9a78015421 "9)", m_cpp_text_end = 0x7f9a78015422 ")", m_underscore_cs = 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_digest_psi = 0x7f9a780048f0}
|
net = 0x7f9a780010e0
|
error = false
|
do_end_of_statement = true
|
_db_stack_frame_ = {func = 0x55a3ffd45f1d "do_command", file = 0x55a3ffd45d20 "/data/src/10.5/sql/sql_parse.cc", level = 2147483650, line = -1, prev = 0x7f9a89b31c80}
|
drop_more_results = false
|
__PRETTY_FUNCTION__ = "bool dispatch_command(enum_server_command, THD*, char*, uint, bool, bool)"
|
__FUNCTION__ = "dispatch_command"
|
res = <optimized out>
|
#31 0x000055a3fefc36ac in do_command (thd=0x7f9a78000db8) at /data/src/10.5/sql/sql_parse.cc:1375
|
return_value = false
|
packet = 0x7f9a7800b5c8 "\001"
|
packet_length = 92
|
net = 0x7f9a780010e0
|
command = COM_QUERY
|
_db_stack_frame_ = {func = 0x55a4001a4760 "?func", file = 0x55a4001a4766 "?file", level = 2147483649, line = -1, prev = 0x0}
|
__PRETTY_FUNCTION__ = "bool do_command(THD*)"
|
__FUNCTION__ = "do_command"
|
#32 0x000055a3ff170ab7 in do_handle_one_connection (connect=0x55a4034eda18, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1418
|
create_user = true
|
thr_create_utime = 3274281802939
|
thd = 0x7f9a78000db8
|
__PRETTY_FUNCTION__ = "void do_handle_one_connection(CONNECT*, bool)"
|
#33 0x000055a3ff170779 in handle_one_connection (arg=0x55a4034cd528) at /data/src/10.5/sql/sql_connect.cc:1312
|
connect = 0x55a4034cd528
|
#34 0x000055a3ff6814d6 in pfs_spawn_thread (arg=0x55a4034ed798) at /data/src/10.5/storage/perfschema/pfs.cc:2201
|
typed_arg = 0x55a4034ed798
|
user_arg = 0x55a4034cd528
|
user_start_routine = 0x55a3ff17071e <handle_one_connection(void*)>
|
pfs = 0x7f9a8ea72140
|
klass = 0x55a402efe900
|
#35 0x00007f9a8f640ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
ret = <optimized out>
|
pd = <optimized out>
|
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140301711910656, 3409811630798055073, 140727920075166, 140727920075167, 140301711908416, 311296, -3429764918130858335, -3429760133126904159}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
|
not_first_call = 0
|
#36 0x00007f9a8f23ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
EXPLAIN |
EXPLAIN
|
{
|
"query_block": { |
"select_id": 1, |
"table": { |
"table_name": "t1", |
"access_type": "ALL", |
"rows": 3, |
"filtered": 100, |
"attached_condition": "!<in_optimizer>(t1.a,<exists>(subquery#2))" |
},
|
"subqueries": [ |
{
|
"query_block": { |
"select_id": 2, |
"outer_ref_condition": "t1.a is not null", |
"having_condition": "trigcond(t2.c is null)", |
"table": { |
"table_name": "<subquery3>", |
"access_type": "eq_ref", |
"possible_keys": ["distinct_key"], |
"key": "distinct_key", |
"key_length": "4", |
"used_key_parts": ["c"], |
"ref": ["func"], |
"rows": 1, |
"filtered": 100, |
"materialized": { |
"unique": 1, |
"query_block": { |
"select_id": 3, |
"table": { |
"table_name": "t2", |
"partitions": ["p0"], |
"access_type": "ref", |
"possible_keys": ["c"], |
"key": "c", |
"key_length": "5", |
"used_key_parts": ["c"], |
"ref": ["test.t1.a"], |
"rows": 2, |
"filtered": 100, |
"using_index": true |
}
|
}
|
}
|
},
|
"full-scan-on-null_key": { |
"table": { |
"table_name": "t2", |
"partitions": ["p0"], |
"access_type": "ref_or_null", |
"possible_keys": ["b", "c"], |
"key": "c", |
"key_length": "5", |
"used_key_parts": ["c"], |
"ref": ["func"], |
"rowid_filter": { |
"range": { |
"key": "b", |
"used_key_parts": ["b"] |
},
|
"rows": 2, |
"selectivity_pct": 66.66666667 |
},
|
"rows": 2, |
"filtered": 66.66666412, |
"attached_condition": "t2.b <> 9 and trigcond(<cache>(t1.a) = t2.c or t2.c is null)" |
}
|
}
|
}
|
}
|
]
|
}
|
}
|
Reproducible with at least InnoDB and MyISAM.
No obvious problem on a non-debug build.