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

Investigate later hint resolution

    XMLWordPrintable

Details

    Description

      Investigate resolving hints later to solve chicken/egg problem where hints are needed for derived tables before all VIEWs are opened. The basic premise is that we open VIEWs (which are treated as derived tables) after lexing the parent select. This select and its query blocks are numbered. It may specify hints that have an effect within VIEWs (like [NO_]MERGE) but we won't know until after we open VIEWs. So we need to reconsider derived merge hints again after opening VIEWs. (In effect, we make a decision regarding the hint treatment during parent query lexing, and then have to revisit it upon opening a VIEW, or at the very least defer such decisions until after we open VIEWs).

      From Slack:

      Parsing
        open tables
          LOC1: (somewhere inside we check for OPTIMIZER_SWITCH_DERIVED_MERGE  and hint with the same meainig) (edited) 
            > here we learn that some tables are views and that they have child select #N , #N+1, #N+2 ...
      Name resolution
        somewhere here we check for DERIVED_MERGE again (?)
        Maybe here we could "reconsider" the decision made at LOC1
       
      Defer resolution until
        JOIN object construction ?
        fix_fields for items ?
      

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              Gosselin Dave Gosselin
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.