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

The client got the wrong database name #6753

Closed
hellobob opened this issue Sep 21, 2020 · 3 comments · Fixed by #6791
Closed

The client got the wrong database name #6753

hellobob opened this issue Sep 21, 2020 · 3 comments · Fixed by #6791
Milestone

Comments

@hellobob
Copy link

hellobob commented Sep 21, 2020

Please search the existing issues for relevant feature requests, and use the reaction feature to add upvotes to pre-existing requests.

Feature Description

some client like sharding jdbc get the database name from query like select * from tb where 1!=1 to get the table_schema and the dbname.
But vitess return dbname xxx like vt_xxx, the client user the wrong dbname to send query to vitess and get the errs like
keyspace vt_vt_commerce not found in vschema(using select * from vt_commerce.tb )
or
Table 'vt_vt_commerce.tb' doesn't exist(using show full columns from vt_commerce.tb )

use tcpdump get the follows info:
5DD4ECD4-E695-488B-BDCD-5BEA5B99F5C0

21B4F287-4858-472A-A3CE-79EA095065D4

Use Case(s)

Any relevant use-cases that you see.

@harshit-gangal
Copy link
Member

Current workaround would be to provide -init_db_name_override in vttablet command line flag to same as keyspace name.

@harshit-gangal
Copy link
Member

have to tried providing database name in jdbc connection url? Does that work?

@hellobob
Copy link
Author

connection

this does't work . the developer used the java framewrok named shardingjdbc to sharding tables and used vitess to shard db

@askdba askdba added this to the v8.0 milestone Oct 6, 2020
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

Successfully merging a pull request may close this issue.

3 participants