[MXS-4556] Maxscale ignores lower_case_table_names=1 on config file Created: 2023-03-13  Updated: 2023-03-28  Resolved: 2023-03-21

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 6.4.5, 22.08.4, 23.02.0
Fix Version/s: 2.5.25, 6.4.6, 22.08.5, 23.02.2

Type: Bug Priority: Major
Reporter: Pon Suresh Pandian (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

RHEL 7.9+



 Description   

Hi Team,

I enabled lower_case_table_names 1 on maxscale config.. In DB nodes lower_case_table_names is 0..

MariaDB [(none)]> show global variables like 'lower_case_table_names';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_table_names | 0     |
+------------------------+-------+
1 row in set (0.001 sec)

[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
authenticator_options=lower_case_table_names=1

when I try to connect,

[root@centos15 lib]# mysql -u monitor_6 -p'xxx' -h 192.168.xx.xx -P 4006 -D NAGIOS_MONITOR -e "select * from CONFIG;"
ERROR 1049 (42000): Unknown database 'NAGIOS_MONITOR'

If I set lower_case_table_names=2 on maxscale config it's working as expected,

[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
authenticator_options=lower_case_table_names=2

#  mysql -u monitor_6 -p'xxxx' -h 192.168.xx.xx -P 4006 -D NAGIOS_MONITOR -e "select * from CONFIG;"
+------+---------+----------+
| id   | name    | password |
+------+---------+----------+
|    1 | mariadb | mm@123   |
+------+---------+----------+



 Comments   
Comment by Pon Suresh Pandian (Inactive) [ 2023-03-13 ]

Hi Team,

Also when enabling lower_case_table_names 1 on maxscale / db nodes, While connecting db through mariadb-client if you mention database name with -D maxscale ignores and it throws a error " Unknown database".

# mysql -u monitor_6 -p'xxx' -h 192.168.xx.xx -P 4006 -D NAGIOS_MONITOR -e "select * from CONFIG;"
ERROR 1049 (42000): Unknown database 'NAGIOS_MONITOR'

Comment by markus makela [ 2023-03-21 ]

The behavior of lower_case_table_names=1 in MaxScale is now the same as in MariaDB.

Generated at Thu Feb 08 04:29:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.