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

Provide an easy way to list table currently in DISCARDED state.

    XMLWordPrintable

Details

    Description

      Right now the best way I could come up with to check whether there might be a DISCARDed table/tablespace on a MariaDB server instance is building upon the fact that discarded tablespaces do not show up in INNODB_SYS_TABLESPACES:

      SELECT T.TABLE_SCHEMA, T.TABLE_NAME
        FROM INFORMATION_SCHEMA.TABLES T
        LEFT OUTER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES I
          ON CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) = I.NAME
       WHERE T.ENGINE='InnoDB'
         AND T.CREATE_OPTIONS NOT LIKE '%partitioned%'
         AND I.FILENAME IS NULL;
      

      This obviously does not work for discarded partitions, and may also otherwise generate false positives.

      A more direct and more reliable method to check for tables with discarded tablespaces would be appreciated.

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              hholzgra Hartmut Holzgraefe
              Votes:
              1 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.