-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 startup query SELECT @@socket
should be ignored when connecting to a remote database
#6207
Comments
After investigating deeper I found the query is triggered by mysql_async library: https://github.com/blackbeam/mysql_async/blob/master/src/conn/mod.rs#L681 But I have no idea how to disable the opt, the comment wrote https://github.com/blackbeam/mysql_async/blob/master/src/opts.rs#L372 |
We don't pass every config option to mysql async. I will mark this as a bug for now as we can refactor that part of code. mysql_async is wrapped by quaint: https://github.com/prisma/quaint |
We should also add a e2e test to cover this: prisma/ecosystem-tests#1537 |
This sounds like an issue with mysql-async, do you mind opening an issue there and linking to this issue? If it turns out to be an issue in quaint we can investigate. |
This is fundamentally an issue with Prisma and Quaint. |
Any update here? We have the exactly same problem, is there any workaround?
|
hi friends,I ran into the same problem! |
I ran into the same problem too! |
This problem also bothered me a lot. |
Are you all on Tencent Cloud @wxqqh @charlyzeng @liuwt12138 as well? Next step for us is to get a reproduction via prisma/ecosystem-tests#1537 so we can experience the problem ourselves. Then we can investigate deeper if what @xuqingkuang identified above is really the root cause, and how we can work around that. (If one of you can supply us a (empty!) testing database with this behavior, we would be very happy. You can contact me via jan@prisma.io to send a connection string) |
Thank you for your reply, I had sent the CVM that be able to access the TD-SQL database information with my mail |
Hi, Jan. The server I provided seems you didn't login yet, do you have any progress? |
Sorry, this is not our highest priority right now. But I assigned it explicitly to @pantharshit00 now to take a look at the server you provided (I got the email, thanks!) and have a look what is going on here. |
OK, I hope @pantharshit00 will check the problem as soon as possible because I can't afford the CVM for a long time. :-) |
Thanks for the details @xuqingkuang. I was able to reproduce in that VM. I will also ask people in the team for setting up a tencent cloud account which we can use in end to end tests. |
I am feeling So the problem isn't to use end to end tests to make Prisma working on TD-SQL, but the pass argument issue and the issue is able to be checked by the unit test of generating the URL to |
Here is the piece of code which is handling the parameters: https://github.com/prisma/quaint/blob/336f6d2f524740dd7dce956a37ca859cb10977a6/src/connector/mysql.rs#L155 It doesn't handle Regarding e2e, we have this huge repo which tests every |
I tested the fix in your server and it works well now with A I tested it using yarn resolutions and specifying the exact I am going to close this. Feel free to reset your database as it created the tables when I tested it out: And thank you soooo much for setting this server for us ❤️ |
mysql://user:password@host:port/db?prefer_socket=false is not effective error: Unknown system variable 'socket' is already exists |
Bug description
I have a server that is using the TDSQL for MySQL distribution database provided by Tencent Cloud.
The problem is Prisma Client will get a error when startup:
So I had a check of the Prisma client startup queries, it's executed:
Prisma will always select the
@@socket
variable, it's not necessary for the remote database in my opinion.How to reproduce
Expected behavior
SELECT @@socket
, because TDSQL is not defined.Environment & setup
The text was updated successfully, but these errors were encountered: