Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.2, 11.4, 11.6, 11.7
Description
DELIMITER $$;
|
CREATE PROCEDURE p1() |
BEGIN
|
DECLARE r ROW TYPE OF t1 DEFAULT 1; |
SELECT r.a, r.b; |
END; |
$$
|
DELIMITER ;$$
|
CREATE TABLE t1(a VARCHAR(0) COMPRESSED); |
CALL p1();
|
Leads to:
CS 10.5.27 95885261f0ff70e563140f5fb94da134b84d79b4 (Debug) |
mariadbd: /test/10.5_dbg/sql/field.h:4232: Field_varstring_compressed::Field_varstring_compressed(uchar*, uint32, uint, uchar*, uchar, Field::utype, const LEX_CSTRING*, TABLE_SHARE*, const DTCollation&, Compression_method*): Assertion `len_arg > 0' failed.
|
CS 10.5.27 95885261f0ff70e563140f5fb94da134b84d79b4 (Debug) |
Core was generated by `/test/MD130924-mariadb-10.5.27-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 0x150338500700 (LWP 3305706))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x00001503431f9859 in __GI_abort () at abort.c:79
|
#2 0x00001503431f9729 in __assert_fail_base (fmt=0x15034338f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5634e604e3ea "len_arg > 0", file=0x5634e5fe8118 "/test/10.5_dbg/sql/field.h", line=4232, function=<optimized out>) at assert.c:92
|
#3 0x000015034320afd6 in __GI___assert_fail (assertion=assertion@entry=0x5634e604e3ea "len_arg > 0", file=file@entry=0x5634e5fe8118 "/test/10.5_dbg/sql/field.h", line=line@entry=4232, function=function@entry=0x5634e60511d8 "Field_varstring_compressed::Field_varstring_compressed(uchar*, uint32, uint, uchar*, uchar, Field::utype, const LEX_CSTRING*, TABLE_SHARE*, const DTCollation&, Compression_method*)") at assert.c:101
|
#4 0x00005634e54bf203 in Field_varstring_compressed::Field_varstring_compressed (compression_method_arg=<optimized out>, collation=@0x1503384fe250: {collation = 0x5634e68e1b20 <my_charset_latin1>, derivation = DERIVATION_IMPLICIT, repertoire = MY_REPERTOIRE_UNICODE30}, share=0x1502b8014be0, field_name_arg=0x1502b8014738, unireg_check_arg=<optimized out>, null_bit_arg=<optimized out>, null_ptr_arg=0x5634e6572827 "", length_bytes_arg=1, len_arg=0, ptr_arg=0x0, this=0x1502b80151c0) at /test/10.5_dbg/sql/field.h:4232
|
#5 Type_handler_varchar::make_table_field_from_def (this=<optimized out>, share=0x1502b8014be0, mem_root=0x1502b8006a40, name=0x1502b8014738, rec=<optimized out>, bit=<optimized out>, attr=0x1502b8014708, flags=0) at /test/10.5_dbg/sql/sql_type.cc:8493
|
#6 0x00005634e557795e in Column_definition_attributes::make_field (this=0x1502b8014708, share=0x1502b8014be0, mem_root=0x1502b8006a40, rec=rec@entry=0x1503384fe340, handler=0x5634e696dd90 <type_handler_varchar>, field_name=0x1502b8014738, flags=0) at /test/10.5_dbg/sql/field.cc:10815
|
#7 0x00005634e532379b in Column_definition::make_field (field_name_arg=<optimized out>, addr=0x1503384fe340, mem_root=<optimized out>, share=<optimized out>, this=<optimized out>) at /test/10.5_dbg/sql/sql_type.h:7519
|
#8 Virtual_tmp_table::add (this=this@entry=0x1502b80147f0, field_list=@0x1503384fe410: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1502b80147e0, last = 0x1502b80147e0, elements = 1}, <No data fields>}) at /test/10.5_dbg/sql/sql_select.cc:19865
|
#9 0x00005634e5217004 in create_virtual_tmp_table (field_list=@0x1503384fe410: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1502b80147e0, last = 0x1502b80147e0, elements = 1}, <No data fields>}, thd=0x1502b8000d48) at /test/10.5_dbg/sql/sql_select.h:2391
|
#10 Item_field_row::row_create_items (this=this@entry=0x1502b8013e88, thd=thd@entry=0x1502b8000d48, list=list@entry=0x1503384fe410) at /test/10.5_dbg/sql/sp_rcontext.cc:416
|
#11 0x00005634e52173d6 in sp_rcontext::init_var_items (this=this@entry=0x1502b8013300, thd=thd@entry=0x1502b8000d48, field_def_lst=@0x1503384fe510: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1502b80132f0, last = 0x1502b80132f0, elements = 1}, <No data fields>}) at /test/10.5_dbg/sql/field.h:5598
|
#12 0x00005634e5217ae6 in sp_rcontext::create (thd=thd@entry=0x1502b8000d48, owner=owner@entry=0x1502b803f7c0, root_parsing_ctx=0x1502b8040118, return_value_fld=return_value_fld@entry=0x0, field_def_lst=@0x1503384fe510: {<List<Spvar_definition>> = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1502b80132f0, last = 0x1502b80132f0, elements = 1}, <No data fields>}, <No data fields>}) at /test/10.5_dbg/sql/sp_rcontext.cc:119
|
#13 0x00005634e5207288 in sp_head::rcontext_create (this=this@entry=0x1502b803f7c0, thd=thd@entry=0x1502b8000d48, ret_value=ret_value@entry=0x0, defs=defs@entry=0x1503384fe510, switch_security_ctx=switch_security_ctx@entry=true) at /test/10.5_dbg/sql/sp_head.cc:1811
|
#14 0x00005634e5207310 in sp_head::rcontext_create (this=this@entry=0x1502b803f7c0, thd=thd@entry=0x1502b8000d48, ret_value=ret_value@entry=0x0, args=args@entry=0x1502b8005e58) at /test/10.5_dbg/sql/sp_head.cc:1828
|
#15 0x00005634e520c741 in sp_head::execute_procedure (this=0x1502b803f7c0, thd=thd@entry=0x1502b8000d48, args=0x1502b8005e58) at /test/10.5_dbg/sql/sp_head.cc:2306
|
#16 0x00005634e52c7659 in do_execute_sp (thd=thd@entry=0x1502b8000d48, sp=sp@entry=0x1502b803f7c0) at /test/10.5_dbg/sql/sql_parse.cc:3111
|
#17 0x00005634e52cd154 in Sql_cmd_call::execute (this=0x1502b8012e68, thd=0x1502b8000d48) at /test/10.5_dbg/sql/sql_parse.cc:3357
|
#18 0x00005634e52dab89 in mysql_execute_command (thd=thd@entry=0x1502b8000d48) at /test/10.5_dbg/sql/sql_parse.cc:6180
|
#19 0x00005634e52c1420 in mysql_parse (thd=thd@entry=0x1502b8000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1503384ff2c0, 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:8236
|
#20 0x00005634e52d0165 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1502b8000d48, packet=packet@entry=0x1502b800aa19 "CALL p1()", packet_length=packet_length@entry=9, 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
|
#21 0x00005634e52d2e9e in do_command (thd=0x1502b8000d48) at /test/10.5_dbg/sql/sql_parse.cc:1376
|
#22 0x00005634e54202f2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5634e9dc7468, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1417
|
#23 0x00005634e5420990 in handle_one_connection (arg=arg@entry=0x5634e9dc7468) at /test/10.5_dbg/sql/sql_connect.cc:1319
|
#24 0x00005634e58a1bb9 in pfs_spawn_thread (arg=0x5634e9297668) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#25 0x000015034370a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#26 0x00001503432f6133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.5.27 (dbg), 10.6.20 (dbg), 10.11.10 (dbg), 11.1.7 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.0 (dbg), 11.7.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.1.7 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.0 (opt), 11.7.0 (opt)