Skip to content

Rename Table twice raise error "Tablespace is missing for a table" #331

Closed
@ambrosiora

Description

@ambrosiora

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...

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, 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 - I created the same container with mysql:latest image instead of mariadb and all works fine
4 - 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 windows + mariadb:latest image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions