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

INFORMATION_SCHEMA.TABLES lists temporary tables, but COLUMNS doesn't list their columns

    XMLWordPrintable

Details

    Description

      Since some more recent version (e.g. 11.2 behaves this way, 10.x didn't yet), MariaDB reports temporary tables in the INFORMATION_SCHEMA.TABLES view, but their columns aren't reported in the INFORMATION_SCHEMA.COLUMNS view:

      create temporary table t (
        c int
      );
       
      select t.table_name, t.table_type, c.column_name
      from information_schema.tables t
      left join information_schema.columns c
        on t.table_schema = c.table_schema
        and t.table_name = c.table_name
      where t.table_name = 't'
      order by c.ordinal_position;
      

      This produces:

      TABLE_NAME TABLE_TYPE COLUMN_NAME
      t TEMPORARY  

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lukas.eder Lukas Eder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.