Prepend IDE version in running queries
In older versions of IDEs I remember that each query was executed with a comment prepended to them that included the IDE name and version, like:
/* DataGrip 2024.1 */ SELECT * FROM users;
But it's not doing this anymore. Is there a way to re-enable this?
Also, out of curiosity, why was it disabled? Was there any issue caused by this?
Thanks!
Please sign in to leave a comment.
Do you recall the version you had installed previously and it was including the comment above in the output upon executing a query?
Here's what you can check:
1. Downgrade to one of the previous JDBC driver version
2. If earlier versions won't change this behavior, you can switch back to the latest driver and add the value in the ApplicationName parameter found in Advanced tab of your data source and repeat the test.
See if it works.
Hi,
Thanks for the reply. Actually, I see that it still adds the application name as comment when running the query.
Running `SHOW FULL PROCESSLIST;` on a MySQL instance will output:
```
/* ApplicationName=DataGrip 2024.1.2 */ SHOW FULL PROCESSLIST
```
But it seems that it doesn't do that on a MariaDB server. Is this something that the server does, or DataGrip's driver?
I was also not able to find the ApplicationName in the Advanced tab:
https://share.zight.com/Z4uNv6zJ
We tested it on the 2 previous major versions using different driver versions and couldn't spot a different behavior with mariadb data sources, so it's still a question whether it was showing the application name in previous versions. We'll have a closer look and get back to you.
Thank you for looking into this!
I am now not 100% sure if it worked in the past with MariaDB or not. I work on multiple projects and keep forgetting which one uses MySQL vs MariaDB. 😄
Anyway, it would be awesome if it can show the application name in MariaDB as well, unless this is a server limitation and it strips the comments.
Got it. Thank you very much for looking into this!