Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40486

ER_TOO_BIG_FIELDLENGTH or assertion failure upon creating vector from blob

    XMLWordPrintable

Details

    • Q3/2026 Server Maintenance, Q3/2026 Server Development

    Description

      CREATE TABLE t (a TEXT) AS SELECT '[1]' AS a;
      CREATE TABLE tt AS SELECT VEC_FROMTEXT(a) AS f FROM t;
      DROP TABLE t, tt;
      

      11.8 2b6529426a7e7c65d286e093d84138be9dcc34a3 non-debug

      mysqltest: At line 2: query 'CREATE TABLE tt AS SELECT VEC_FROMTEXT(a) AS f FROM t' failed: ER_TOO_BIG_FIELDLENGTH (1074): Column length too big for column 'f' (max = 65532); use BLOB or TEXT instead
      

      11.8 2b6529426a7e7c65d286e093d84138be9dcc34a3 debug

      mariadbd: /data/bld/11.8-asan-ubsan/sql/field.h:4247: Field_varstring::Field_varstring(uchar*, uint32, uint, uchar*, uchar, Field::utype, const LEX_CSTRING*, TABLE_SHARE*, const DTCollation&): Assertion `len_arg <= (65535-2-1)' failed.
       
      #10 0x00007fe208852ec2 in __GI___assert_fail (assertion=0x5559c3188280 "len_arg <= (65535-2-1)", file=0x5559c31866a0 "/data/bld/11.8-asan-ubsan/sql/field.h", line=4247, function=0x5559c31881c0 "Field_varstring::Field_varstring(uchar*, uint32, uint, uchar*, uchar, Field::utype, const LEX_CSTRING*, TABLE_SHARE*, const DTCollation&)") at ./assert/assert.c:103
      #11 0x00005559c022267e in Field_varstring::Field_varstring (this=this@entry=0x62d0001018e0, ptr_arg=ptr_arg@entry=0x0, len_arg=len_arg@entry=33554430, length_bytes_arg=2, null_ptr_arg=null_ptr_arg@entry=0x5559c2f72340 "", null_bit_arg=<optimized out>, unireg_check_arg=Field::NONE, field_name_arg=0x62d0000fbd48, share=0x7fe1fbb93240, collation=...) at /data/bld/11.8-asan-ubsan/sql/field.h:4247
      #12 0x00005559c02a2437 in Field_vector::Field_vector (this=0x62d0001018e0, ptr_arg=<optimized out>, null_ptr_arg=<optimized out>, null_bit_arg=<optimized out>, unireg_check_arg=<optimized out>, field_name_arg=0x62d0000fbd48, share=<optimized out>, len_arg=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_type_vector.h:129
      #13 0x00005559c029b30b in Type_handler_vector::make_table_field (this=<optimized out>, root=0x62c0000b6430, name=0x62d0000fbd48, addr=..., attr=..., share=0x7fe1fbb93240) at /data/bld/11.8-asan-ubsan/sql/sql_type_vector.cc:114
      #14 0x00005559c01cfed1 in Type_handler::make_and_init_table_field (this=this@entry=0x5559cc9fe380 <type_handler_vector>, root=root@entry=0x62c0000b6430, name=name@entry=0x62d0000fbd48, addr=..., attr=..., table=table@entry=0x7fe1fbb92dd0) at /data/bld/11.8-asan-ubsan/sql/sql_type.cc:3638
      #15 0x00005559bf425cfc in Item::create_table_field_from_handler (this=this@entry=0x62d0000fbd00, root=root@entry=0x62c0000b6430, table=table@entry=0x7fe1fbb92dd0) at /data/bld/11.8-asan-ubsan/sql/item.h:905
      #16 0x00005559c142d664 in Item_func_vec_fromtext::create_field_for_create_select (this=0x62d0000fbd00, root=0x62c0000b6430, table=0x7fe1fbb92dd0) at /data/bld/11.8-asan-ubsan/sql/item_vectorfunc.h:101
      #17 0x00005559bf31164b in select_create::create_table_from_items (this=this@entry=0x62d0000fd818, thd=thd@entry=0x62c0000b0218, items=items@entry=0x7fe1fbb93a10, lock=lock@entry=0x7fe1fbb939f0) at /data/bld/11.8-asan-ubsan/sql/sql_insert.cc:4873
      #18 0x00005559bf3152fe in select_create::prepare (this=0x62d0000fd818, _values=..., u=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_insert.cc:5145
      #19 0x00005559bf74675a in JOIN::prepare (this=this@entry=0x62d0000fd968, tables_init=tables_init@entry=0x62d0000fc360, conds_init=conds_init@entry=0x62d0000fcca0, og_num=og_num@entry=0, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=<optimized out>, having_init=<optimized out>, proc_param_init=<optimized out>, select_lex_arg=<optimized out>, unit_arg=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:1870
      #20 0x00005559bf7f7a0a in mysql_select (thd=thd@entry=0x62c0000b0218, tables=<optimized out>, fields=..., conds=conds@entry=0x62d0000fcca0, og_num=og_num@entry=0, order=order@entry=0x0, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=2201187781377, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:5397
      #21 0x00005559bf7f90d2 in handle_select (thd=thd@entry=0x62c0000b0218, lex=lex@entry=0x62c0000b4688, result=result@entry=0x62d0000fd818, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:634
      #22 0x00005559bfa0b868 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x62c0000b0218) at /data/bld/11.8-asan-ubsan/sql/sql_table.cc:13743
      #23 0x00005559bf4d31f0 in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:5924
      #24 0x00005559bf4d7cfd in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fe1fbb959a0) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:7953
      #25 0x00005559bf4e100f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x629000253219 "CREATE TABLE test.tmp62 AS SELECT DISTINCT VEC_FROMTEXT((UpdateXML(21416, '/bcaace/c/a/c/e/c/debcccbbcdade/bddbde/aae/eee/daae/debbc', '2026-01-11'))) AS field1, BINARY (Host OR Host) AS field2 FROM m"..., packet_length=packet_length@entry=243, blocking=blocking@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:1923
      #26 0x00005559bf4ed7bd in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:1431
      #27 0x00005559bfd36684 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000003a38, put_in_cache=put_in_cache@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_connect.cc:1511
      #28 0x00005559bfd377ed in handle_one_connection (arg=0x608000003a38) at /data/bld/11.8-asan-ubsan/sql/sql_connect.cc:1423
      #29 0x00005559c17c01a2 in pfs_spawn_thread (arg=0x617000005f18) at /data/bld/11.8-asan-ubsan/storage/perfschema/pfs.cc:2198
      #30 0x00007fe2088a71f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #31 0x00007fe2089278ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 11.8:

      commit 2b6529426a7e7c65d286e093d84138be9dcc34a3 (HEAD)
      Author:     Yuchen Pei
      AuthorDate: Tue Jun 30 15:28:09 2026 +1000
       
          MDEV-39558 Check resulting VECTOR length in type aggregation inference
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 1.55d Original Estimate - 1.55d
                  1.55d
                  Remaining:
                  Time Spent - 3d 4h 40m Remaining Estimate - 58m
                  58m
                  Logged:
                  Time Spent - 3d 4h 40m Remaining Estimate - 58m
                  3d 4h 40m

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.