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

innodb_fts.limit_union failed, results mismatch, MATCH .. AGAINST (.. IN BOOLEAN MODE)

Details

    Description

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

       
      innodb_fts.limit_union 'innodb'          [ fail ]
              Test ended at 2017-11-02 10:51:19
       
      CURRENT_TEST: innodb_fts.limit_union
      --- /home/alice/aliska/10.2/mysql-test/suite/innodb_fts/r/limit_union.result	2017-11-02 10:51:13.094313965 +0100
      +++ /home/alice/aliska/10.2/mysql-test/suite/innodb_fts/r/limit_union.reject	2017-11-02 10:51:19.166304127 +0100
      @@ -32,7 +32,7 @@
       WHERE MATCH (title,body)
       AGAINST ('MySQL' IN BOOLEAN MODE) limit 1;
       id	title	body
      -1	MySQL Tutorial	DBMS stands for DataBase ...
      +6	MySQL Security	When configured properly, MySQL ...
       # Without optimization
       SET debug_dbug = '+d,fts_union_limit_off';
       SELECT * FROM articles
       
      mysqltest: Result length mismatch
      
      

      Attachments

        Issue Links

          Activity

            If I remove the LIMIT 1 and include the MATCH expression in the output, we see that the returned row indeed is the best match, and everything else comes second:

            10.4 228b7e4db59441656abfb194da0e239fd091cfd0

            +rank	id	title	body
            +0.000000003771856604828372	6	MySQL Security	When configured properly, MySQL ...
            +0.000000001885928302414186	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.000000001885928302414186	4	1001 MySQL Tricks	1. Never run mysqld as root. 2. ...
            +0.000000001885928302414186	5	MySQL vs. YourSQL	In the following database comparison ...
            

            This is the patch that I applied:

            diff --git a/mysql-test/suite/innodb_fts/t/limit_union.test b/mysql-test/suite/innodb_fts/t/limit_union.test
            index 71c9af6929e..f2a26be0936 100644
            --- a/mysql-test/suite/innodb_fts/t/limit_union.test
            +++ b/mysql-test/suite/innodb_fts/t/limit_union.test
            @@ -29,9 +29,10 @@ SELECT * FROM articles
             --echo # Without optimization
             SET @save_dbug = @@debug_dbug;
             SET debug_dbug = '+d,fts_union_limit_off';
            -SELECT * FROM articles
            +SELECT MATCH (title,body)
            +	AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) rank, articles.* FROM articles
             	WHERE MATCH (title,body)
            -	AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) LIMIT 1;
            +	AGAINST ('MySQL' IN NATURAL LANGUAGE MODE);
             SET debug_dbug = @save_dbug;
             
             --echo # Query involves No Ranking and fts_union operations
            

            thiru, can you please analyze this?

            marko Marko Mäkelä added a comment - If I remove the LIMIT 1 and include the MATCH expression in the output, we see that the returned row indeed is the best match, and everything else comes second: 10.4 228b7e4db59441656abfb194da0e239fd091cfd0 +rank id title body +0.000000003771856604828372 6 MySQL Security When configured properly, MySQL ... +0.000000001885928302414186 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.000000001885928302414186 4 1001 MySQL Tricks 1. Never run mysqld as root. 2. ... +0.000000001885928302414186 5 MySQL vs. YourSQL In the following database comparison ... This is the patch that I applied: diff --git a/mysql-test/suite/innodb_fts/t/limit_union.test b/mysql-test/suite/innodb_fts/t/limit_union.test index 71c9af6929e..f2a26be0936 100644 --- a/mysql-test/suite/innodb_fts/t/limit_union.test +++ b/mysql-test/suite/innodb_fts/t/limit_union.test @@ -29,9 +29,10 @@ SELECT * FROM articles --echo # Without optimization SET @save_dbug = @@debug_dbug; SET debug_dbug = '+d,fts_union_limit_off'; -SELECT * FROM articles +SELECT MATCH (title,body) + AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) rank, articles.* FROM articles WHERE MATCH (title,body) - AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) LIMIT 1; + AGAINST ('MySQL' IN NATURAL LANGUAGE MODE); SET debug_dbug = @save_dbug; --echo # Query involves No Ranking and fts_union operations thiru , can you please analyze this?

            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.