Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the case of multiple data sources, if the same table name exists in different data sources, the loading and overwriting of table names and routing errors may occur #34088

Open
DengQin opened this issue Dec 17, 2024 · 1 comment

Comments

@DengQin
Copy link

DengQin commented Dec 17, 2024

Bug Report

Which version of ShardingSphere did you use?

    version:5.4.1

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

   project:ShardingSphere-JDBC 

Expected behavior

   In the case of multiple data sources, if the same table name exists under different data sources, each other data source can correctly load and route its own table independently

Actual behavior

    In the case of multiple data sources, if the same table name exists in different data sources, the same table name in the data source loaded later overwrites the tables in the previous data source, resulting in routing errors

Reason analyze (If you can)

    The key here causes the later data source table to override the previous existing data source table name。

     I think the key here should be concatenated with the library name to maintain the uniqueness of the same table name in the case of multiple data sources
image
@DengQin
Copy link
Author

DengQin commented Dec 17, 2024

Location: “SingleTableDataNodeLoader” this class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant