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

Table name is keyword error #34137

Open
GuiwenChen opened this issue Dec 24, 2024 · 5 comments
Open

Table name is keyword error #34137

GuiwenChen opened this issue Dec 24, 2024 · 5 comments

Comments

@GuiwenChen
Copy link

Bug Report

For English only, other languages will not accept.

When I use ShardingSphere-proxy for data migration, when the table name is a keyword, such as user or unit, when I use the command:

"MIGRATE TABLE ds_0.user INTO user"

The migration task fails to be created with the following error: ERROR 1064 (42000): You have an error in your SQL syntax: no viable alternative at input 'MIGRATE' near '[@0,0:6='MIGRATE',<449>,1:0]' at line 1.

When I changed it to

“MIGRATE TABLE ds_0.user INTO user

The task can be created successfully, but the following error message is displayed in the log:

Can not get meta data for table 'user' when split by range.

This seems to be a bug, can you fix this problem?

@GuiwenChen
Copy link
Author

截屏2024-12-24 16 10 24

@GuiwenChen
Copy link
Author

截屏2024-12-24 16 12 51

@terrymanu
Copy link
Member

What is the version

@GuiwenChen
Copy link
Author

5.5.1

@jasneetsingh6114
Copy link

Hi team,

I noticed the issue regarding migration failure when using reserved keywords like user or unit as table names. This seems to be related to syntax handling and metadata fetching in ShardingSphere-Proxy during migration tasks.

I'd like to contribute by investigating and resolving this issue. Could you please assign it to me? I’ll ensure to follow the contribution guidelines and provide a detailed solution.

Looking forward to your approval!

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

No branches or pull requests

3 participants