Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.13, 11.4.7, 11.8.2, 12.0.2
-
None
-
None
-
MacOS or Windows with lower_case_table_names=2
Description
When using lower_case_table_names=2 and a mixed-case schema name, WHERE clauses on information_schema.routines.routine_schema no longer perform case-insensitive matching properly.
This previously worked, e.g. here's the behavior in MariaDB 11.7.2 and all pre-May releases of MariaDB (and all versions of MySQL):
MariaDB [(none)]> CREATE DATABASE FooBar;
|
Query OK, 1 row affected (0.029 sec)
|
|
MariaDB [(none)]> CREATE PROCEDURE FooBar.testing() SELECT 1;
|
Query OK, 0 rows affected (0.046 sec)
|
|
MariaDB [(none)]> SELECT routine_schema, routine_type, routine_name FROM information_schema.routines WHERE routine_schema = 'FooBar';
|
+----------------+--------------+--------------+
|
| routine_schema | routine_type | routine_name |
|
+----------------+--------------+--------------+
|
| foobar | PROCEDURE | testing |
|
+----------------+--------------+--------------+
|
1 row in set (0.002 sec)
|
In comparison, here's MariaDB 11.8, note that the same query returns no rows:
MariaDB [(none)]> CREATE DATABASE FooBar;
|
Query OK, 1 row affected (0.021 sec)
|
|
MariaDB [(none)]> CREATE PROCEDURE FooBar.testing() SELECT 1;
|
Query OK, 0 rows affected (0.045 sec)
|
|
MariaDB [(none)]> SELECT routine_schema, routine_type, routine_name FROM information_schema.routines WHERE routine_schema = 'FooBar';
|
Empty set (0.002 sec)
|
As a workaround, applying a case-insensitive COLLATE clause fixes the query, but I don't think that should normally be necessary here.
As far as I can see, this only seems to affect routines. The behavior of tables, views, triggers, and events are unchanged, in terms of information_schema WHERE clauses on a mixed-case schema name.
This might also affect `mysqldump` and other tools, but I haven't tested.
I'm 99% sure this is some unexpected side-effect of MDEV-14432, as the impacted versions seem to line up with May 2025 releases, and I don't see any other recent lower_case_table_name=2 changes. But after staring at sql_show.cc and https://github.com/MariaDB/server/commit/ddd5ba3 the exact cause isn't clear to me.
Attachments
Issue Links
- is caused by
-
MDEV-14432 mysqldump does not preserve case of table names in generated sql
-
- Closed
-