Commit 4cd7424
authored
Ensure passwords can be read from options files (#180)
Fixes #166. Wowza what an issue. After spending way too much time
googling various forms of "can't read password from mariadb options
file", I started poking around the capi.jl file, and reading anything
related to "options". I was trying to see if there was a way to have a
debug print of what options were actually read from an options file.
That's when I found the following in the docs for `mysql_real_connect`,
which I'm now very thankful that past me decided to copy/paste all the
api docs for every single api function.
```
For passwd, specify a value of NULL. (For the password, a value of the empty string in the mysql_real_connect() call cannot be overridden in an option file, because the empty string indicates explicitly that the MySQL account must have an empty password.)
```
So if you want a password to be read from an option file, you need to
pass NULL to the `mysql_real_connect` function; but we were always
passing an empty string! So it prevented reading any password from
option files. Anyway, the fix is just that: by default we'll pass
`nothing` as the password, which will pass NULL to the actual api call,
allowing passwords to be read from option files.1 parent ce1f9fc commit 4cd7424
4 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | | - | |
1133 | | - | |
| 1132 | + | |
| 1133 | + | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments