You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid/incoherent behaviours with the global auth_user option #391
When the global auth_user option was introduced in commit 4ea2306, it seems a lot of cases were not handled properly.
The option works only if it is defined before the databases
If the option is defined twice (for instance if it is defined in the main file and later in an included file), the value used will be the last one preceding the databases definitions, but the value displayed in show config will be the second one
When calling SET auth_user = marcel, the newly-set value is not applied unless you reload and did not define it in your configuration before the databases
If you change the option in the configuration and issue a RELOAD, the value applied will, again, depend on the location in the configuration file : if it is after the databases, a second RELOAD will be required to apply the change.
I suggest completely removing the current application of the config auth_user in parse_database in loader.c, and instead, in each code path that tries to use db->auth_user, add a second if branch to use the cf_auth_user instead. If these changes would be fine for you, I can implement them and submit a PR.
Activity
Fix behavior of global auth_user
Fix behavior of global auth_user