Here is an example:
mysql> CREATE TABLE TEST
(
→ id
int
→ ) ENGINE=TokuDB;
Query OK, 0 rows affected (0.05 sec)
mysql> show create table TEST;
ERROR 1017 (HY000): Can’t find file: ‘test’ (errno: 2 - No such file or directory)
And I cannot do any actions to this table.
It somehow is looking for lower case db file? I have tried to create table with lower case table name then it works.
InnoDB does not have the issue.
I’m working on a Mac OS, and test on a docker percona server 8.0.21 container.
Any suggestions to fix it? Thanks
Hi @nickzrenI tried to reproduce your issue but without success.
mysql> CREATE TABLE TEST ( id int ) ENGINE=TokuDB;
Query OK, 0 rows affected (0.10 sec)
mysql>
mysql> show create table TEST;
+-------+------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------+
| TEST | CREATE TABLE `TEST` (
`id` int DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql>
mysql>
mysql> CREATE TABLE `TEST2` (
-> `id` int
-> ) ENGINE=TokuDB;
Query OK, 0 rows affected (0.10 sec)
mysql> show create table TEST2;
+-------+-------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------+
| TEST2 | CREATE TABLE `TEST2` (
`id` int DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+-------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
The problem only happened when explicitly create a separate volume for mysql data.
Below are exact steps to reproduce the issue:
mkdir ~/mysql_dir
docker run -d --name ps8 -v ~/mysql_dir:/var/lib/mysql:rw -p 3311:3306 -e MYSQL_ROOT_PASSWORD=root -e INIT_TOKUDB=1 percona/percona-server:8.0.21
mysql -h127.0.0.1 -uroot -proot -P3311 -e "create database testdb"
mysql -h127.0.0.1 -uroot -proot -P3311 -e "use testdb; CREATE TABLE TEST ( id int ) ENGINE=TokuDB;"
mysql -h127.0.0.1 -uroot -proot -P3311 -e "use testdb; show create table TEST"
ERROR 1017 (HY000) at line 1: Can't find file: 'test' (errno: 2 - No such file or directory)