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

column aliases no longer available in joins

    XMLWordPrintable

Details

    Description

      after upgrading to 10.3.7 from 10.2.something, some select queries that used no work no longer do

      it seems that, in some cases but not always, where a subselect uses aliases for some of its fields and there is a join using those aliases, the alias isn't known and an error 'unknown column xxx in on clause' is thrown

      example: the following could throw an error "column alias1 in on clause unknown" under 10.3.7 but would work under 10.2.xx

      select *
      from A
      join ( select f1 as alias1, f2 as alias2 ) B on A.f1=B.alias1

      whereas this one would work:

      select *
      from A
      join ( select f1, f2 as alias2 ) B on A.f1=B.f1

      more detailed examples here:
      https://stackoverflow.com/questions/50766797/unknown-column-in-on-clause-column-alias-is-probably-causing-error/50816354#50816354

      Attachments

        Issue Links

          Activity

            People

              alice Alice Sherepa
              alebacq antoine
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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