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

Non-default distance function and M are not replicated

    XMLWordPrintable

Details

    Description

      As notoriously customary with dynamic variable values, a vector distance function and M, both of which are important for the index structure, are not replicated, thus the table on the replica is going to have an essentially different index. It may remain unnoticed as it doesn't cause replication abort as such, but will obviously affect further query results on the replica.

      --source include/master-slave.inc
       
      set mhnsw_default_m= 42, mhnsw_default_distance= cosine;
      create table t (b vector(1) not null, vector(b));
      show create table t;
       
      --sync_slave_with_master
      show create table t;
       
      # Cleanup
      --connection master
      drop table t;
      --source include/rpl_end.inc
      

      3e03a45aa4c69e5aa76c9396547797a895a98edc

      [connection master]
      set mhnsw_default_m= 42, mhnsw_default_distance= cosine;
      create table t (b vector(1) not null, vector(b));
      show create table t;
      Table	Create Table
      t	CREATE TABLE `t` (
        `b` vector(1) NOT NULL,
        VECTOR KEY `b` (`b`) `m`=42 `distance`='cosine'
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
      connection slave;
      show create table t;
      Table	Create Table
      t	CREATE TABLE `t` (
        `b` vector(1) NOT NULL,
        VECTOR KEY `b` (`b`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
      

      Attachments

        Issue Links

          Activity

            People

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