Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
12.2.2
-
None
-
ubuntu 22.04
-
Not for Release Notes
Description
MariaDB debug build (12.2.2-MariaDB-asan-debug) crashes with an assertion failure when using TRUNCATE function on COALESCE with binary literal. The assertion ` args[0]->decimals == 0` fails in `Item_func_round::fix_arg_hex_hybrid()`.
DROP DATABASE IF EXISTS sqlcraft; |
CREATE DATABASE sqlcraft; |
USE sqlcraft; |
|
|
SELECT ( TRUNCATE( COALESCE( b'101010' ) , ( '2025-12-31' ) IS NOT FALSE ) ); |
crash logs:
|
|
|
mariadbd: /app/dbms/mariadb-12.2.2/sql/item_func.cc:2679: void Item_func_round::fix_arg_hex_hybrid(): Assertion `args[0]->decimals == 0' failed.
|
260420 9:51:25 [ERROR] /usr/local/mariadb-asan/bin/mariadbd got signal 6 ;
|
Sorry, we probably made a mistake, and this is a bug.
|
|
|
Your assistance in bug reporting will enable us to fix this for the next release.
|
To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
|
a bug on https://jira.mariadb.org/.
|
|
|
Please include the information from the server start above, to the end of the
|
information below.
|
|
|
Server version: 12.2.2-MariaDB-asan-debug source revision: d26a6f44c1f2119377e79a9540886c6d8c01472f
|
|
|
The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
|
contains instructions to obtain a better version of the backtrace below.
|
Following these instructions will help MariaDB developers provide a fix quicker.
|
|
|
Attempting backtrace. Include this in the bug report.
|
(note: Retrieving this information may fail)
|
|
|
Thread pointer: 0x52c0001c0218
|
stack_bottom = 0x747e92c17000 thread_stack 0xb00000
|
sanitizer_common/sanitizer_common_interceptors.inc:4193(__interceptor_backtrace.part.0)[0x747ebaa45c0e]
|
mysys/stacktrace.c:215(my_print_stacktrace)[0x61733e5381b6]
|
sql/signal_handler.cc:230(handle_fatal_signal)[0x61733cd1eb58]
|
libc_sigaction.c:0(__restore_rt)[0x747eb9c42520]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x747eb9c969fc]
|
posix/raise.c:27(__GI_raise)[0x747eb9c42476]
|
stdlib/abort.c:81(__GI_abort)[0x747eb9c287f3]
|
intl/loadmsgcat.c:1177(_nl_load_domain)[0x747eb9c2871b]
|
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x747eb9c39e96]
|
sql/item_func.cc:2680(Item_func_round::fix_arg_hex_hybrid())[0x61733ceb2389]
|
sql/sql_type.cc:6514(Type_handler_hex_hybrid::Item_func_round_fix_length_and_dec(Item_func_round*) const)[0x61733ca82ace]
|
sql/item_func.h:2363(Item_func_round::fix_length_and_dec(THD*))[0x61733cee9213]
|
sql/item_func.cc:412(Item_func::fix_fields(THD*, Item**))[0x61733ce9700b]
|
/usr/local/mariadb-asan/bin/mariadbd(+0x1e18af9)[0x61733bff0af9]
|
sql/item.h:1143(Item::fix_fields_if_needed(THD*, Item**))[0x61733bff0b33]
|
sql/item.h:1152(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x61733c1277e5]
|
sql/sql_base.cc:8218(setup_fields(THD*, Bounds_checked_array<Item*>, List<Item>&, enum_column_usage, List<Item>*, List<Item>*, bool, THD_WHERE))[0x61733c3fd1eb]
|
sql/sql_select.cc:1603(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x61733c425aa5]
|
sql/sql_select.cc:5415(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*))[0x61733c3f31ad]
|
sql/sql_select.cc:636(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x61733c30a6cd]
|
sql/sql_parse.cc:6203(execute_sqlcom_select(THD*, TABLE_LIST*))[0x61733c2fa2cf]
|
sql/sql_parse.cc:7925(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x61733c315707]
|
sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x61733c2ebc04]
|
sql/sql_parse.cc:1432(do_command(THD*, bool))[0x61733c2e889c]
|
sql/sql_connect.cc:1503(do_handle_one_connection(CONNECT*, bool))[0x61733c813ad9]
|
sql/sql_connect.cc:1417(handle_one_connection)[0x61733c81362c]
|
perfschema/pfs.cc:2200(pfs_spawn_thread)[0x61733d6cbb0a]
|
nptl/pthread_create.c:442(start_thread)[0x747eb9c94ac3]
|
x86_64/clone3.S:83(__clone3)[0x747eb9d268d0]
|
|
|
Connection ID (thread ID): 3
|
Status: NOT_KILLED
|
Query (0x52d00024e438): SELECT ( TRUNCATE( COALESCE( b'101010' ) , ( '2025-12-31' ) IS NOT FALSE ) )
|
Attachments
Issue Links
- duplicates
-
MDEV-35977 Assertion `args[0]->decimals == 0' failed in Item_func_round::fix_arg_hex_hybrid
-
- Confirmed
-