cweijan / vscode-database-client

Database Client For Visual Studio Code
https://database-client.com
MIT License
2.39k stars 264 forks source link

Wrong @@collation_connection #1177

Closed MrkikouLIF closed 2 weeks ago

MrkikouLIF commented 2 weeks ago

On connection to my database, with both the server collation and database collation set to utf8mb4_0900_ai_ci the connection collation is utf8mb4_unicode_ci.

When I create views or procedures, it results in an "illegal mix of collation" error. I need to execute SET @@collation_connection = @@collation_database; before creation to avoid this error.

I think this is a bug because the connection collation should match the server or database collation.

Database type and version:

cweijan commented 2 weeks ago

Thanks for the feedback, I will try to fix this.

cweijan commented 2 weeks ago

This problem is not caused by the client. In version 7.4.9, the startup SQL configuration was added, in which you can configure SET @@collation_connection = @@collation_database;

image