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

CTE does not work with system versioning fields

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 10.3.5
    • None
    • 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

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.