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

Two STRAIGHT_JOIN queries produces inconsistent results when comparing text values

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.6.2, 11.7.2, 11.8
    • 11.8, 12.0(EOL)
    • Optimizer
    • docker

    Description

      CREATE TABLE t0(c1 TEXT);
      CREATE TABLE t1 LIKE t0;
      CREATE INDEX i1 ON t1(c1(1)) VISIBLE;
      INSERT INTO t0(c1) VALUES('29'), ('30');
      INSERT INTO t1(c1) VALUES("⅗");
       
      SELECT t0.c1 AS t0c1, t1.c1 AS t1c1 FROM t1 STRAIGHT_JOIN t0 ON t1.c1 < t0.c1;
      +------+------+
      | t0c1 | t1c1 |
      +------+------+
      | 30   | ⅗    |
      +------+------+
      1 row in set (0.00 sec)
      SELECT t0.c1 AS t0c1, t1.c1 AS t1c1 FROM t0 STRAIGHT_JOIN t1 ON t1.c1 < t0.c1;
      Empty set (0.00 sec)
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            jinhui lai jinhui lai
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.