|
Thanks a lot, I can reproduce it on 10.2, 10.3
on debug version 10.2 2b76f6f61dba93fd920
|
Thread 1 (Thread 0x7f6204095700 (LWP 28494)):
|
|
#3 <signal handler called>
|
#4 0x0000559280d7883f in base_list_iterator::next_fast (this=0x7f6204092300) at /git/10.2/sql/sql_list.h:468
|
#5 0x0000559280f3937b in List_iterator_fast<TABLE>::operator++ (this=0x7f6204092300) at /git/10.2/sql/sql_list.h:591
|
#6 0x000055928101f01a in With_element::instantiate_tmp_tables (this=0x7f61b01feba8) at /git/10.2/sql/sql_cte.cc:1405
|
#7 0x0000559280e1f187 in TABLE_LIST::fill_recursive (this=0x7f61b0220230, thd=0x7f61b0000b00) at /git/10.2/sql/sql_derived.cc:1023
|
#8 0x0000559280e1f43e in mysql_derived_fill (thd=0x7f61b0000b00, lex=0x7f61b0004628, derived=0x7f61b0220230) at /git/10.2/sql/sql_derived.cc:1097
|
#9 0x0000559280e1d490 in mysql_handle_single_derived (lex=0x7f61b0004628, derived=0x7f61b0220230, phases=96) at /git/10.2/sql/sql_derived.cc:197
|
#10 0x0000559280eadeb1 in st_join_table::preread_init (this=0x7f61b049f840) at /git/10.2/sql/sql_select.cc:11992
|
#11 0x0000559280ebdfe9 in sub_select (join=0x7f61b0364ac8, join_tab=0x7f61b049f840, end_of_records=false) at /git/10.2/sql/sql_select.cc:18710
|
#12 0x0000559280ebd722 in do_select (join=0x7f61b0364ac8, procedure=0x0) at /git/10.2/sql/sql_select.cc:18286
|
#13 0x0000559280e981b7 in JOIN::exec_inner (this=0x7f61b0364ac8) at /git/10.2/sql/sql_select.cc:3609
|
#14 0x0000559280e97666 in JOIN::exec (this=0x7f61b0364ac8) at /git/10.2/sql/sql_select.cc:3404
|
#15 0x0000559280e98828 in mysql_select (thd=0x7f61b0000b00, tables=0x7f61b0220230, wild_num=0, fields=..., conds=0x7f61b0397050, og_num=1, order=0x0, group=0x7f61b02216f8, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f61b0352ad8, unit=0x7f61b021ea20, select_lex=0x7f61b021e630) at /git/10.2/sql/sql_select.cc:3804
|
#16 0x0000559280e1f577 in mysql_derived_fill (thd=0x7f61b0000b00, lex=0x7f61b0004628, derived=0x7f61b022f1d0) at /git/10.2/sql/sql_derived.cc:1124
|
#17 0x0000559280e1d490 in mysql_handle_single_derived (lex=0x7f61b0004628, derived=0x7f61b022f1d0, phases=96) at /git/10.2/sql/sql_derived.cc:197
|
#18 0x0000559280eadeb1 in st_join_table::preread_init (this=0x7f61b06b72a8) at /git/10.2/sql/sql_select.cc:11992
|
#19 0x0000559280ebdfe9 in sub_select (join=0x7f61b02d7008, join_tab=0x7f61b06b72a8, end_of_records=false) at /git/10.2/sql/sql_select.cc:18710
|
#20 0x0000559280ebe896 in evaluate_join_record (join=0x7f61b02d7008, join_tab=0x7f61b06b6ef8, error=0) at /git/10.2/sql/sql_select.cc:18962
|
#21 0x0000559280ebe187 in sub_select (join=0x7f61b02d7008, join_tab=0x7f61b06b6ef8, end_of_records=false) at /git/10.2/sql/sql_select.cc:18742
|
#22 0x0000559280ebe896 in evaluate_join_record (join=0x7f61b02d7008, join_tab=0x7f61b06b6b48, error=0) at /git/10.2/sql/sql_select.cc:18962
|
#23 0x0000559280ebe187 in sub_select (join=0x7f61b02d7008, join_tab=0x7f61b06b6b48, end_of_records=false) at /git/10.2/sql/sql_select.cc:18742
|
#24 0x0000559280ebe896 in evaluate_join_record (join=0x7f61b02d7008, join_tab=0x7f61b06b6798, error=0) at /git/10.2/sql/sql_select.cc:18962
|
#25 0x0000559280ebe187 in sub_select (join=0x7f61b02d7008, join_tab=0x7f61b06b6798, end_of_records=false) at /git/10.2/sql/sql_select.cc:18742
|
#26 0x0000559280ebd722 in do_select (join=0x7f61b02d7008, procedure=0x0) at /git/10.2/sql/sql_select.cc:18286
|
#27 0x0000559280e981b7 in JOIN::exec_inner (this=0x7f61b02d7008) at /git/10.2/sql/sql_select.cc:3609
|
#28 0x0000559280e97666 in JOIN::exec (this=0x7f61b02d7008) at /git/10.2/sql/sql_select.cc:3404
|
#29 0x0000559280e98828 in mysql_select (thd=0x7f61b0000b00, tables=0x7f61b022eb60, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f61b02d6fe8, unit=0x7f61b00046f0, select_lex=0x7f61b0004e28) at /git/10.2/sql/sql_select.cc:3804
|
#30 0x0000559280e8cb6a in handle_select (thd=0x7f61b0000b00, lex=0x7f61b0004628, result=0x7f61b02d6fe8, setup_tables_done_option=0) at /git/10.2/sql/sql_select.cc:376
|
#31 0x0000559280e582a8 in execute_sqlcom_select (thd=0x7f61b0000b00, all_tables=0x7f61b022eb60) at /git/10.2/sql/sql_parse.cc:6477
|
#32 0x0000559280e4dfe6 in mysql_execute_command (thd=0x7f61b0000b00) at /git/10.2/sql/sql_parse.cc:3484
|
#33 0x0000559280e5c0be in mysql_parse (thd=0x7f61b0000b00, rawbuf=0x7f61b0012498 "WITH RECURSIVE \nreport AS\n( SELECT YEAR(@report_date) AS YEAR,\nDATE(DATE_FORMAT(@report_date, '%Y-01-01')) AS report_start,\nDATE(@report_date) AS report_end ), \n_py AS (\nSELECT\nYEAR(report.report_sta"..., length=6036, parser_state=0x7f6204094080, is_com_multi=false, is_next_command=false) at /git/10.2/sql/sql_parse.cc:8009
|
#34 0x0000559280e49857 in dispatch_command (command=COM_QUERY, thd=0x7f61b0000b00, packet=0x7f61b0096061 "", packet_length=6037, is_com_multi=false, is_next_command=false) at /git/10.2/sql/sql_parse.cc:1824
|
#35 0x0000559280e481b3 in do_command (thd=0x7f61b0000b00) at /git/10.2/sql/sql_parse.cc:1378
|
#36 0x0000559280f995c9 in do_handle_one_connection (connect=0x559284b440e0) at /git/10.2/sql/sql_connect.cc:1335
|
#37 0x0000559280f99349 in handle_one_connection (arg=0x559284b440e0) at /git/10.2/sql/sql_connect.cc:1241
|
#38 0x00005592817c6596 in pfs_spawn_thread (arg=0x559284b26d90) at /git/10.2/storage/perfschema/pfs.cc:1862
|
#39 0x00007f620a6c06ba in start_thread (arg=0x7f6204095700) at pthread_create.c:333
|
#40 0x00007f6209b5541d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
|
on 10.3.9
Version: '10.3.9-MariaDB' MariaDB Server
|
pure virtual method called
|
terminate called without an active exception
|
180829 14:55:59 [ERROR] mysqld got signal 6 ;
|
|
sql/handler.h:3061(handler::ha_rnd_init(bool))[0x55a4df172749]
|
sql/table.cc:8054(TABLE::insert_all_rows_into_tmp_table(THD*, TABLE*, TMP_TABLE_PARAM*, bool))[0x55a4df05ea48]
|
sql/sql_derived.cc:1136(mysql_derived_fill(THD*, LEX*, TABLE_LIST*))[0x55a4def8390b]
|
sql/sql_derived.cc:197(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55a4def827d7]
|
sql/sql_select.cc:12462(st_join_table::preread_init())[0x55a4defe8129]
|
sql/sql_select.cc:19251(sub_select(JOIN*, st_join_table*, bool))[0x55a4defe84c8]
|
sql/sql_select.cc:18824(do_select)[0x55a4df006fc6]
|
sql/sql_select.cc:3823(JOIN::exec())[0x55a4df00721c]
|
sql/sql_select.cc:4229(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55a4df0060aa]
|
sql/sql_derived.cc:1163(mysql_derived_fill(THD*, LEX*, TABLE_LIST*))[0x55a4def83702]
|
sql/sql_derived.cc:197(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55a4def827d7]
|
sql/sql_select.cc:12462(st_join_table::preread_init())[0x55a4defe8129]
|
sql/sql_select.cc:19251(sub_select(JOIN*, st_join_table*, bool))[0x55a4defe84c8]
|
sql/sql_class.h:3868(THD::get_stmt_da())[0x55a4defde558]
|
sql/sql_select.cc:19291(sub_select(JOIN*, st_join_table*, bool))[0x55a4defe837e]
|
sql/sql_class.h:3868(THD::get_stmt_da())[0x55a4defde558]
|
sql/sql_select.cc:19291(sub_select(JOIN*, st_join_table*, bool))[0x55a4defe837e]
|
sql/sql_class.h:3868(THD::get_stmt_da())[0x55a4defde558]
|
sql/sql_select.cc:19291(sub_select(JOIN*, st_join_table*, bool))[0x55a4defe837e]
|
sql/sql_select.cc:18824(do_select)[0x55a4df006fc6]
|
sql/sql_select.cc:3823(JOIN::exec())[0x55a4df00721c]
|
sql/sql_select.cc:4229(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55a4df0060aa]
|
sql/sql_select.cc:382(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55a4df00742c]
|
sql/sql_parse.cc:6547(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55a4deece4f9]
|
sql/sql_parse.cc:3768(mysql_execute_command(THD*))[0x55a4defb7a4c]
|
sql/sql_class.h:1809(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55a4defb9fc9]
|
sql/sql_parse.cc:1850(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55a4defbc04a]
|
sql/sql_parse.cc:1397(do_command(THD*))[0x55a4defbc7ce]
|
sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x55a4df082daf]
|
sql/sql_connect.cc:1310(handle_one_connection)[0x55a4df082ed4]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3474f086ba]
|
x86_64/clone.S:111(clone)[0x7f3473d6d41d]
|
|
|
CREATE TABLE t1 ( YEAR int(4), d1 date , d2 date) ;
|
INSERT INTO t1 VALUES (2018,'2018-01-01','2018-09-20');
|
CREATE TABLE t2 (id int, tm date);
|
INSERT INTO t2 VALUES (1,'2018-08-30'),(2,'2018-08-30'),(3,'2018-08-30');
|
CREATE TABLE t3 (id int, tm date);
|
INSERT INTO t3 VALUES (1,'2018-08-30'),(2,'2018-08-30');
|
|
WITH RECURSIVE
|
cte AS
|
(SELECT YEAR(t1.d1) AS YEAR, t1.d1 AS st, t1.d1 + INTERVAL 1 MONTH AS fn FROM t1
|
UNION ALL
|
SELECT YEAR(cte.st + INTERVAL 1 MONTH), cte.st + INTERVAL 1 MONTH, t1.d2 + INTERVAL 1 DAY
|
FROM cte JOIN t1
|
WHERE cte.st + INTERVAL 1 MONTH < t1.d2 ),
|
|
cte2 AS (SELECT YEAR, COUNT(*)
|
FROM cte JOIN t2 ON t2.tm BETWEEN cte.st AND cte.fn),
|
cte3 AS (SELECT YEAR, COUNT(*)
|
FROM cte JOIN t3 ON t3.tm BETWEEN cte.st AND cte.fn)
|
SELECT 1 FROM t1 JOIN cte2 USING (YEAR) JOIN cte3 USING (YEAR);
|
10.2 b245023fe0bc6fa0bd6e2df
#4 0x0000557fc9d1583f in base_list_iterator::next_fast (this=0x7faac0190580) at /10.2/sql/sql_list.h:468
|
#5 0x0000557fc9ed637b in List_iterator_fast<TABLE>::operator++ (this=0x7faac0190580) at /10.2/sql/sql_list.h:591
|
#6 0x0000557fc9fbc01a in With_element::instantiate_tmp_tables (this=0x7faab0016af8) at /10.2/sql/sql_cte.cc:1405
|
#7 0x0000557fc9dbc187 in TABLE_LIST::fill_recursive (this=0x7faab0017b50, thd=0x7faab0000b00) at /10.2/sql/sql_derived.cc:1023
|
#8 0x0000557fc9dbc43e in mysql_derived_fill (thd=0x7faab0000b00, lex=0x7faab0004628, derived=0x7faab0017b50) at /10.2/sql/sql_derived.cc:1097
|
#9 0x0000557fc9dba490 in mysql_handle_single_derived (lex=0x7faab0004628, derived=0x7faab0017b50, phases=96) at /10.2/sql/sql_derived.cc:197
|
#10 0x0000557fc9e4aeb1 in st_join_table::preread_init (this=0x7faab005da58) at /10.2/sql/sql_select.cc:11992
|
#11 0x0000557fc9e5afe9 in sub_select (join=0x7faab004ef08, join_tab=0x7faab005da58, end_of_records=false) at /10.2/sql/sql_select.cc:18710
|
#12 0x0000557fc9e5a722 in do_select (join=0x7faab004ef08, procedure=0x0) at /10.2/sql/sql_select.cc:18286
|
#13 0x0000557fc9e351b7 in JOIN::exec_inner (this=0x7faab004ef08) at /10.2/sql/sql_select.cc:3609
|
#14 0x0000557fc9e34666 in JOIN::exec (this=0x7faab004ef08) at /10.2/sql/sql_select.cc:3404
|
#15 0x0000557fc9e35828 in mysql_select (thd=0x7faab0000b00, tables=0x7faab0017b50, wild_num=0, fields=..., conds=0x7faab003b6e0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7faab0042e68, unit=0x7faab00170e0, select_lex=0x7faab0016cf0) at /10.2/sql/sql_select.cc:3804
|
#16 0x0000557fc9dbc577 in mysql_derived_fill (thd=0x7faab0000b00, lex=0x7faab0004628, derived=0x7faab003f038) at /10.2/sql/sql_derived.cc:1124
|
#17 0x0000557fc9dba490 in mysql_handle_single_derived (lex=0x7faab0004628, derived=0x7faab003f038, phases=96) at /10.2/sql/sql_derived.cc:197
|
#18 0x0000557fc9e4aeb1 in st_join_table::preread_init (this=0x7faab018b9a8) at /10.2/sql/sql_select.cc:11992
|
#19 0x0000557fc9e5afe9 in sub_select (join=0x7faab0040b70, join_tab=0x7faab018b9a8, end_of_records=false) at /10.2/sql/sql_select.cc:18710
|
#20 0x0000557fc9e5b896 in evaluate_join_record (join=0x7faab0040b70, join_tab=0x7faab018b5f8, error=0) at /10.2/sql/sql_select.cc:18962
|
#21 0x0000557fc9e5b187 in sub_select (join=0x7faab0040b70, join_tab=0x7faab018b5f8, end_of_records=false) at /10.2/sql/sql_select.cc:18742
|
#22 0x0000557fc9e5a722 in do_select (join=0x7faab0040b70, procedure=0x0) at /10.2/sql/sql_select.cc:18286
|
#23 0x0000557fc9e351b7 in JOIN::exec_inner (this=0x7faab0040b70) at /10.2/sql/sql_select.cc:3609
|
#24 0x0000557fc9e34666 in JOIN::exec (this=0x7faab0040b70) at /10.2/sql/sql_select.cc:3404
|
#25 0x0000557fc9e35828 in mysql_select (thd=0x7faab0000b00, tables=0x7faab003e878, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7faab0040b50, unit=0x7faab00046f0, select_lex=0x7faab0004e28) at /10.2/sql/sql_select.cc:3804
|
#26 0x0000557fc9e29b6a in handle_select (thd=0x7faab0000b00, lex=0x7faab0004628, result=0x7faab0040b50, setup_tables_done_option=0) at /10.2/sql/sql_select.cc:376
|
#27 0x0000557fc9df52a8 in execute_sqlcom_select (thd=0x7faab0000b00, all_tables=0x7faab003e878) at /10.2/sql/sql_parse.cc:6477
|
#28 0x0000557fc9deafe6 in mysql_execute_command (thd=0x7faab0000b00) at /10.2/sql/sql_parse.cc:3484
|
#29 0x0000557fc9df90be in mysql_parse (thd=0x7faab0000b00, rawbuf=0x7faab0012498 "WITH RECURSIVE \ncte AS\n(SELECT YEAR(t1.d1) AS YEAR, t1.d1 AS st, t1.d1 + INTERVAL 1 MONTH AS fn FROM t1\nUNION ALL \nSELECT YEAR(cte.st + INTERVAL 1 MONTH), cte.st + INTERVAL 1 MONTH, t1.d2 + INTERVAL"..., length=500, parser_state=0x7faac0192080, is_com_multi=false, is_next_command=false) at /10.2/sql/sql_parse.cc:8009
|
#30 0x0000557fc9de6857 in dispatch_command (command=COM_QUERY, thd=0x7faab0000b00, packet=0x7faab008c531 "", packet_length=500, is_com_multi=false, is_next_command=false) at /10.2/sql/sql_parse.cc:1824
|
#31 0x0000557fc9de51b3 in do_command (thd=0x7faab0000b00) at /10.2/sql/sql_parse.cc:1378
|
#32 0x0000557fc9f365c9 in do_handle_one_connection (connect=0x557fcc9a6d90) at /10.2/sql/sql_connect.cc:1335
|
#33 0x0000557fc9f36349 in handle_one_connection (arg=0x557fcc9a6d90) at /10.2/sql/sql_connect.cc:1241
|
#34 0x0000557fca763572 in pfs_spawn_thread (arg=0x557fcc989ed0) at /10.2/storage/perfschema/pfs.cc:1862
|
#35 0x00007faac794b6ba in start_thread (arg=0x7faac0193700) at pthread_create.c:333
|
#36 0x00007faac6de041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
|
|
|