[MDEV-23928] Assertion `maybe_null || !null_value' fails in Item_func_ceiling::time_op Created: 2020-10-09  Updated: 2021-08-25

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4, 10.5, 10.6
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-20816 Assertions `maybe_null || !null_value... Confirmed
relates to MDEV-21797 Assertion `maybe_null || !null_value... Confirmed

 Description   

CREATE TABLE t1 (tm time(6) NOT NULL  DEFAULT '00:00:00.000000') engine=myisam;
SELECT 1 FROM t1 WHERE CEILING(tm) ;

Version: '10.4.16-MariaDB-debug-log'  socket: '/10.4/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
mysqld: /10.4/sql/item_func.cc:2317: virtual bool Item_func_ceiling::time_op(THD*, MYSQL_TIME*): Assertion `maybe_null || !null_value' failed.
201009 11:25:15 [ERROR] mysqld got signal 6 ;
 
Server version: 10.4.16-MariaDB-debug-log
 
linux/raise.c:51(__GI_raise)[0x7fa7ff38b7bb]
stdlib/abort.c:81(__GI_abort)[0x7fa7ff376535]
intl/loadmsgcat.c:1177(_nl_load_domain)[0x7fa7ff37640f]
/lib/x86_64-linux-gnu/libc.so.6(+0x30102)[0x7fa7ff384102]
sql/item_func.cc:2318(Item_func_ceiling::time_op(THD*, st_mysql_time*))[0x555ac52d096a]
sql/item_func.h:718(Item_func_hybrid_field_type::time_op_with_null_check(THD*, st_mysql_time*))[0x555ac528b6d9]
sql/item_func.cc:912(Item_func_hybrid_field_type::val_real_from_time_op())[0x555ac4eac994]
sql/sql_type.cc:4989(Type_handler_time_common::Item_func_hybrid_field_type_val_real(Item_func_hybrid_field_type*) const)[0x555ac493788f]
sql/item_func.h:788(Item_func_hybrid_field_type::val_real())[0x555ac46cf52e]
sql/sql_type.cc:4518(Type_handler_temporal_result::Item_val_bool(Item*) const)[0x555ac4af4f34]
sql/item.h:1462(Item::val_bool())[0x555ac4a262d7]
sql/item.h:1470(Item::eval_const_cond())[0x555ac4a1f2ae]
sql/sql_select.cc:17435(Item::remove_eq_conds(THD*, Item::cond_result*, bool))[0x555ac4a3fa15]
sql/sql_select.cc:5331(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x555ac4a11a04]
sql/sql_select.cc:2268(JOIN::optimize_inner())[0x555ac4985971]
sql/sql_select.cc:1615(JOIN::optimize())[0x555ac49732c5]
sql/sql_select.cc:4681(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*))[0x555ac498ea3b]
sql/sql_select.cc:410(handle_select(THD*, LEX*, select_result*, unsigned long))[0x555ac496602a]
sql/sql_parse.cc:6355(execute_sqlcom_select(THD*, TABLE_LIST*))[0x555ac4962aa9]
sql/sql_parse.cc:3889(mysql_execute_command(THD*))[0x555ac4d3f695]
sql/sql_parse.cc:7896(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x555ac4d3ef37]
sql/sql_parse.cc:1837(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x555ac636e80f]
nptl/pthread_create.c:487(start_thread)[0x7fa7ffe46fa3]
 
Query (0x62b000062290): SELECT 1 FROM t1 WHERE CEILING(tm)



 Comments   
Comment by Alice Sherepa [ 2021-03-05 ]

also in Item_func_floor::time_op, Item_func_round::time_op, ..

/10.5/sql/item_func.cc:2437: virtual bool Item_func_floor::time_op(THD*, MYSQL_TIME*): Assertion `maybe_null || !null_value' failed.
 
Server version: 10.5.10-MariaDB-debug-log
 
sql/item_func.cc:2438(Item_func_floor::time_op(THD*, st_mysql_time*))[0x55e09bf1bd0d]
sql/item_func.h:838(Item_func_hybrid_field_type::time_op_with_null_check(THD*, st_mysql_time*))[0x55e09bf4f91e]
sql/item_func.cc:911(Item_func_hybrid_field_type::val_str_from_time_op(String*))[0x55e09bf083f7]
sql/sql_type.cc:5466(Type_handler_time_common::Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type*, String*) const)[0x55e09bb6879d]
sql/item_func.h:926(Item_func_hybrid_field_type::val_str(String*))[0x55e09b572820]
sql/item_timefunc.cc:1886(Item_func_date_format::val_str(String*))[0x55e09c0723b9]
sql/item_strfunc.cc:145(Item_str_func::val_real())[0x55e09bf98f8a]
sql/item_func.cc:1255(Item_func_minus::real_op())[0x55e09bf0c125]
sql/item_func.h:863(Item_func_hybrid_field_type::val_real_from_real_op())[0x55e09bb96eca]
sql/sql_type.cc:5374(Type_handler_real_result::Item_func_hybrid_field_type_val_real(Item_func_hybrid_field_type*) const)[0x55e09bb6827a]
sql/item_func.h:909(Item_func_hybrid_field_type::val_real())[0x55e09b5723d1]
sql/sql_type.cc:4993(Type_handler_real_result::Item_val_bool(Item*) const)[0x55e09bb64ea4]
sql/item.h:1490(Item::val_bool())[0x55e09b2e62fe]
sql/item.h:1497(Item::eval_const_cond())[0x55e09b742622]
sql/sql_select.cc:17552(Item::remove_eq_conds(THD*, Item::cond_result*, bool))[0x55e09b6debf0]
sql/sql_select.cc:5362(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x55e09b68c025]
sql/sql_select.cc:2256(JOIN::optimize_inner())[0x55e09b66c1ac]
sql/sql_select.cc:1628(JOIN::optimize())[0x55e09b66568c]
sql/sql_select.cc:4706(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*))[0x55e09b685e83]
sql/sql_select.cc:417(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55e09b6578b6]
sql/sql_parse.cc:6282(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55e09b5c1024]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x55e09b5aff1f]
sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55e09b5cc31e]
sql/sql_parse.cc:1892(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55e09b5a2517]
sql/sql_parse.cc:1370(do_command(THD*))[0x55e09b59ee40]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55e09b9e16dc]
sql/sql_connect.cc:1314(handle_one_connection)[0x55e09b9e1040]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55e09c6f0bf7]
nptl/pthread_create.c:478(start_thread)[0x7fc2ef664609]
x86_64/clone.S:97(__GI___clone)[0x7fc2ef238293]

Generated at Thu Feb 08 09:26:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.