[MDEV-33120] System log table names are case insensitive with lower-cast-table-names=0 Created: 2023-12-26  Updated: 2024-01-19

Status: Open
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.4, 11.4
Fix Version/s: 10.4, 11.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-31340 Remove MY_COLLATION_HANDLER::strcasec... In Review

 Description   

I run this MTR test on Linux:

--source include/have_lowercase0.inc
--source include/have_case_sensitive_file_system.inc
 
CREATE TABLE mysql.GENERAL_log (a INT);
INSERT INTO mysql.GENERAL_log VALUES (1),(2);
DROP TABLE mysql.GENERAL_log;

It fails on the INSERT statement with the following error:

mysqltest: At line 13: query 'INSERT INTO mysql.GENERAL_log VALUES (1),(2)' failed: ER_CANT_LOCK_LOG_TABLE (1556): You can't use locks with log tables

This is wrong. GENERAL_log is not a log table.

The problem resides in the function get_table_category(), in these line:

    if (lex_string_eq(&GENERAL_LOG_NAME, name))
      return TABLE_CATEGORY_LOG;

This is wrong to compare table names case insensitively in Linux.
Table names should be compared according to --lower-case-table-names.

The same problem is repeatable for "slow_log" and "transaction_registry".


Generated at Thu Feb 08 10:36:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.