Comments - Should MariaDB Docker Containers really be using MacOS setting for lower_case_table_names when hosted in Windows?

1 month, 1 week ago Daniel Black

First, there's no Docker Official Image configuration for lower_case being set:

Settings that are different from default are (which I hope to reduce):

podman run --rm mariadb:lts my_print_defaults --mariadbd --socket=/run/mysqld/mysqld.sock --host-cache-size=0 --skip-name-resolve --pid-file=/run/mysqld/mysqld.pid --basedir=/usr --expire_logs_days=10 --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci

Before we get to lower_case_table_names, you'll notice lower_case_file_system is auto determined.

As lower_case_table names is auto determined from filesystem (if the Linux default 0 is used, but not manually set) you may see a message: Setting "lower_case_table_names=2 because file system for %s is case insensitive"

Because the container (OCI), is always a Linux container its defaults are Linux, even on MacOS (runs in a VM). This leads to an interesting determination path on the the code.

Has this helped? Running screaming? Dived down a different rabbit hole?

 
1 month, 1 week ago Julian Egelstaff

Yes! I think we're heading in the same direction. I posted a followup comment referring to the "lower_case_table_names=2 because file system for %s is case insensitive" issue, but that seems to have been flagged as 'needs_moderation' for some reason.

OK, and perhaps the underlying issue is the lower_case_file_system detection.

But... two issues, possibly unrelated...

1. The single .sql dump file from phpMyAdmin does not work as a seed for mariadb in Docker when lower_case_table_names is set to 2. But if you run manual sql statements one after the other, first the create table statement, and then the alter table statements, everything works regardless of the lower_case_table_names is set to 2. So what's going on there??

2. If mariadb can tell the file system is case insensitive... can't it go the extra mile and detect that the host OS / file system is windows, and then use the preferred Windows setting of 1 instead of 2? Because setting 1 seems to make everything work smoothly and would seem to be the preferred setting in Windows.

Thank you for the quick reply!

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.