Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
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 performing modulo operation on COALESCE with binary literal values. The assertion `decimals == 0` fails in `Item_func_mod::fix_length_and_dec_int()`.
DROP DATABASE IF EXISTS sqlcraft; |
CREATE DATABASE sqlcraft; |
USE sqlcraft; |
SELECT COALESCE( b'101010' ) % ( b'101010' ); |
crash logs:
|
|
|
mariadbd: /app/dbms/mariadb-12.2.2/sql/item_func.h:1918: void Item_func_mod::fix_length_and_dec_int(): Assertion `decimals == 0' failed.
|
260420 9:50:46 [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: 0x52c0001b0218
|
stack_bottom = 0x7e02f446c000 thread_stack 0xb00000
|
sanitizer_common/sanitizer_common_interceptors.inc:4193(__interceptor_backtrace.part.0)[0x7e031be45c0e]
|
mysys/stacktrace.c:215(my_print_stacktrace)[0x5c6dde10a1b6]
|
sql/signal_handler.cc:230(handle_fatal_signal)[0x5c6ddc8f0b58]
|
libc_sigaction.c:0(__restore_rt)[0x7e031b042520]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x7e031b0969fc]
|
posix/raise.c:27(__GI_raise)[0x7e031b042476]
|
stdlib/abort.c:81(__GI_abort)[0x7e031b0287f3]
|
intl/loadmsgcat.c:1177(_nl_load_domain)[0x7e031b02871b]
|
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x7e031b039e96]
|
sql/item_func.h:1919(Item_func_mod::fix_length_and_dec_int())[0x5c6ddc67ff61]
|
sql/sql_type.cc:7124(Type_handler_int_result::Item_func_mod_fix_length_and_dec(Item_func_mod*) const)[0x5c6ddc655f9e]
|
sql/item_func.cc:1759(Item_func_mod::fix_length_and_dec(THD*))[0x5c6ddca78657]
|
sql/item_func.cc:412(Item_func::fix_fields(THD*, Item**))[0x5c6ddca6900b]
|
/usr/local/mariadb-asan/bin/mariadbd(+0x1e18af9)[0x5c6ddbbc2af9]
|
sql/item.h:1143(Item::fix_fields_if_needed(THD*, Item**))[0x5c6ddbbc2b33]
|
sql/item.h:1152(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x5c6ddbcf97e5]
|
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*))[0x5c6ddbfcf1eb]
|
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*))[0x5c6ddbff7aa5]
|
sql/sql_select.cc:636(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x5c6ddbfc51ad]
|
sql/sql_parse.cc:6203(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5c6ddbedc6cd]
|
sql/sql_parse.cc:3985(mysql_execute_command(THD*, bool))[0x5c6ddbecc2cf]
|
sql/sql_parse.cc:7925(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5c6ddbee7707]
|
sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5c6ddbebdc04]
|
sql/sql_parse.cc:1432(do_command(THD*, bool))[0x5c6ddbeba89c]
|
sql/sql_connect.cc:1503(do_handle_one_connection(CONNECT*, bool))[0x5c6ddc3e5ad9]
|
sql/sql_connect.cc:1417(handle_one_connection)[0x5c6ddc3e562c]
|
perfschema/pfs.cc:2200(pfs_spawn_thread)[0x5c6ddd29db0a]
|
nptl/pthread_create.c:442(start_thread)[0x7e031b094ac3]
|
x86_64/clone3.S:83(__clone3)[0x7e031b1268d0]
|
|
|
Connection ID (thread ID): 5
|
Status: NOT_KILLED
|
Query (0x52d000258438): SELECT COALESCE( b'101010' ) % ( b'101010' )
|
Attachments
Issue Links
- duplicates
-
MDEV-35920 Assertion `decimals == 0' failed Item_func_mod::fix_length_and_dec_int
-
- Confirmed
-