Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.4, 11.8
-
None
Description
ATTENTION: The test case is for reproducing purposes only, don't put it into a regression suite! Create a proper one instead, with debug sync if necessary.
The test case is non-deterministic. It has a loop to avoid running with --repeat. With the current 10K loops it either fails or passes in a few seconds. If it doesn't fail for you, try to increase the number of loops.
CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
|
--connect (con1,localhost,root,,test)
|
--let $conid= `select connection_id()`
|
--delimiter $
|
--send
|
BEGIN NOT ATOMIC |
DECLARE CONTINUE HANDLER FOR 1054 BEGIN END; |
LOOP
|
SELECT * FROM t1 WHERE x = 1; |
END LOOP; |
END $ |
--delimiter ;
|
|
--connection default
|
--let $run= 10000
|
while ($run)
|
{
|
SELECT * FROM t1 WHERE COLUMN_GET( COLUMN_CREATE( 1, 2 ), 3 AS INT ); |
--dec $run |
}
|
|
# Cleanup
|
--eval KILL $conid
|
DROP TABLE t1; |
10.2 b0df247d |
mysqld: /data/src/10.2/sql/item_strfunc.cc:5194: virtual void Item_dyncol_get::print(String*, enum_query_type): Assertion `strncmp(str->ptr() + str->length() - 5, "cast(", 5) == 0' failed.
|
200723 19:34:18 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f7e56e48f12 in __GI___assert_fail (assertion=0x55dcf59f0a40 "strncmp(str->ptr() + str->length() - 5, \"cast(\", 5) == 0", file=0x55dcf59f0520 "/data/src/10.2/sql/item_strfunc.cc", line=5194, function=0x55dcf59f2200 <Item_dyncol_get::print(String*, enum_query_type)::__PRETTY_FUNCTION__> "virtual void Item_dyncol_get::print(String*, enum_query_type)") at assert.c:101
|
#8 0x000055dcf51ad52f in Item_dyncol_get::print (this=0x7f7e40013030, str=0x7f7e5117b280, query_type=QT_EXPLAIN) at /data/src/10.2/sql/item_strfunc.cc:5194
|
#9 0x000055dcf516d719 in Item_func_signed::print (this=0x7f7e400130f0, str=0x7f7e5117b280, query_type=QT_EXPLAIN) at /data/src/10.2/sql/item_func.cc:1079
|
#10 0x000055dcf51272d3 in dbug_print_item (item=0x7f7e400130f0) at /data/src/10.2/sql/item.cc:10835
|
#11 0x000055dcf4eb93cd in JOIN::prepare (this=0x7f7e40013298, tables_init=0x7f7e400126a0, wild_num=1, conds_init=0x7f7e400130f0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f7e40004e28, unit_arg=0x7f7e400046e8) at /data/src/10.2/sql/sql_select.cc:711
|
#12 0x000055dcf4ec437c in mysql_select (thd=0x7f7e40000af0, tables=0x7f7e400126a0, wild_num=1, fields=..., conds=0x7f7e400130f0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f7e40013278, unit=0x7f7e400046e8, select_lex=0x7f7e40004e28) at /data/src/10.2/sql/sql_select.cc:3811
|
#13 0x000055dcf4eb85ec in handle_select (thd=0x7f7e40000af0, lex=0x7f7e40004628, result=0x7f7e40013278, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
|
#14 0x000055dcf4e84036 in execute_sqlcom_select (thd=0x7f7e40000af0, all_tables=0x7f7e400126a0) at /data/src/10.2/sql/sql_parse.cc:6218
|
#15 0x000055dcf4e7a8b7 in mysql_execute_command (thd=0x7f7e40000af0) at /data/src/10.2/sql/sql_parse.cc:3524
|
#16 0x000055dcf4e87d6d in mysql_parse (thd=0x7f7e40000af0, rawbuf=0x7f7e40012458 "SELECT * FROM t1 WHERE COLUMN_GET( COLUMN_CREATE( 1, 2 ), 3 AS INT )", length=68, parser_state=0x7f7e5117c610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
|
#17 0x000055dcf4e76099 in dispatch_command (command=COM_QUERY, thd=0x7f7e40000af0, packet=0x7f7e4008d451 "SELECT * FROM t1 WHERE COLUMN_GET( COLUMN_CREATE( 1, 2 ), 3 AS INT )", packet_length=68, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
|
#18 0x000055dcf4e74b14 in do_command (thd=0x7f7e40000af0) at /data/src/10.2/sql/sql_parse.cc:1377
|
#19 0x000055dcf4fcaaef in do_handle_one_connection (connect=0x55dcf7f77ca0) at /data/src/10.2/sql/sql_connect.cc:1336
|
#20 0x000055dcf4fca85a in handle_one_connection (arg=0x55dcf7f77ca0) at /data/src/10.2/sql/sql_connect.cc:1241
|
#21 0x000055dcf57e0f12 in pfs_spawn_thread (arg=0x55dcf7ec4a70) at /data/src/10.2/storage/perfschema/pfs.cc:1869
|
#22 0x00007f7e58dd14a4 in start_thread (arg=0x7f7e5117d700) at pthread_create.c:456
|
#23 0x00007f7e56f05d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
The table engine seems unimportant, reproducible with at least MyISAM, InnoDB, Aria.
No obvious problem on a non-debug build.
I am getting on 10.5 a similar one, adding to make it searchable:
10.5 9930cb22c7b894100c17d
sql/item_strfunc.cc:5183(Item_dyncol_get::print(String*, enum_query_type))[0x5571b4b4ad92]
sql/item_func.cc:1084(Item_real_typecast::print(String*, enum_query_type))[0x5571b4a8c700]
sql/item.cc:487(Item::print_parenthesised(String*, enum_query_type, precedence))[0x5571b498da1d]
sql/item_cmpfunc.cc:5587(Item_func_isnotnull::print(String*, enum_query_type))[0x5571b4a33457]
sql/item.cc:10545(dbug_print_item(Item*))[0x5571b49e682e]
sql/sql_select.cc:1158(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x5571b420e19e]
sql/sql_select.cc:4634(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5571b423417f]
sql/sql_select.cc:417(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5571b4206860]
sql/sql_parse.cc:6281(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5571b4173a42]
sql/sql_parse.cc:3977(mysql_execute_command(THD*))[0x5571b416292f]
sql/sql_parse.cc:8062(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5571b417e88c]
sql/sql_parse.cc:1892(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5571b41551d4]
sql/sql_parse.cc:1370(do_command(THD*))[0x5571b4151ae2]
sql/threadpool_common.cc:363(threadpool_process_request(THD*))[0x5571b47afce3]
sql/threadpool_common.cc:194(tp_callback(TP_connection*))[0x5571b47af2f3]
sql/threadpool_generic.cc:1562(worker_main(void*))[0x5571b4ead8bf]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5571b52426d8]
nptl/pthread_create.c:487(start_thread)[0x7f50b76f3fa3]
x86_64/clone.S:97(clone)[0x7f50b6cfa4cf]