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

Name Resolution: Wrong result with grouping select from merged derived table

    XMLWordPrintable

Details

    • Unexpected results
    • Q3/2025 Maintenance, Q3/2026 Server Maintenance

    Description

      With the same select statement, it produces different results with optimizer_switch='derived_merge=ON'; and optimizer_switch='derived_merge=OFF';

      Reproduce test case:
      1. Follow the test_case.rtf attached, create table t1 and insert data into t1; create table t2 and insert data to t2.
      2. Set optimizer_switch='derived_merge=ON'; and run the select statement. It has empty set result.
      3. Set optimizer_switch='derived_merge=OFF'; and run the same select statement. It has result set:

      +--------------------+------------+ 
      | T_FP               | Test_Value | 
      +--------------------+------------+ 
      | 731834939448428685 |         22 | 
      +--------------------+------------+
      

      Thanks,

      KT Chow

      Attachments

        Issue Links

          Activity

            People

              Johnston Rex Johnston
              ktchow_ogcio Chow King Tak
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4d Original Estimate - 4d
                  4d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 4d 4.2h
                  4d 4.2h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.