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

CTE does not work with system versioning fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.3.5
    • Labels:
      None
    • Environment:
      bb-10.3-temporal a3a15126f260e26b715ae9a790135df1822b74d8

      Description

      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
      WITH cte AS ( SELECT sys_trx_start FROM t1 ) SELECT * FROM cte;
       
      # Cleanup
      DROP TABLE t1;
      

      MariaDB [test]> WITH cte AS ( SELECT sys_trx_start FROM t1 ) SELECT * FROM cte;
      ERROR 1096 (HY000): No tables used
      

      I assume it's specific to versioning and not to our implementation of hidden columns, because this works:

      set statement debug_dbug= "+d,test_pseudo_invisible" 
        for create or replace table t1 (a int);
      with cte as ( select invisible from t1 ) select * from cte;
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              midenok Aleksey Midenkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: