Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13626 Merge InnoDB test cases from MySQL 5.7
  3. MDEV-14231

MATCH() AGAINST( IN BOOLEAN MODE), results mismatch

    XMLWordPrintable

Details

    Description

      https://github.com/MariaDB/server/tree/bb-10.2-alice/mysql-test/suite/innodb_fts/t/multiple_index.test

      results are different in mysql/mariadb, need check which ones are correct
      testcase

      drop table if exists t1;
      CREATE TABLE t1 (
      id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
      a VARCHAR(200),
      b TEXT
      ) ENGINE = InnoDB STATS_PERSISTENT=0;
       
      INSERT INTO t1 (a,b) VALUES
              ('MySQL Tutorial','DBMS stands for DataBase ...')  ,
              ('How To Use MySQL Well','After you went through a ...'),
              ('Optimizing MySQL','In this tutorial we will show ...');
       
       
      ALTER TABLE t1 ADD FULLTEXT INDEX idx_1 (a);
      ALTER TABLE t1 ADD FULLTEXT INDEX idx_2 (b);
      SHOW CREATE TABLE t1;
       
      START TRANSACTION;
       
      INSERT INTO t1 (a,b) VALUES
              ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
              ('MySQL vs. YourSQL','In the following database comparison ...'),
              ('MySQL Security','When configured properly, MySQL ...');
      ROLLBACK;
       
      select *, MATCH(a) AGAINST("Optimizing MySQL" IN BOOLEAN MODE) as x from t1;
      

      in MariaDb 10.2

      MariaDB [test]> select *, MATCH(a) AGAINST("Optimizing MySQL" IN BOOLEAN MODE) as x from t1;
      +----+-----------------------+-----------------------------------+----------------------------+
      | id | a                     | b                                 | x                          |
      +----+-----------------------+-----------------------------------+----------------------------+
      |  1 | MySQL Tutorial        | DBMS stands for DataBase ...      | 0.000000001885928302414186 |
      |  2 | How To Use MySQL Well | After you went through a ...      | 0.000000001885928302414186 |
      |  3 | Optimizing MySQL      | In this tutorial we will show ... |        0.22764469683170319 |
      +----+-----------------------+-----------------------------------+----------------------------+
      3 rows in set (0.00 sec)
      

      Mysql 5.7

      mysql> select *, MATCH(a) AGAINST("Optimizing MySQL" IN BOOLEAN MODE) as x from t1;
      +----+-----------------------+-----------------------------------+--------------------+
      | id | a                     | b                                 | x                  |
      +----+-----------------------+-----------------------------------+--------------------+
      |  1 | MySQL Tutorial        | DBMS stands for DataBase ...      | 0.0906190574169159 |
      |  2 | How To Use MySQL Well | After you went through a ...      | 0.0906190574169159 |
      |  3 | Optimizing MySQL      | In this tutorial we will show ... | 0.6961383819580078 |
      +----+-----------------------+-----------------------------------+--------------------+
      3 rows in set (0,00 sec)
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              alice Alice Sherepa
              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.