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

Spider: fall back to usual handler if GROUP BY handler fails to generate query

    XMLWordPrintable

Details

    Description

      Validate (or reparse) an entire query generated by Spider's GROUP BY handler (GBH) and, if the query is invalid, fall back to the usual handler.

      The GBH generates a query for so-called a direct execution from an instance of the Query class. Sadly, It is rare but possible that GBH generates a wrong query (e.g., MDEV-26247) because generating a entire query is a more difficult task than a query involving a single table, which is generated by Spider's usual handler.

      To properly fall back to the usual handler on the GBH failures, we need to move the query generation in spider_group_by_handler::init_scan() into spider_create_group_by_handler(). This is because the server decides whether it uses GBH or not by the return value of spider_create_group_by_handler() and the decision cannot be reversed later.

      The feature could hide query generation bugs of GBH. It is convenient for normal use of Spider but is not good for testing or debugging. Thus, we need to implement a switch to disable the fallback. We disable the fallback by default for community testing.

      TODO: Once the issue is completed, check if the fix for MDEV-25116 can be reverted.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25d
                  0.25d

                  Git Integration

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