Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.8, 12.0
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t (a INT KEY,b INT,c INT AS (b) VIRTUAL,UNIQUE (c)) ENGINE=INNODB; |
START TRANSACTION; |
INSERT INTO t(a,b) VALUES (1,1); |
SET optimizer_switch='mrr=on'; |
DELETE FROM t; |
INSERT INTO t(a,b) VALUES (1,0); |
INSERT INTO t(a,b) VALUES (2,1); |
SELECT * FROM t WHERE b < '1' ORDER BY b; |
Leads to:
CS 12.0.0 5091986ceaca20c650d4469de08201c5b85428e4 (Debug) Build 03/03/2025 |
mariadbd: /test/12.0_dbg/sql/field.cc:2327: virtual my_decimal *Field_int::val_decimal(my_decimal *): Assertion `marked_for_read()' failed.
|
CS 12.0.0 5091986ceaca20c650d4469de08201c5b85428e4 (Debug) Build 03/03/2025 |
Core was generated by `/test/MD030325-mariadb-12.0.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
|
[Current thread is 1 (Thread 0x14c60ffff6c0 (LWP 1426607))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
|
#3 0x000014c61d84527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
|
#4 0x000014c61d8288ff in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014c61d82881b in __assert_fail_base (fmt=0x14c61d9d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55efc6b37204 "marked_for_read()", file=file@entry=0x55efc6b371e8 "/test/12.0_dbg/sql/field.cc", line=line@entry=2327, function=function@entry=0x55efc6b378d8 "virtual my_decimal *Field_int::val_decimal(my_decimal *)") at ./assert/assert.c:96
|
#6 0x000014c61d83b517 in __assert_fail (assertion=0x55efc6b37204 "marked_for_read()", file=0x55efc6b371e8 "/test/12.0_dbg/sql/field.cc", line=2327, function=0x55efc6b378d8 "virtual my_decimal *Field_int::val_decimal(my_decimal *)") at ./assert/assert.c:105
|
#7 0x000055efc5e6da3b in Field_int::val_decimal (this=0x14c5bc02faa0, decimal_value=0x14c60fffaa20) at /test/12.0_dbg/sql/field.cc:2327
|
#8 0x000055efc5edc0d6 in Item_field::val_decimal (this=0x14c5bc01c8b0, decimal_value=0x14c60fffaa20) at /test/12.0_dbg/sql/item.cc:3525
|
#9 0x000055efc5d55275 in VDec::VDec (this=0x14c60fffaa18, item=0x14c5bc01c8b0)at /test/12.0_dbg/sql/sql_type.cc:357
|
#10 0x000055efc5f08553 in Arg_comparator::compare_decimal (this=0x14c5bc01adb8)at /test/12.0_dbg/sql/item_cmpfunc.cc:949
|
#11 0x000055efc5f2146f in Arg_comparator::compare (this=0x14c5bc01adb8)at /test/12.0_dbg/sql/item_cmpfunc.h:114
|
#12 0x000055efc5f0b081 in Item_func_lt::val_bool (this=0x14c5bc01ad00)at /test/12.0_dbg/sql/item_cmpfunc.cc:1977
|
#13 0x000055efc5a2b739 in SQL_SELECT::skip_record (this=0x14c5bc01f230, thd=0x14c5bc000d58) at /test/12.0_dbg/sql/opt_range.h:1922
|
#14 0x000055efc5ea4fc5 in find_all_keys (thd=0x14c5bc000d58, param=0x14c60fffb318, select=0x14c5bc01f230, fs_info=0x14c5bc0189b0, buffpek_pointers=0x14c60fffafb0, tempfile=0x14c60fffb130, pq=0x0, found_rows=0x14c5bc018bb0) at /test/12.0_dbg/sql/filesort.cc:1041
|
#15 0x000055efc5ea2ffb in filesort (thd=0x14c5bc000d58, table=0x14c5bc028c58, filesort=0x14c5bc01f448, tracker=0x14c5bc01fbd0, join=0x14c5bc01ba38, first_table_bit=1) at /test/12.0_dbg/sql/filesort.cc:445
|
#16 0x000055efc5b460fa in create_sort_index (thd=0x14c5bc000d58, join=0x14c5bc01ba38, tab=0x14c5bc01e290, fsort=0x14c5bc01f448)at /test/12.0_dbg/sql/sql_select.cc:27780
|
#17 0x000055efc5b45d5a in st_join_table::sort_table (this=0x14c5bc01e290)at /test/12.0_dbg/sql/sql_select.cc:25268
|
#18 0x000055efc5b1c984 in join_init_read_record (tab=0x14c5bc01e290)at /test/12.0_dbg/sql/sql_select.cc:25188
|
#19 0x000055efc5af8c61 in sub_select (join=0x14c5bc01ba38, join_tab=0x14c5bc01e290, end_of_records=false)at /test/12.0_dbg/sql/sql_select.cc:24183
|
#20 0x000055efc5b20154 in do_select (join=0x14c5bc01ba38, procedure=0x0)at /test/12.0_dbg/sql/sql_select.cc:23697
|
#21 0x000055efc5b1f4c3 in JOIN::exec_inner (this=0x14c5bc01ba38)at /test/12.0_dbg/sql/sql_select.cc:5059
|
#22 0x000055efc5b1e36e in JOIN::exec (this=0x14c5bc01ba38)at /test/12.0_dbg/sql/sql_select.cc:4842
|
#23 0x000055efc5af95dd in mysql_select (thd=0x14c5bc000d58, tables=0x14c5bc01a418, fields=@0x14c5bc01a098: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c5bc01a3c8, last = 0x14c5bc01c5c8, elements = 3}, <No data fields>}, conds=0x14c5bc01ad00, og_num=1, order=0x14c5bc01b8c8, group=0x0, having=0x0, proc_param=0x0, select_options=2165574400, result=0x14c5bc01ba10, unit=0x14c5bc005080, select_lex=0x14c5bc019de0)at /test/12.0_dbg/sql/sql_select.cc:5375
|
#24 0x000055efc5af9065 in handle_select (thd=0x14c5bc000d58, lex=0x14c5bc004fa0, result=0x14c5bc01ba10, setup_tables_done_option=0)at /test/12.0_dbg/sql/sql_select.cc:633
|
#25 0x000055efc5aa0a01 in execute_sqlcom_select (thd=0x14c5bc000d58, all_tables=0x14c5bc01a418) at /test/12.0_dbg/sql/sql_parse.cc:6191
|
#26 0x000055efc5a958e0 in mysql_execute_command (thd=0x14c5bc000d58, is_called_from_prepared_stmt=false) at /test/12.0_dbg/sql/sql_parse.cc:3979
|
#27 0x000055efc5a8da64 in mysql_parse (thd=0x14c5bc000d58, rawbuf=0x14c5bc019d30 "SELECT * FROM t WHERE b < '1' ORDER BY b", length=40, parser_state=0x14c60fffda20)at /test/12.0_dbg/sql/sql_parse.cc:7915
|
#28 0x000055efc5a8ae34 in dispatch_command (command=COM_QUERY, thd=0x14c5bc000d58, packet=0x14c5bc00b0a9 "", packet_length=40, blocking=true) at /test/12.0_dbg/sql/sql_parse.cc:1902
|
#29 0x000055efc5a8e613 in do_command (thd=0x14c5bc000d58, blocking=true)at /test/12.0_dbg/sql/sql_parse.cc:1415
|
#30 0x000055efc5c77c09 in do_handle_one_connection (connect=0x55efd9b029b8, put_in_cache=true) at /test/12.0_dbg/sql/sql_connect.cc:1415
|
#31 0x000055efc5c779ae in handle_one_connection (arg=0x55efd9b021d8)at /test/12.0_dbg/sql/sql_connect.cc:1327
|
#32 0x000014c61d89caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
|
#33 0x000014c61d929c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Bug confirmed present in:
MariaDB: 11.8.1 (dbg), 12.0.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.6.21 (dbg), 10.6.21 (opt), 10.11.12 (dbg), 10.11.12 (opt), 11.4.6 (dbg), 11.4.6 (opt), 11.8.1 (opt), 12.0.0 (opt)