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

Vector type cannot store values which VEC_FromText produces and VEC_ToText accepts

    XMLWordPrintable

Details

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

    Description

      bb-11.6-MDEV-32887-vector 4dfa605f405df3bee7142be6bcdc364f5a5e0db3

      MariaDB [test]> select vec_totext(0xAEFAA77A);
      +------------------------+
      | vec_totext(0xAEFAA77A) |
      +------------------------+
      | [4.36099e35]           |
      +------------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> select hex(vec_fromtext('[4.36099e35]'));
      +-----------------------------------+
      | hex(vec_fromtext('[4.36099e35]')) |
      +-----------------------------------+
      | AEFAA77A                          |
      +-----------------------------------+
      1 row in set (0.001 sec)
      

      MariaDB [test]> create or replace table t (v vector(1));
      Query OK, 0 rows affected (0.028 sec)
       
      MariaDB [test]> insert into t values (vec_fromtext('[4.36099e35]'));
      ERROR 1366 (22007): Incorrect vector value: '\xAE\xFA\xA7z' for column `test`.`t`.`v` at row 1
      MariaDB [test]> insert into t values (0xAEFAA77A);
      ERROR 1366 (22007): Incorrect vector value: '\xAE\xFA\xA7z' for column `test`.`t`.`v` at row 1
      

      I guess either vec_xxxtext functions should return an error, or the value should be vaild for the vector column.

      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.