[MDEV-19971] Assertion `field_handlers == 0 || field_pos < field_count' failed in Protocol_text::store Created: 2019-07-05  Updated: 2019-07-05  Resolved: 2019-07-05

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

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Alice Sherepa
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-17963 Assertion `field_pos < field_count' ... Closed

 Description   

create table t1 ( pk int) ;
insert into t1 values (10);
 
--disable_warnings
delimiter $$;
 
create function f1() returns varchar(16000) 
begin 
declare ret varchar(16000);  
analyze format=json select t1.`pk` from t1 into ret;
return ret;
end$$
delimiter ;$$
 
select f1();
--error 0
select 1;

10.4 e8392e58b2a5a69f

 10.4/src/sql/protocol.cc:1164: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_handlers == 0 || field_pos < field_count' failed.
 
190705 17:36:09 [ERROR] mysqld got signal 6 ;
 
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f3276bb6390]
linux/raise.c:54(__GI_raise)[0x7f3275d6b428]
stdlib/abort.c:91(__GI_abort)[0x7f3275d6d02a]
assert/assert.c:92(__assert_fail_base)[0x7f3275d63bd7]
sql/protocol.cc:1165(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x5607801089cb]
sql/sql_type.cc:6745(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x560780435299]
sql/sql_type.h:4659(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x560780440d76]
sql/item.h:1036(Item::send(Protocol*, st_value*))[0x5607801083f1]
sql/protocol.cc:1035(Protocol::send_result_set_row(List<Item>*))[0x5607801b68f0]
sql/sql_class.cc:3005(select_send::send_data(List<Item>&))[0x560780275083]
sql/sql_select.cc:4257(JOIN::exec_inner())[0x56078027499e]
sql/sql_select.cc:4174(JOIN::exec())[0x560780276043]
sql/sql_select.cc:4607(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*))[0x56078026660c]
sql/sql_select.cc:425(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56078022ff48]
sql/sql_parse.cc:6340(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560780225d96]
sql/sql_parse.cc:3882(mysql_execute_command(THD*))[0x560780233d20]
sql/sql_parse.cc:7892(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56078021ff8f]
sql/sql_parse.cc:1829(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56078021e721]
sql/sql_parse.cc:1360(do_command(THD*))[0x56078039889e]
sql/sql_connect.cc:1404(do_handle_one_connection(CONNECT*))[0x5607803985c7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3276bac6ba]
x86_64/clone.S:111(clone)[0x7f3275e3d41d]


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