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

Unknown column error with UNION and INTERSECT

    Details

      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

            • Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              psergey Sergei Petrunia
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: