[Maria-developers] Empty directory in mariadb's datadir is not handled correctly
Hi guys, quite tricky problem came up after a directory has been created by something else than mysqld in the datadir. Suppose we use datadir=/var/lib/mysql. When we create any file in that directory by hand (or some program does it, which is not just imagination, it really happens), e.g. /var/lib/mysql/.local, MariaDB (Oracle's MySQL will behave the same probably) server thinks this directory is a database, which is wrong. Then we get some weird messages and outputs: # mysqlshow +--------------------+ | Databases | +--------------------+ | information_schema | | #mysql50#.local | | mysql | | performance_schema | | test | +--------------------+ # mysqlcheck -A mysqlcheck: Got error: 1102: Incorrect database name '#mysql50#.local' when selecting the database I believe this is not how the things should work. I'm not sure, but I'd expect there is still some information about existing databases in the information_schema table. So IMHO the server/tool should always fetch such info in addition to pure testing if the database directory exists. Or is such testing simply impossible? Regards, Honza
On 09/30/2013 10:43 AM, Honza Horak wrote:
Hi guys,
quite tricky problem came up after a directory has been created by something else than mysqld in the datadir.
MariaDB has a --ignore-db-dir option since MariaDB 5.3.9 / 5.5.28, MySQL also has the same option starting with MySQL 5.6.3 but doesn't seem to have backported it to their 5.5 release branch ... -- Hartmut Holzgraefe, Principal Support Engineer (EMEA) SkySQL | http://www.skysql.com/
participants (2)
-
Hartmut Holzgraefe
-
Honza Horak