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

Assertion `res->length() > 0 && res->length() % 4 == 0' fails upon increasing length of vector column

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a INT, v VECTOR(1) NOT NULL DEFAULT 0x00000000, VECTOR(v));
      INSERT INTO t (a) VALUES (1);
      ALTER TABLE t MODIFY v VECTOR(64) NOT NULL;
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector b685f527ad6b949256159f2484458c3a88dac277

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc:1134: int mhnsw_insert(TABLE*, KEY*): Assertion `res->length() > 0 && res->length() % 4 == 0' failed.
      241015 14:55:31 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f1f63853e32 in __GI___assert_fail (assertion=0x5601322c95e0 "res->length() > 0 && res->length() % 4 == 0", file=0x5601322c89c0 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc", line=1134, function=0x5601322c93a0 "int mhnsw_insert(TABLE*, KEY*)") at ./assert/assert.c:101
      #10 0x0000560130683764 in mhnsw_insert (table=0x6190000a8798, keyinfo=0x6190000a92a0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc:1134
      #11 0x000056012f71c935 in TABLE::hlindexes_on_insert (this=0x6190000a8798) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_base.cc:9919
      #12 0x0000560130274c95 in handler::ha_write_row (this=0x61d0002454b8, buf=0x6190000a8cc8 "\376\001") at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:8163
      #13 0x000056012fbe34b2 in copy_data_between_tables (thd=0x62c0000c0218, from=0x61900009dd98, to=0x6190000a8798, ignore=false, order_num=0, order=0x0, copied=0x7f1f5864c9c0, deleted=0x7f1f5864c9e0, alter_info=0x7f1f5864fa30, alter_ctx=0x7f1f5864eb70, online=true, start_alter_id=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_table.cc:12480
      #14 0x000056012fbdb66f in mysql_alter_table (thd=0x62c0000c0218, new_db=0x62c0000c4fe8, new_name=0x62c0000c5448, create_info=0x7f1f5864fbe0, table_list=0x6290000e6378, recreate_info=0x7f1f5864f970, alter_info=0x7f1f5864fa30, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_table.cc:11575
      #15 0x000056012fdaec73 in Sql_cmd_alter_table::execute (this=0x6290000e6bd0, thd=0x62c0000c0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_alter.cc:701
      #16 0x000056012f8bf422 in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:5846
      #17 0x000056012f8cc53a in mysql_parse (thd=0x62c0000c0218, rawbuf=0x6290000e6238 "ALTER TABLE t MODIFY v VECTOR(64) NOT NULL", length=42, parser_state=0x7f1f586519f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #18 0x000056012f8a355c in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000253219 "ALTER TABLE t MODIFY v VECTOR(64) NOT NULL", packet_length=42, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #19 0x000056012f8a0270 in do_command (thd=0x62c0000c0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
      #20 0x000056012fd8fc4b in do_handle_one_connection (connect=0x6080000034b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #21 0x000056012fd8f60c in handle_one_connection (arg=0x608000003438) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #22 0x0000560130a351a0 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #23 0x00007f1f638a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #24 0x00007f1f6392861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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