Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.0, 3.0.8
-
None
Description
MariaDB Connector/C allows an application to read a MariaDB configuration file, and it also allows the application to specify the option group within the configuration file. The MYSQL_READ_DEFAULT_FILE and MYSQL_READ_DEFAULT_GROUP options are used for this:
MYSQL_READ_DEFAULT_FILE:
MYSQL_READ_DEFAULT_FILE: Read options from named option or my.cnf. To read from the my.cnf file a NULL pointer has to be passed instead of a file name.
mysql_optionsv(mysql, MYSQL_READ_DEFAULT_FILE, (void *)"./my_conf.cnf");
MariaDB Connector/C will not read the configuration by default. If MYSQL_READ_DEFAULT_FILE is specified the following sections will be always processed:
[client]
[client-server]
[client-mariadb]
MYSQL_READ_DEFAULT_GROUP:
MYSQL_READ_DEFAULT_GROUP: Read options from the named group from my.cnf or the file specified with MYSQL_READ_DEFAULT_FILE.
mysql_optionsv(mysql, MYSQL_READ_DEFAULT_GROUP, (void *)"my_section");
https://mariadb.com/kb/en/library/mysql_optionsv/#options
It might be useful if MariaDB Connector/ODBC allowed users to configure an ODBC data source to read options from a configuration file.
Attachments
Issue Links
- relates to
-
CONC-327 !include/!includedir not parsed in my.cnf
- Closed
-
CONC-395 Dashes and underscores are not interchangeable in options in my.cnf
- Closed
-
CONC-396 !includedir in my.cnf does not include all .cnf and .ini files in the directory
- Open
-
CONC-402 Replace underscores with dashes in conf_key values in mariadb_defaults array
- Closed
-
CONC-404 Add option that corresponds to --defaults-group-suffix MariaDB command-line option
- Open
-
CONC-394 Some TLS-related options are not settable in my.cnf
- Closed
-
CONC-399 Add option that corresponds to --defaults-extra-file MariaDB command-line option
- Open
-
CONC-415 Option prefixes not supported in my.cnf
- Open
-
CONC-416 On Windows, C/C looks for first my.cnf/my.ini in GetSystemDirectory() instead of GetSystemWindowsDirectory()
- Closed