[MDEV-27418] ALTER TABLE ... ENGINE=S3 fails if table is outside datadir Created: 2022-01-04  Updated: 2022-01-06

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - S3
Affects Version/s: 10.6.5
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Louis Brauer Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None
Environment:

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.


Generated at Thu Feb 08 09:52:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.