Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
Description
Does not look related to MDEV-25650, and different from MDEV-30730 as no Galera is involved here, and the assert is different.
SET SESSION lc_time_names=zh_hk; |
CREATE TABLE t (c CHAR,cc TEXT AS (CONCAT (c,IF(c=c,DATE_FORMAT(c,''),'')))) ENGINE=InnoDB; |
SET NAMES utf8; |
INSERT INTO t VALUES (0,0); |
INSERT INTO t VALUES (0,0); |
INSERT INTO t VALUES (0,0); |
Leads to:
11.3.0 7ba9c7fb84b5f28e4736656b57d9508b70ca6369 (Debug) |
...
|
11.3.0-dbg>INSERT INTO t VALUES (0,0);
|
ERROR 1906 (HY000): The value specified for generated column 'cc' in table 't' has been ignored
|
11.3.0-dbg>INSERT INTO t VALUES (0,0);
|
ERROR 1267 (HY000): Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb3_general_ci,COERCIBLE) for operation 'concat'
|
11.3.0-dbg>INSERT INTO t VALUES (0,0);
|
ERROR 2013 (HY000): Lost connection to server during query
|
11.3.0 7ba9c7fb84b5f28e4736656b57d9508b70ca6369 (Debug) |
mariadbd: /test/git-bisect/11.3_dbg/sql/item_func.cc:326: virtual bool Item_func::fix_fields(THD*, Item**): Assertion `used_tables_cache == 0' failed.
|
11.3.0 7ba9c7fb84b5f28e4736656b57d9508b70ca6369 (Debug) |
Core was generated by `/test/MD020923-mariadb-11.3.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22937018324544)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x14dc70d45640 (LWP 3134337))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22937018324544) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=22937018324544) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=22937018324544, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x000014dc8ea42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x000014dc8ea287f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014dc8ea2871b in __assert_fail_base (fmt=0x14dc8ebdd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5633f4ef434a "used_tables_cache == 0", file=0x5633f4ef4748 "/test/git-bisect/11.3_dbg/sql/item_func.cc", line=326, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x000014dc8ea39e96 in __GI___assert_fail (assertion=0x5633f4ef434a "used_tables_cache == 0", file=0x5633f4ef4748 "/test/git-bisect/11.3_dbg/sql/item_func.cc", line=326, function=0x5633f4ef5040 "virtual bool Item_func::fix_fields(THD*, Item**)") at ./assert/assert.c:101
|
#7 0x00005633f457d83b in Item_func::fix_fields (this=this@entry=0x14dc200285d8, thd=thd@entry=0x14dc20000d58, ref=<optimized out>) at /test/git-bisect/11.3_dbg/sql/item_func.cc:326
|
#8 0x00005633f45c3330 in Item_str_func::fix_fields (this=0x14dc200285d8, thd=0x14dc20000d58, ref=<optimized out>) at /test/git-bisect/11.3_dbg/sql/item_strfunc.cc:128
|
#9 0x00005633f43218ff in Virtual_column_info::fix_expr (this=this@entry=0x14dc200286a8, thd=thd@entry=0x14dc20000d58) at /test/git-bisect/11.3_dbg/sql/table.cc:3725
|
#10 0x00005633f4321a68 in Virtual_column_info::fix_session_expr (this=0x14dc200286a8, thd=thd@entry=0x14dc20000d58) at /test/git-bisect/11.3_dbg/sql/table.cc:3751
|
#11 0x00005633f4321da2 in TABLE::vcol_fix_expr (this=<optimized out>, thd=thd@entry=0x14dc20000d58) at /test/git-bisect/11.3_dbg/sql/table.cc:3835
|
#12 0x00005633f418dd6f in open_table (thd=thd@entry=0x14dc20000d58, table_list=table_list@entry=0x14dc20013380, ot_ctx=ot_ctx@entry=0x14dc70d43710) at /test/git-bisect/11.3_dbg/sql/sql_base.cc:2353
|
#13 0x00005633f419200d in open_and_process_table (ot_ctx=0x14dc70d43710, has_prelocking_list=false, prelocking_strategy=0x14dc70d43900, flags=0, counter=0x14dc70d437ac, tables=0x14dc20013380, thd=0x14dc20000d58) at /test/git-bisect/11.3_dbg/sql/sql_base.cc:4148
|
#14 open_tables (thd=thd@entry=0x14dc20000d58, options=@0x14dc200065e8: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x14dc70d43798, counter=counter@entry=0x14dc70d437ac, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14dc70d43900) at /test/git-bisect/11.3_dbg/sql/sql_base.cc:4633
|
#15 0x00005633f4192e78 in open_and_lock_tables (thd=thd@entry=0x14dc20000d58, options=<optimized out>, tables=<optimized out>, tables@entry=0x14dc20013380, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14dc70d43900) at /test/git-bisect/11.3_dbg/sql/sql_base.cc:5607
|
#16 0x00005633f41d0a4a in open_and_lock_tables (flags=0, derived=true, tables=0x14dc20013380, thd=0x14dc20000d58) at /test/git-bisect/11.3_dbg/sql/sql_base.h:525
|
#17 mysql_insert (thd=thd@entry=0x14dc20000d58, table_list=0x14dc20013380, fields=@0x14dc20005fa0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5633f5755be0 <end_of_list>, last = 0x14dc20005fa0, elements = 0}, <No data fields>}, values_list=@0x14dc20005fe8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14dc20014098, last = 0x14dc20014098, elements = 1}, <No data fields>}, update_fields=@0x14dc20005fd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5633f5755be0 <end_of_list>, last = 0x14dc20005fd0, elements = 0}, <No data fields>}, update_values=@0x14dc20005fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5633f5755be0 <end_of_list>, last = 0x14dc20005fb8, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/git-bisect/11.3_dbg/sql/sql_insert.cc:767
|
#18 0x00005633f420cc37 in mysql_execute_command (thd=thd@entry=0x14dc20000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/git-bisect/11.3_dbg/sql/sql_parse.cc:4427
|
#19 0x00005633f42123a8 in mysql_parse (thd=thd@entry=0x14dc20000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14dc70d44200) at /test/git-bisect/11.3_dbg/sql/sql_parse.cc:7760
|
#20 0x00005633f421453c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14dc20000d58, packet=packet@entry=0x14dc2000af69 "INSERT INTO t VALUES (0,0)", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/git-bisect/11.3_dbg/sql/sql_class.h:247
|
#21 0x00005633f4216417 in do_command (thd=0x14dc20000d58, blocking=blocking@entry=true) at /test/git-bisect/11.3_dbg/sql/sql_parse.cc:1406
|
#22 0x00005633f436d2ae in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5633f6d011d8, put_in_cache=put_in_cache@entry=true) at /test/git-bisect/11.3_dbg/sql/sql_connect.cc:1445
|
#23 0x00005633f436d50d in handle_one_connection (arg=0x5633f6d011d8) at /test/git-bisect/11.3_dbg/sql/sql_connect.cc:1347
|
#24 0x000014dc8ea94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#25 0x000014dc8eb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Bug confirmed present in:
MariaDB: 10.6.15 (dbg), 10.9.8 (dbg), 10.10.6 (dbg), 10.11.5 (dbg), 11.0.3 (dbg), 11.1.2 (dbg), 11.2.0 (dbg), 11.3.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.31 (dbg), 10.4.31 (opt), 10.5.22 (dbg), 10.5.22 (opt), 10.6.15 (opt), 10.9.8 (opt), 10.10.6 (opt), 10.11.5 (opt), 11.0.3 (opt), 11.1.2 (opt), 11.2.0 (opt), 11.3.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 8.0.33 (dbg), 8.0.33 (opt)
Attachments
Issue Links
- relates to
-
MDEV-30730 Assertion `marked_for_read()' failed in virtual bool Field_newdate::get_TIME(MYSQL_TIME*, const uchar*, date_mode_t) const
-
- Closed
-
New testcase with different assertion, present in 11.7 and 11.8. Reproduces with MyISAM and InnoDB:
Leads to:
CS 11.8.0 ae998c22b2ce4f1023a6c9c2e925324e2c86c6a1 (Debug)
mariadbd: /test/11.8_dbg/sql/field.cc:6993: virtual bool Field_newdate::get_TIME(MYSQL_TIME *, const uchar *, date_mode_t) const: Assertion `marked_for_read()' failed.
CS 11.8.0 ae998c22b2ce4f1023a6c9c2e925324e2c86c6a1 (Debug)
Core was generated by `/test/MD010125-mariadb-11.8.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGABRT, Aborted.
Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
[Current thread is 1 (LWP 1957023)]
(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 0x00001552be24526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
#4 0x00001552be2288ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x00001552be22881b in __assert_fail_base (fmt=0x1552be3d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5559a2eb1d02 "marked_for_read()", file=file@entry=0x5559a2eb17ec "/test/11.8_dbg/sql/field.cc", line=line@entry=6993, function=function@entry=0x5559a2eb3b07 "virtual bool Field_newdate::get_TIME(MYSQL_TIME *, const uchar *, date_mode_t) const") at ./assert/assert.c:94
#6 0x00001552be23b507 in __assert_fail (assertion=0x5559a2eb1d02 "marked_for_read()", file=0x5559a2eb17ec "/test/11.8_dbg/sql/field.cc", line=6993, function=0x5559a2eb3b07 "virtual bool Field_newdate::get_TIME(MYSQL_TIME *, const uchar *, date_mode_t) const") at ./assert/assert.c:103
#7 0x00005559a21404b2 in Field_newdate::get_TIME (this=0x15525c02a720, ltime=0x1552bd456a00, pos=0x15525c02a6d9 "", fuzzydate={m_mode = date_mode_t::FRAC_TRUNCATE})at /test/11.8_dbg/sql/field.cc:6993
#8 0x00005559a215453d in Field_newdate::get_date (this=0x15525c02a720, ltime=0x1552bd456a00, fuzzydate={m_mode = date_mode_t::FRAC_TRUNCATE})at /test/11.8_dbg/sql/field.h:3641
#9 0x00005559a219bf94 in Item_field::get_date (this=0x15525c02bd20, thd=0x15525c000d58, ltime=0x1552bd456a00, fuzzydate={m_mode = date_mode_t::FRAC_TRUNCATE})at /test/11.8_dbg/sql/item.cc:3483
#10 0x00005559a22dc102 in Item_func_date_format::val_str (this=0x15525c02c130, str=0x1552bd456b20) at /test/11.8_dbg/sql/item_timefunc.cc:1914
#11 0x00005559a21b69fc in Item_func_conv_charset::Item_func_conv_charset (this=0x15525c02c3f8, thd=0x15525c000d58, a=0x15525c02c130, cs=0x5559a5828118, cache_if_const=true)at /test/11.8_dbg/sql/item_strfunc.h:1929
#12 0x00005559a2193379 in Item::safe_charset_converter (this=0x15525c02c130, thd=0x15525c000d58, tocs=0x5559a5828118) at /test/11.8_dbg/sql/item.cc:1308
#13 0x00005559a2198a2f in Type_std_attributes::agg_item_set_converter (this=0x15525c02c298, coll=@0x15525c02c2a0: {collation = 0x5559a5828118, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, fname=@0x1552bd456e88: {str = 0x5559a2e90824 "if", length = 2}, args=0x15525c02aa88, nargs=2, flags=11, item_sep=1, single_err=0x0)at /test/11.8_dbg/sql/item.cc:2695
#14 0x00005559a1bf35cf in Type_std_attributes::agg_arg_charsets (this=0x15525c02c298, c=@0x15525c02c2a0: {collation = 0x5559a5828118, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, func_name=@0x1552bd456e88: {str = 0x5559a2e90824 "if", length = 2}, items=0x15525c02aa88, nitems=2, flags=11, item_sep=1)at /test/11.8_dbg/sql/sql_type.h:3416
#15 0x00005559a1fcc51a in Type_std_attributes::agg_arg_charsets_for_string_result (this=0x15525c02c298, c=@0x15525c02c2a0: {collation = 0x5559a5828118, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, func_name=@0x1552bd456e88: {str = 0x5559a2e90824 "if", length = 2}, items=0x15525c02aa88, nitems=2, item_sep=1)at /test/11.8_dbg/sql/sql_type.h:3431
#16 0x00005559a2016d6d in Type_std_attributes::aggregate_attributes_string (this=0x15525c02c298, func_name=@0x1552bd456e88: {str = 0x5559a2e90824 "if", length = 2}, items=0x15525c02aa88, nitems=2) at /test/11.8_dbg/sql/sql_type.cc:1367
#17 0x00005559a202255b in Type_handler_string_result::Item_hybrid_func_fix_attributes (this=0x5559a3a79150 <type_handler_varchar>, thd=0x15525c000d58, func_name=@0x1552bd456e88: {str = 0x5559a2e90824 "if", length = 2}, handler=0x15525c02c340, func=0x15525c02c290, items=0x15525c02aa88, nitems=2) at /test/11.8_dbg/sql/sql_type.cc:4780
#18 0x00005559a220e291 in Item_hybrid_func::fix_attributes (this=0x15525c02c290, items=0x15525c02aa88, nitems=2)at /test/11.8_dbg/sql/item_func.cc:685
#19 0x00005559a21ea23a in Item_func_case_abbreviation2::fix_length_and_dec2 (this=0x15525c02c290, items=0x15525c02aa88)at /test/11.8_dbg/sql/item_cmpfunc.h:1185
#20 0x00005559a21ea45e in Item_func_case_abbreviation2::fix_length_and_dec2_eliminate_null (this=0x15525c02c290, items=0x15525c02aa88)at /test/11.8_dbg/sql/item_cmpfunc.h:1212
#21 0x00005559a21e41d1 in Item_func_if::fix_length_and_dec (this=0x15525c02c290, thd=0x15525c000d58)at /test/11.8_dbg/sql/item_cmpfunc.h:1331
#22 0x00005559a220d213 in Item_func::fix_fields (this=0x15525c02c290, thd=0x15525c000d58, ref=0x15525c02c368)at /test/11.8_dbg/sql/item_func.cc:366
#23 0x00005559a21cdbda in Item_func_if::fix_fields (this=0x15525c02c290, thd=0x15525c000d58, ref=0x15525c02c368)at /test/11.8_dbg/sql/item_cmpfunc.cc:2594
#24 0x00005559a1ed32a7 in Virtual_column_info::fix_expr (this=0x15525c02c358, thd=0x15525c000d58) at /test/11.8_dbg/sql/table.cc:3787
#25 0x00005559a1ed34a9 in Virtual_column_info::fix_session_expr (this=0x15525c02c358, thd=0x15525c000d58)at /test/11.8_dbg/sql/table.cc:3813
#26 0x00005559a1ed391e in TABLE::vcol_fix_expr (this=0x15525c02a288, thd=0x15525c000d58) at /test/11.8_dbg/sql/table.cc:3897
#27 0x00005559a1c8cef0 in open_table (thd=0x15525c000d58, table_list=0x15525c01ac68, ot_ctx=0x1552bd457be8)at /test/11.8_dbg/sql/sql_base.cc:2377
#28 0x00005559a1c922fd in open_and_process_table (thd=0x15525c000d58, tables=0x15525c01ac68, counter=0x1552bd457c9c, flags=0, prelocking_strategy=0x1552bd457d00, has_prelocking_list=false, ot_ctx=0x1552bd457be8) at /test/11.8_dbg/sql/sql_base.cc:4177
#29 0x00005559a1c90e44 in open_tables (thd=0x15525c000d58, options=@0x15525c006828: {m_options = DDL_options_st::OPT_NONE}, start=0x1552bd457cb0, counter=0x1552bd457c9c, flags=0, prelocking_strategy=0x1552bd457d00) at /test/11.8_dbg/sql/sql_base.cc:4663
#30 0x00005559a1c941dd in open_and_lock_tables (thd=0x15525c000d58, options=@0x15525c006828: {m_options = DDL_options_st::OPT_NONE}, tables=0x15525c01ac68, derived=true, flags=0, prelocking_strategy=0x1552bd457d00) at /test/11.8_dbg/sql/sql_base.cc:5632
#31 0x00005559a1ca359e in open_and_lock_tables (thd=0x15525c000d58, tables=0x15525c01ac68, derived=true, flags=0)at /test/11.8_dbg/sql/sql_base.h:532
#32 0x00005559a1cee7f5 in mysql_insert (thd=0x15525c000d58, table_list=0x15525c01ac68, fields=@0x15525c0061d8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x15525c01b4b8, last = 0x15525c01b4b8, elements = 1}, <No data fields>}, values_list=@0x15525c006220: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x15525c01ba40, last = 0x15525c01ba40, elements = 1}, <No data fields>}, update_fields=@0x15525c006208: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5559a3a49de0 <end_of_list>, last = 0x15525c006208, elements = 0}, <No data fields>}, update_values=@0x15525c0061f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5559a3a49de0 <end_of_list>, last = 0x15525c0061f0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0)at /test/11.8_dbg/sql/sql_insert.cc:784
#33 0x00005559a1d4ed82 in mysql_execute_command (thd=0x15525c000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:4471
#34 0x00005559a1d447a0 in mysql_parse (thd=0x15525c000d58, rawbuf=0x15525c01ab80 "INSERT INTO t (a) VALUES (1)", length=28, parser_state=0x1552bd459980) at /test/11.8_dbg/sql/sql_parse.cc:7901
#35 0x00005559a1d41af7 in dispatch_command (command=COM_QUERY, thd=0x15525c000d58, packet=0x15525c00b2a9 "INSERT INTO t (a) VALUES (1)", packet_length=28, blocking=true) at /test/11.8_dbg/sql/sql_parse.cc:1903
#36 0x00005559a1d4542a in do_command (thd=0x15525c000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1416
#37 0x00005559a1f316b9 in do_handle_one_connection (connect=0x5559a60ea138, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415
#38 0x00005559a1f31426 in handle_one_connection (arg=0x5559a61b10a8)at /test/11.8_dbg/sql/sql_connect.cc:1327
#39 0x00005559a24f69cf in pfs_spawn_thread (arg=0x5559a61506d8)at /test/11.8_dbg/storage/perfschema/pfs.cc:2198
#40 0x00001552be29ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
#41 0x00001552be329c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Bug confirmed present in:
MariaDB: 11.7.2 (dbg), 11.8.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.28 (dbg), 10.5.28 (opt), 10.6.21 (dbg), 10.6.21 (opt), 10.11.11 (dbg), 10.11.11 (opt), 11.4.5 (dbg), 11.4.5 (opt), 11.7.2 (opt), 11.8.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.44 (dbg), 5.7.44 (opt), 8.0.36 (dbg), 8.0.36 (opt), 9.1.0 (dbg), 9.1.0 (opt)