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

ALTER TABLE ... ENGINE=S3 fails if table is outside datadir

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.5
    • 10.6
    • Storage Engine - S3
    • None
    • Ubuntu 20.04

    Description

      Moving a table to S3 using ALTER TABLE fails if the table has a data directory outside the default data directory in *stage 2* with the following message:

      MariaDB [stats]> alter table results_2020 engine=s3;
      ERROR 29 (HY000): File './stats/#sql-alter-5247-80c.MAD' not found (Errcode: 40 "Too many levels of symbolic links")
      

      CREATE TABLE statement was:

      CREATE TABLE `results_2020` (
        `reference_id` int(11) DEFAULT NULL,
        `checkin` longtext DEFAULT NULL,
        `checkout` longtext DEFAULT NULL,
         ...  
         `ts` longtext DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AVG_ROW_LENGTH=8192 DATA DIRECTORY='/mnt/maria_vol01/data/'
      

      This is was happend:

      1. ALTER TABLE started stage 1 and copied the table to Aria MAD file inside the same data dir than the table
      2. In stage 2 the error message appeared immediately, and the temporary MAD file was removed

      The table is around 60GB in size. The default data dir is not big enough to hold this table which why it is configured to sit in a block storage device. However, with this bug, it is not possible to move this table to S3.

      Attachments

        Activity

          People

            monty Michael Widenius
            louis77 Louis Brauer
            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.