[MDEV-15210] item_windowfunc.cc:445: virtual Field* Item_sum_hybrid_simple::create_tmp_field(bool, TABLE*): Assertion `0' failed. Created: 2018-02-05  Updated: 2023-10-09  Resolved: 2023-10-09

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Sergei Petrunia
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-22814 SIGSEGV in set_field_to_null_with_con... Stalled

 Description   

testcase:

CREATE TABLE t1(i INT);
INSERT INTO t1 VALUES (1),(2),(1);
SELECT (SELECT LAST_VALUE(ttt.i) OVER (ORDER BY ttt.i) FROM t1 LIMIT 1) FROM t1 AS ttt;

10.2 00572a0b0cc81c38f198

 
/10.2/sql/item_windowfunc.cc:351: virtual Field* Item_sum_hybrid_simple::create_tmp_field(bool, TABLE*): Assertion `0' failed.
 
stdlib/abort.c:91(__GI_abort)[0x7f7786914bd7]
assert/assert.c:92(__assert_fail_base)[0x7f7786914c82]
sql/item_windowfunc.cc:351(Item_sum_hybrid_simple::create_tmp_field(bool, TABLE*))[0x558670dfb720]
sql/sql_select.cc:16372(create_tmp_field(THD*, TABLE*, Item*, Item::Type, Item***, Field**, Field**, bool, bool, bool, bool))[0x558670dfed2b]
sql/sql_select.cc:16886(create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*, bool, bool))[0x5586710f765d]
sql/sql_expression_cache.cc:120(Expression_cache_tmptable::init())[0x5586713335a3]
sql/item.cc:8173(Item_cache_wrapper::init_on_demand())[0x5586713340de]
sql/item.cc:8296(Item_cache_wrapper::check_cache())[0x5586713349d2]
sql/item.cc:8359(Item_cache_wrapper::val_int())[0x558671327f0d]
sql/item.cc:6922(Item::send(Protocol*, String*))[0x558671333a02]
sql/item.cc:8218(Item_cache_wrapper::send(Protocol*, String*))[0x558670b40a48]
sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x558670c5a7ca]
sql/sql_class.cc:2722(select_send::send_data(List<Item>&))[0x558670e15d12]
sql/sql_select.cc:20078(end_send_group(JOIN*, st_join_table*, bool))[0x558670e0bb24]
sql/sql_select.cc:18709(sub_select(JOIN*, st_join_table*, bool))[0x558670e0a7b9]
sql/sql_select.cc:18304(do_select(JOIN*, Procedure*))[0x558670dacfcc]
sql/sql_select.cc:3623(JOIN::exec_inner())[0x558670daacd2]
sql/sql_select.cc:3419(JOIN::exec())[0x558670dae01f]
sql/sql_select.cc:3820(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*))[0x558670d8d7e5]
sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x558670d15155]
sql/sql_parse.cc:6477(execute_sqlcom_select(THD*, TABLE_LIST*))[0x558670d0261b]
sql/sql_parse.cc:3535(mysql_execute_command(THD*))[0x558670d1d8b9]
sql/sql_parse.cc:8011(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x558670cf8f6e]
sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x558670cf60ed]
sql/sql_parse.cc:1386(do_command(THD*))[0x55867101dd62]
sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55867101d76a]
sql/sql_connect.cc:1242(handle_one_connection)[0x5586721cefda]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f77875596ba]
x86_64/clone.S:111(clone)[0x7f77869ee41d]



 Comments   
Comment by Alice Sherepa [ 2023-10-09 ]

not repeatable on current 10.4( 0c7af6a2a19343cb9d4fedbd7165b8f73bc4cf96)-11.2

Generated at Thu Feb 08 08:19:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.