[MDEV-30126] mariadb-install-db fails to install under --old-mode="" causing ("max key length is 2300 bytes") Created: 2022-11-29 Updated: 2023-12-01 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.6.11 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sean Gebbett | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | not-10.3, not-10.4, not-10.5 | ||
| Issue Links: |
|
||||||||
| Description |
|
In the official MariaDB container image, the old_mode variable - when set at the command line - behaves inconsistently with a locally-installed version of MariaDB 10.6.11 on the same machine. In addition, the command-line argument handling is inconsistent for string-valued flags when setting them to the empty string. Environment:
docker run --rm -e=MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.6 --old-mode=""
docker run --rm -e=MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.6 --old-mode ""
Despite the message given, no logs are left in /var/lib/mysql/ inside the container. The behaviour changes when the /var/lib/mysql directory is set as a mount inside the container. The first run fails with the "2300 bytes" error, while the second run with the same volume mounted succeeds. (e.g. docker run --mount=type=volume,source=mariadb-test,destination=/var/lib/mysql --rm -e=MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.6 --old-mode="") |
| Comments |
| Comment by Daniel Black [ 2022-11-30 ] | |||||||||||||||||||||||||
|
Producable without containers:
| |||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-30 ] | |||||||||||||||||||||||||
|
seang Do you want a re-release of MariaDB containers to support the --old-mode=""? It will just be enforcing the default old value on mariadb-install-db. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-30 ] | |||||||||||||||||||||||||
|
So tables that old-mode="" prevent creating:
Server differences detected:
| |||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-30 ] | |||||||||||||||||||||||||
|
https://github.com/MariaDB/mariadb-docker/pull/479 prepared for release if you want it. | |||||||||||||||||||||||||
| Comment by Sean Gebbett [ 2022-11-30 ] | |||||||||||||||||||||||||
|
Hi Daniel - thanks so much for looking at this so quickly! If you could release those changes that'd be wonderful, as this issue is preventing us properly testing a migration to utf8mb4 at the day job. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-30 ] | |||||||||||||||||||||||||
|
Ok, new container has been released:
| |||||||||||||||||||||||||
| Comment by Sean Gebbett [ 2022-12-01 ] | |||||||||||||||||||||||||
|
That's all working perfectly on my end too. Thanks again - I'm happy for this issue to be marked as resolved. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-12-01 ] | |||||||||||||||||||||||||
|
This still needs to be fixed for the non-container case. After which the container work around won't been needed. Thanks for reporting and glad I could get you moving along. |