[MDEV-11151] Using unique option prefix 'ignore_db_dir' is error-prone Created: 2016-10-26  Updated: 2018-05-23

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.1.17, 10.3.6
Fix Version/s: 10.1

Type: Bug Priority: Minor
Reporter: Chunli Yao Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Red Hat Linux 6.8



 Description   

see the following message in mysqld.log file:

2016-06-30 17:41:37 140391378425696 [Note] Using unique option prefix 'ignore_db_dir' is error-prone and can break in the future. Please use the full name 'ignore_db_dirs' instead.

when replaced 'ignore_dir_db' in my my.cnf file and restart the DB, the warning message went away. But according to the documentation:

--ignore-db-dir
Commandline: --ignore-db-dir=name
Description: Tells the server that this directory can never be a database. That means two things - firstly it is ignored by the SHOW DATABASES command and INFORMATION_SCHEMA tables. And secondly, USE, CREATE DATABASE and SELECT statements will return an error if the database from the ignored list specified. Use this option several times if you need to ignore more than one directory. To make the list empty set the void value to the option as --ignore-db-dir=. Corresponding read-only variable ignore_db_dirs shows the current list.
Introduced: MariaDB 5.3.9

ignore_db_dirs
Description: Comma-delimited list of directories in the data directory that are not considered as database directories. Set from --ignore-db-dir at startup.
Scope: Global
Dynamic: No
Data Type: string
Introduced: MariaDB 5.5

So am I supposed to replace 'ignore_db_dir' with 'ignore_db_dirs' or should I just ignore the warning in the mysqld.log file?

Thanks,
Chunli



 Comments   
Comment by Elena Stepanova [ 2016-11-02 ]

Thanks for the report.
It seems to be a bug. You can ignore the warning for now.
If you need to ignore more than one directory, you should not replace multiple instances of --innodb-db-dir with one comma-separated list --innodb_db_dirs, it's not the same and won't work. If you only need to ignore one directory, using --ignore_db_dirs might also be fine.

Comment by Zdravelina Sokolovska (Inactive) [ 2018-05-21 ]

with multiple instances

server cfg 
 
[mysqld]
 
ignore-db-dir=test12345
ignore-db-dir=test123

 service mysql restart
Restarting mysql (via systemctl):  Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
                                                           [FAILED]
 
 
]# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.6 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Mon 2018-05-21 18:11:34 EEST; 7s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 24762 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 25029 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 24930 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 24927 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 25029 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
 
May 21 18:10:58 t4w5.xentio.lan systemd[1]: Starting MariaDB 10.3.6 database server...
May 21 18:11:00 t4w5.xentio.lan sh[24930]: WSREP: Recovered position 3c15149f-5766-11e8-9a99-22bc53d40581:26942
May 21 18:11:00 t4w5.xentio.lan mysqld[25029]: 2018-05-21 18:11:00 0 [Note] Using unique option prefix 'ignore-db-dir' is error-prone and can brea...instead.
May 21 18:11:00 t4w5.xentio.lan mysqld[25029]: 2018-05-21 18:11:00 0 [Note] Using unique option prefix 'ignore-db-dir' is error-prone and can brea...instead.
May 21 18:11:00 t4w5.xentio.lan mysqld[25029]: 2018-05-21 18:11:00 0 [Note] /usr/sbin/mysqld (mysqld 10.3.6-MariaDB) starting as process 25029 ...
May 21 18:11:34 t4w5.xentio.lan systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
May 21 18:11:34 t4w5.xentio.lan systemd[1]: Failed to start MariaDB 10.3.6 database server.
May 21 18:11:34 t4w5.xentio.lan systemd[1]: Unit mariadb.service entered failed state.
May 21 18:11:34 t4w5.xentio.lan systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

systemd log

May 21 18:03:59 t4w5 systemd: Stopping MariaDB 10.3.6 database server...
May 21 18:04:00 t4w5 systemd: Starting MariaDB 10.3.6 database server...
May 21 18:04:02 t4w5 sh: WSREP: Recovered position 3c15149f-5766-11e8-9a99-22bc53d40581:26942
May 21 18:04:03 t4w5 mysqld: 2018-05-21 18:04:03 0 [Note] Using unique option prefix 'ignore-db-dir' is error-prone and can break in the future. Please use the full name 'ignore_db_dirs' instead.
May 21 18:04:03 t4w5 mysqld: 2018-05-21 18:04:03 0 [Note] /usr/sbin/mysqld (mysqld 10.3.6-MariaDB) starting as process 24886 ...
May 21 18:04:37 t4w5 systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
May 21 18:04:37 t4w5 systemd: Failed to start MariaDB 10.3.6 database server.
May 21 18:04:37 t4w5 systemd: Unit mariadb.service entered failed state.
May 21 18:04:37 t4w5 systemd: mariadb.service failed.
May 21 18:10:01 t4w5 systemd: Started Session 2064 of user root.
May 21 18:10:01 t4w5 systemd: Starting Session 2064 of user root.
May 21 18:10:58 t4w5 systemd: Starting MariaDB 10.3.6 database server...
May 21 18:11:00 t4w5 sh: WSREP: Recovered position 3c15149f-5766-11e8-9a99-22bc53d40581:26942
May 21 18:11:00 t4w5 mysqld: 2018-05-21 18:11:00 0 [Note] Using unique option prefix 'ignore-db-dir' is error-prone and can break in the future. Please use the full name 'ignore_db_dirs' instead.
May 21 18:11:00 t4w5 mysqld: 2018-05-21 18:11:00 0 [Note] Using unique option prefix 'ignore-db-dir' is error-prone and can break in the future. Please use the full name 'ignore_db_dirs' instead.
May 21 18:11:00 t4w5 mysqld: 2018-05-21 18:11:00 0 [Note] /usr/sbin/mysqld (mysqld 10.3.6-MariaDB) starting as process 25029 ...
May 21 18:11:34 t4w5 systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
May 21 18:11:34 t4w5 systemd: Failed to start MariaDB 10.3.6 database server.
May 21 18:11:34 t4w5 systemd: Unit mariadb.service entered failed state.
May 21 18:11:34 t4w5 systemd: mariadb.service failed.

but bootstrapping

# gaelera_new_cluster

 
MariaDB [(none)]> show variables like 'ignore_db_dir' ;
Empty set (0.001 sec)
 
MariaDB [(none)]>
MariaDB [(none)]> show variables like 'ignore_db_dirs' ;
+----------------+-------------------+
| Variable_name  | Value             |
+----------------+-------------------+
| ignore_db_dirs | test12345,test123 |
+----------------+-------------------+
 

server cfg 
 
[mysqld]
 
ignore-db-dir=test12345
ignore-db-dir=test123

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