1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fix for MDEV-12578: Connector/C doesn't read .my.cnf file in home directory.

After lookup in standard directories C/C now also checks in home directory for
configuration file .my.cnf
This commit is contained in:
Georg Richter
2017-05-07 07:46:43 +02:00
parent 44a740c348
commit 99d054ebad
2 changed files with 21 additions and 5 deletions

View File

@@ -454,10 +454,13 @@ void get_envvars() {
if (!hostname && (envvar= getenv("MYSQL_TEST_HOST")))
hostname= envvar;
if (!username && (envvar= getenv("MYSQL_TEST_USER")))
username= envvar;
else
username= (char *)"root";
if (!username)
{
if ((envvar= getenv("MYSQL_TEST_USER")))
username= envvar;
else
username= (char *)"root";
}
if (!password && (envvar= getenv("MYSQL_TEST_PASSWD")))
password= envvar;
if (!schema && (envvar= getenv("MYSQL_TEST_DB")))