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

Vector values do not survive mariadb-dump / restore

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • None
    • Vector search
    • None

    Description

      After restoring a dump produced by mariadb-dump, (some?) vector type values become zero, while the same values in binary/blob columns get restored normally.
      As I understand, it happens because they are dumped as strings, and when it comes to restoring, the strings are rejected as incorrect vector values, but since restore happens in a non-strict mode, they are converted into zeros.

      create table t_vec (a vector(1));
      create table t_bin (a blob);
       
      insert into t_vec values (0x31313131),(0x66BCAF3E);
      insert into t_bin values (0x31313131),(0x66BCAF3E);
       
      select vec_totext(a), hex(a) from t_vec;
      select vec_totext(a), hex(a) from t_bin;
       
      create database restore;
       
      --exec $MYSQL_DUMP test | $MYSQL restore
       
      select vec_totext(a), hex(a) from restore.t_vec;
      select vec_totext(a), hex(a) from restore.t_bin;
       
      # Cleanup
      drop database restore;
      drop table t_vec, t_bin;
      

      bb-11.6-MDEV-32887-vector c29016301f7095ccc482fdfec1887f61e5adbed1

      select vec_totext(a), hex(a) from restore.t_vec;
      vec_totext(a)	hex(a)
      [0]	00000000
      [0]	00000000
      select vec_totext(a), hex(a) from restore.t_bin;
      vec_totext(a)	hex(a)
      [2.57849e-9]	31313131
      [0.343234]	66BCAF3E
      

      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:

                Git Integration

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