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

LP:906357 - Incorrect result with outer join and full text match

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The following test case derived from fulltext.test produces wrong result:

      CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
      INSERT INTO t1 VALUES ('test');

      CREATE TABLE t2(f2 VARCHAR(6) NOT NULL, FULLTEXT KEY(f2), UNIQUE(f2));
      INSERT INTO t2 VALUES ('test');

      – Correct result: the ON predicate is FALSE
      SELECT * FROM t2 LEFT OUTER JOIN t1 ON (f1 = "");
      ----------+

      f2 f1

      ----------+

      test NULL

      ----------+

      SELECT * FROM t1 RIGHT OUTER JOIN t2 ON (f1 = "");
      ----------+

      f1 f2

      ----------+

      NULL test

      ----------+

      – Wrong result: the ON predicate is FALSE as above, but the result is different:
      SELECT * FROM t2 LEFT OUTER JOIN t1 ON (MATCH(f1) against (""));
      ----------+

      f2 f1

      ----------+

      test test

      ----------+

      SELECT * FROM t1 RIGHT OUTER JOIN t2 ON (MATCH(f1) against (""));
      ----------+

      f1 f2

      ----------+

      test test

      ----------+

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            timour Timour Katchaounov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.