Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11
Description
CREATE TABLE t (a VARCHAR(0),b VARCHAR(0) DEFAULT TRIM(BOTH '' FROM a)); |
INSERT INTO t VALUES ('',''); |
EXECUTE IMMEDIATE 'UPDATE t SET b=?' USING DEFAULT; |
Leads to:
10.5.26 c038b3c05ed90041333dc869e3435c301210a3c4 (Debug) |
mariadbd: /test/10.5_dbg/sql/field.cc:7914: virtual String* Field_varstring::val_str(String*, String*): Assertion `marked_for_read()' failed.
|
10.5.26 c038b3c05ed90041333dc869e3435c301210a3c4 (Debug) |
Core was generated by `/test/MD300724-mariadb-10.5.26-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x14bf20f54700 (LWP 941198))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x000014bf38651859 in __GI_abort () at abort.c:79
|
#2 0x000014bf38651729 in __assert_fail_base (fmt=0x14bf387e7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ddfa4cc8d0 "marked_for_read()", file=0x55ddfa4cc74b "/test/10.5_dbg/sql/field.cc", line=7914, function=<optimized out>) at assert.c:92
|
#3 0x000014bf38662fd6 in __GI___assert_fail (assertion=assertion@entry=0x55ddfa4cc8d0 "marked_for_read()", file=file@entry=0x55ddfa4cc74b "/test/10.5_dbg/sql/field.cc", line=line@entry=7914, function=function@entry=0x55ddfa4ce468 "virtual String* Field_varstring::val_str(String*, String*)") at assert.c:101
|
#4 0x000055ddf98b7dbd in Field_varstring::val_str (this=0x14beb801d6b0, val_buffer=<optimized out>, val_ptr=0x14beb801c378) at /test/10.5_dbg/sql/field.cc:7914
|
#5 0x000055ddf9903877 in Item_field::val_str (this=0x14beb801c340, str=0x14beb801c4b8) at /test/10.5_dbg/sql/item.cc:3349
|
#6 0x000055ddf99d3b08 in Item_func_trim::val_str (this=0x14beb801c480, str=0x14beb801c4b8) at /test/10.5_dbg/sql/item_strfunc.cc:2079
|
#7 0x000055ddf991a5c9 in Item::save_str_in_field (this=0x14beb801c480, field=0x14beb801d798, no_conversions=<optimized out>) at /test/10.5_dbg/sql/item.cc:6889
|
#8 0x000055ddf97fe46c in Type_handler_string_result::Item_save_in_field (this=<optimized out>, item=<optimized out>, field=<optimized out>, no_conversions=<optimized out>) at /test/10.5_dbg/sql/sql_type.cc:4347
|
#9 0x000055ddf9900b7d in Item::save_in_field (this=0x14beb801c480, field=0x14beb801d798, no_conversions=<optimized out>) at /test/10.5_dbg/sql/item.cc:6937
|
#10 0x000055ddf98aeb8c in Field::set_default (this=0x14beb801d798) at /test/10.5_dbg/sql/field.cc:2597
|
#11 0x000055ddf98d1ab3 in Field::save_in_field_default_value (this=this@entry=0x14beb801d798, view_error_processing=<optimized out>) at /test/10.5_dbg/sql/field.cc:11351
|
#12 0x000055ddf99194d3 in Item_param::save_in_field (this=0x14beb8068830, field=0x14beb801d798, no_conversions=<optimized out>) at /test/10.5_dbg/sql/table.h:2745
|
#13 0x000055ddf95a01fb in fill_record (thd=thd@entry=0x14beb8000d48, table_arg=table_arg@entry=0x14beb8020828, fields=@0x14beb8066d58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a00, last = 0x14beb8068a00, elements = 1}, <No data fields>}, values=@0x14beb8067318: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a10, last = 0x14beb8068a10, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, update=update@entry=true) at /test/10.5_dbg/sql/sql_base.cc:8604
|
#14 0x000055ddf95a03a5 in fill_record_n_invoke_before_triggers (thd=thd@entry=0x14beb8000d48, table=table@entry=0x14beb8020828, fields=@0x14beb8066d58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a00, last = 0x14beb8068a00, elements = 1}, <No data fields>}, values=@0x14beb8067318: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a10, last = 0x14beb8068a10, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, event=event@entry=TRG_EVENT_UPDATE) at /test/10.5_dbg/sql/sql_base.cc:8782
|
#15 0x000055ddf971198c in mysql_update (thd=thd@entry=0x14beb8000d48, table_list=<optimized out>, fields=@0x14beb8066d58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a00, last = 0x14beb8068a00, elements = 1}, <No data fields>}, values=@0x14beb8067318: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14beb8068a10, last = 0x14beb8068a10, elements = 1}, <No data fields>}, conds=<optimized out>, order_num=<optimized out>, order=<optimized out>, limit=18446744073709551615, ignore=<optimized out>, found_return=<optimized out>, updated_return=<optimized out>) at /test/10.5_dbg/sql/sql_update.cc:1025
|
#16 0x000055ddf96214cc in mysql_execute_command (thd=0x14beb8000d48) at /test/10.5_dbg/sql/sql_limit.h:78
|
#17 0x000055ddf963866c in Prepared_statement::execute (this=this@entry=0x14beb8065ee8, expanded_query=expanded_query@entry=0x14bf20f52b00, open_cursor=open_cursor@entry=false) at /test/10.5_dbg/sql/sql_prepare.cc:5131
|
#18 0x000055ddf96389d1 in Prepared_statement::execute_loop (this=this@entry=0x14beb8065ee8, expanded_query=expanded_query@entry=0x14bf20f52b00, open_cursor=open_cursor@entry=false, packet=packet@entry=0x0, packet_end=packet_end@entry=0x0) at /test/10.5_dbg/sql/sql_prepare.cc:4553
|
#19 0x000055ddf963a52a in Prepared_statement::execute_immediate (this=this@entry=0x14beb8065ee8, query=<optimized out>, query_len=16) at /test/10.5_dbg/sql/sql_prepare.cc:5259
|
#20 0x000055ddf963a702 in mysql_sql_stmt_execute_immediate (thd=thd@entry=0x14beb8000d48) at /test/10.5_dbg/sql/sql_prepare.cc:3008
|
#21 0x000055ddf962000c in mysql_execute_command (thd=thd@entry=0x14beb8000d48) at /test/10.5_dbg/sql/sql_parse.cc:4036
|
#22 0x000055ddf960c28c in mysql_parse (thd=thd@entry=0x14beb8000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14bf20f532c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8223
|
#23 0x000055ddf961afd1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14beb8000d48, packet=packet@entry=0x14beb800aa19 "EXECUTE IMMEDIATE 'UPDATE t SET b=?' USING DEFAULT", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1329
|
#24 0x000055ddf961dd0a in do_command (thd=0x14beb8000d48) at /test/10.5_dbg/sql/sql_parse.cc:1376
|
#25 0x000055ddf976ac16 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55ddfd567c18, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1417
|
#26 0x000055ddf976b2b4 in handle_one_connection (arg=arg@entry=0x55ddfd567c18) at /test/10.5_dbg/sql/sql_connect.cc:1319
|
#27 0x000055ddf9beb18d in pfs_spawn_thread (arg=0x55ddfd54a988) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#28 0x000014bf38b62609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#29 0x000014bf3874e133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.5.26 (dbg), 10.6.19 (dbg), 10.11.9 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.26 (opt), 10.6.19 (opt), 10.11.9 (opt), 11.1.6 (dbg), 11.1.6 (opt), 11.2.5 (dbg), 11.2.5 (opt), 11.4.3 (dbg), 11.4.3 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.0 (dbg), 11.6.0 (opt)