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

Update on vector column returns error but modifies the value, results in further ER_KEY_NOT_FOUND

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.7.1
    • Vector search
    • None

    Description

      CREATE TABLE t (a INT, v BLOB NOT NULL, VECTOR INDEX (v));
      INSERT INTO t VALUES (1,VEC_FROMTEXT('[0]'));
       
      --error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
      UPDATE t SET v = VEC_FROMTEXT('[0,0]');
       
      SELECT a, VEC_TOTEXT(v) FROM t;
      UPDATE t SET a = 2;
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector f20a1f4e94f5fc700959ff6b7945aa8a5fd0c307

      UPDATE t SET v = VEC_FROMTEXT('[0,0]');
      ERROR 22007: Incorrect vector value: '...' for column `test`.`t`.`v` at row 1
      SELECT a, VEC_TOTEXT(v) FROM t;
      a	VEC_TOTEXT(v)
      1	[0.000000,0.000000]
      UPDATE t SET a = 2;
      bug.vec10-1                              [ fail ]
              Test ended at 2024-09-27 17:16:09
       
      CURRENT_TEST: bug.vec10-1
      mysqltest: At line 8: query 'UPDATE t SET a = 2' failed: ER_KEY_NOT_FOUND (1032): Can't find record in 't'
      

      So, UPDATE from 1 to 2 dimensions failed, but the value was updated nevertheless.
      And the next UPDATE causes a corruption-like error.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.