[MXS-4092] schemarouter: duplicate tables found, if table differs on upper lower case only Created: 2022-04-13  Updated: 2023-10-20  Resolved: 2022-04-24

Status: Closed
Project: MariaDB MaxScale
Component/s: schemarouter
Affects Version/s: 6.2.2, 6.2.3, 6.2.4
Fix Version/s: 2.5.20, 6.3.1

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-17558 Problems with INFORMATION_SCHEMA.TABL... Open
Relates
relates to MDEV-17558 Problems with INFORMATION_SCHEMA.TABL... Open

 Description   

to reproduce:

Maxscale with configured schemarouter.

login into a server belongs to schemarouter:

create table cds;

create table t1 (id int);
create table T1 (id int);

login with maxscale schemarouter;

execute

show shards;

MariaDB [(none)]> show shards;
ERROR 2013 (HY000): Lost connection to MySQL server during query

MAxscale error log:

2022-04-13 06:23:27   error  : (3) [schemarouter] (Scehma-Router-Service); 'cds.T1' found on servers 'server1' and 'server1' for user 'maxuser'@'::ffff:172.26.0.1'.
2022-04-13 06:23:27   error  : (3) [schemarouter] (Scehma-Router-Service); Duplicate tables found, closing sessio

If server support table case-sensitive tablenames, duplicate table check in schemarouter must also be case-sensitive.



 Comments   
Comment by Johan Wikman [ 2022-04-13 ]

Seems this was caused by commit 17094e9b98fd200c6d07a2dc06e23f88627f3896

MariaDB [cds]> select table_name from information_schema.tables where table_name in ("t1","T1");
+------------+
| table_name |
+------------+
| t1         |
| t1         |
| T1         |
+------------+
3 rows in set (0.002 sec)
 
MariaDB [cds]> select distinct table_name from information_schema.tables where table_name in ("t1","T1");
+------------+
| table_name |
+------------+
| t1         |
+------------+
1 row in set (0.002 sec)

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