Commit 25de147
## Summary
As described on #2524, `mysqld` are using the local `/usr` for `basedir`
(e.g. reading `/usr/lib/mysql/plugins` if present), when it should be
using the nix equivalent.
## How was it tested?
Warning: this is untested. I don't know how to recompile flake.nix, so I
cheated and edited the `mysqld` wrapper with `sudo vim $(which mysqld)`.
This patch may be wrong, e.g. I'm not sure if `$out` will be expanded in
those single-quotes.
But if the patch does what I hope, this is the effect it should have:
```
cd /tmp
devbox create mysqltest --template mysql
devbox run mysqld --verbose --help | grep ^basedir
```
With this patch, the command above should print something like:
```
basedir /nix/store/15pzxq00jcraacaxancf3zm6h444azpm-mysql-wrapped/
```
previously it would print:
```
basedir /usr/
```
Also, one can fully launch mysqld, connect with mysql and show the
basedir with:
```sql
mysql> SHOW VARIABLES LIKE '%dir';
+-----------------------------+---------------------------------------------------------------------------------+
| Variable_name | Value |
+-----------------------------+---------------------------------------------------------------------------------+
| basedir | /nix/store/15pzxq00jcraacaxancf3zm6h444azpm-mysql-wrapped/ |
| character_sets_dir | /nix/store/15pzxq00jcraacaxancf3zm6h444azpm-mysql-wrapped/share/mysql/charsets/ |
| datadir | /tmp/mysqltest/.devbox/virtenv/mysql80/data/ |
| innodb_data_home_dir | |
| innodb_doublewrite_dir | |
| innodb_log_group_home_dir | ./ |
| innodb_temp_tablespaces_dir | ./#innodb_temp/ |
| innodb_tmpdir | |
| lc_messages_dir | /nix/store/15pzxq00jcraacaxancf3zm6h444azpm-mysql-wrapped/share/mysql/ |
| plugin_dir | /nix/store/15pzxq00jcraacaxancf3zm6h444azpm-mysql-wrapped/lib/mysql/plugin/ |
| replica_load_tmpdir | /tmp |
| slave_load_tmpdir | /tmp |
| tmpdir | /tmp |
+-----------------------------+---------------------------------------------------------------------------------+
13 rows in set (0.00 sec)
```
The basedir and related paths are now correctly pointing to `/nix/store`
paths, and everything still works!
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com>
Co-authored-by: Artem Klevtsov <a.a.klevtsov@gmail.com>
Co-authored-by: Greg Curtis <greg.curtis@jetify.com>
Co-authored-by: Daniel Loreto <279789+loreto@users.noreply.github.com>
Co-authored-by: Mike Landau <mikeland86@gmail.com>
Co-authored-by: John Lago <750845+Lagoja@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Will Brennan <will@moondev.co.uk>
1 parent 07afb36 commit 25de147
2 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments