Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7043

Correct constant equality expression is used in LEFT JOIN condition by setting the 'const_table' flag together with setting the row as a NULL-row.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.6.47-87.0, 5.7.29-32
    • Fix Version/s: 5.6.49-89.0, 5.7.31-34
    • Component/s: None
    • Labels:
      None

      Description

      Adding a constant equality expression which evaluates to TRUE in a LEFT JOIN's ON condition can lead to bogus results; Will attach outputs and script to reproduce.

      Happens every time with MyISAM; Only sometimes with InnoDB. 

      Flipping all optimizer switches didn't changed anything. 

      Does not happen in 8.0.19

        Attachments

        1. test.myisam.output
          16 kB
          Marcos Albe
        2. test.output
          16 kB
          Marcos Albe
        3. test.sql
          6 kB
          Marcos Albe

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            marcos.albe Marcos Albe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 2 days
                2d

                  Smart Checklist