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

Unknown column error with UNION and INTERSECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Cannot Reproduce
    • 10.3, 10.4
    • 10.4.32
    • Parser
    • None

    Description

      Reproducible on current 10.3 (323e6cd74ce76c7811835bed640a2934e1d77f1b) but not on 10.4

      create table t10 (a int , b int);
      insert into t10 values (1,1),(1,1);
      create table t11 (a int , b int);
      insert into t11 values (2,2),(2,2);
      create table ten(a int);
      insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
      

      explain 
      select * from ten A, 
       (select * from t10 union select * from t11 intersect 
        select * from t11) T 
      where T.a=A.a;
      

      ERROR 1054 (42S22): Unknown column 'T.a' in 'where clause'
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.