Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using mariadb image, rename Table twice raise error "Tablespace is missing for a table" #9457

Closed
ambrosiora opened this issue Nov 10, 2020 · 3 comments

Comments

@ambrosiora
Copy link

I'm facing a problem when try to rename a table twice. I mean, the first rename works great, but the seccond attempt not.
Using mariadb:latest image when running docker containers on Windows 10 and mapping /var/mysql/lib folder to host.
If I do not map the persist volume, all works great...
If I run the same scenario on linux, all things go well too.

Steps to reproduce the error:

Setup the docker-compose.yml

version: '3'
services:
  database_container:
    container_name: my_db
    image: mariadb:latest
    ports:
      - 3306:3306
    environment:
      MYSQL_DATABASE: mytestdb
      MYSQL_USER: usr_db
      MYSQL_PASSWORD: 123456
      MYSQL_ROOT_PASSWORD: 123456
    volumes:
      - ./db/persist:/var/lib/mysql

Run docker-compose up -d
connect with your favorite client (I'm using DBeaver Enterprise)
Run a create table statement:

CREATE TABLE NewTable (
	ID int primary key,
	name varchar(10)
)

Run a RENAME table statement like this:
RENAME TABLE mytestdb.NewTable TO mytestdb.NewTablea;

Then, run again, another RENAME the statement:
RENAME TABLE mytestdb.NewTablea TO mytestdb.NewTableb;

The error I'm getting is:
SQL Error [1025] [HY000]: (conn=4) Error on rename of './mytestdb/newtablea' to './mytestdb/newtableb' (errno: 194 "Tablespace is missing for a table")

Notes:
1 - When I install the MariaDB client via .msi installer for windows, without using docker all works fine.
2 - I changed the variable lower_case_table_names to 1 because the default with windows is coming 2 for me, but with no success, the error still the same.
3 - Tried to adjust folder permissions on windows, giving all permisions to anyone (like a chmod 777 on linux), but the erros still the same.

So I think that there's some problem with docker for windows + mariadb:latest image

@ambrosiora
Copy link
Author

Hey, please take a look on:
https://jira.mariadb.org/browse/MDEV-24189

we were investigating this issue and I found out that Docker using WSL may be the problem, because the same test case using Docker on Hyper-V worked like a charm.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants