[MDEV-12451] SHOW DATABASES shows #mysql50#.rocksdb Created: 2017-04-05  Updated: 2019-05-29  Resolved: 2017-12-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Affects Version/s: 10.2.5
Fix Version/s: 10.2.12

Type: Bug Priority: Critical
Reporter: Vladislav Vaintroub Assignee: Sergei Petrunia
Resolution: Fixed Votes: 1
Labels: None
Environment:

Windows, x64


Issue Links:
Duplicate
duplicates MDEV-12464 #mysql50#.rocksdb database after enab... Closed
Problem/Incident
causes MDEV-13505 mysql_upgrade failed with rocksdb Closed
Relates
relates to MDEV-14123 .rocksdb folder may break workflow wh... Closed

 Description   

after installing rocksdb with 'install soname 'ha_rocksdb'; and (not sure if relevant ) creating a table, "show databases" shows #mysql50#.rocksdb

MariaDB [test]> show databases;
+--------------------+
| Database           |
+--------------------+
| #mysql50#.rocksdb  |
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+



 Comments   
Comment by Sergei Petrunia [ 2017-04-06 ]

@wlad this may be actually expected.

The testsuite specifies --ignore-db-dirs=.rocksdb option:
https://github.com/MariaDB/server/blob/bb-10.2-mariarocks/storage/rocksdb/mysql-test/rocksdb/suite.opt

I recall discussing it with serg: there is no way a storage engine can tell the SQL layer that "I am creating this directory in the datadir, please ignore it". So --ignore-db-dirs is the only currently available solution.

Comment by Vladislav Vaintroub [ 2017-04-06 ]

I imagine, when rocksdb engine is starting up, it may update ignore-db-dirs list (opt_ignore_db_dirs variable) itself. Function push_ignored_db_dir(char *path) might be useful for that, as there is a hash, and array and what not made of opt_ignore_db_dirs

Comment by KARTHIKEYAN PALANISAMY [ 2017-09-01 ]

How do I drop this database? Please someone tell me.

Comment by Sergei Petrunia [ 2017-09-05 ]

p4karthikeyan, it is not really a database.
The best way to solve this is to add ignore-db-dirs=.rocksdb into your my.cnf file.

If you are certain you do not have any MyRocks tables on your system, there is another way: Go to the data directory and manually delete the .rocksdb subdirectory there.

Comment by KARTHIKEYAN PALANISAMY [ 2017-09-05 ]

Thank you Sergei, I deleted the directories manually.

I thought thats where the data is stored in disk - so if I have RocksDB tables, I cant really delete this directory - Am I correct?

Comment by Elena Stepanova [ 2017-10-22 ]

psergey,

Please find a proper solution before MDEV-9658 happens. It's not just a cosmetic issue, there are some obscure problems with using information_schema due to this garbage; and the workaround is viable for a proof of concept, but not for a stable version, we cannot tell every user to populate the option.

Comment by Nicolas Payart [ 2017-11-29 ]

I encounter the same problem after activating RocksDB. One of the nasty consequence is that a mysqldump --all-databases fails with the message:

mysqldump: Got error: 1102: "Incorrect database name '#mysql50#.rocksdb'" when selecting the database

Comment by Sergei Petrunia [ 2017-12-11 ]

Fixed as part of fix for MDEV-14123. it is #rocksdb now, and it is not shown in SHOW DATABASES.

Comment by Adam Williamson [ 2019-05-29 ]

This is claimed to be 'fixed' but I'm still hitting it with MariaDB 10.3.12:

[root@www duply]# mysqldump -u root --all-databases
...
mysqldump: Got error: 1102: "Incorrect database name '#mysql50#.rocksdb'" when selecting the database

I guess my dir was created while the bad old name was still in use and there is no automatic migration? Is there a manual way I can fix this up? Thanks.

Generated at Thu Feb 08 07:57:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.