r-dbi / RMariaDB

An R interface to MariaDB
https://rmariadb.r-dbi.org
Other
130 stars 39 forks source link

fix: `dbConnection(groups = )` works as documented again, regression introduced in RMariaDB 1.3.0 #306

Closed pekkarr closed 1 year ago

pekkarr commented 1 year ago

The MYSQL_READ_DEFAULT_GROUP option should be set only if the groups variable is not null.

Commit 219e5ca027c3970e3811974b7fca69091289ea54 introduced this bug.

krlmlr commented 1 year ago

Thanks, good catch! Is there a way to test this on CI/CD?

krlmlr commented 1 year ago

Thanks!

pekkarr commented 1 year ago

Thanks!

You're welcome.

Is there a way to test this on CI/CD?

I'm not sure. I found the bug because the BioArchLinux build script for RMariaDB uses a my.cnf file with

[client-server]
socket=/path/to/mariadb.sock

to specify the mariadb socket when running RMariaDB tests, but due to the regression RMariaDB didn't use this config (RMariaDB::mariadbDefault() tried to use the system default socket instead of the one in my.cnf).