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

"Unknown column" error when using FULL JOIN with qualified field names

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.10
    • N/A
    • Parser
    • None
    • *nix

    Description

      Running a SELECT query with FULL JOIN fails when some of the field names are qualified with their table names. The same query with a LEFT JOIN executes fine.

      Code to reproduce:

      create table a(aa int);
      create table b(bb int);
      insert into a values (12);
      insert into b values (12);

      /* Returns one row. */
      select a.aa from a left join b on aa = bb;

      /* Fails with "Unknown column 'a.aa' in 'field list'" */
      select a.aa from a full join b on aa = bb;

      /* Returns one row. */
      select aa from a left join b on a.aa = bb;

      /* Fails with "Unknown column 'a.aa' in 'on clause'" */
      select aa from a full join b on a.aa = bb;

      Attachments

        Activity

          People

            serg Sergei Golubchik
            pgacv2 Pedro G. Acevedo
            Votes:
            0 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.