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?




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.


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:

Thanks for clarifying this.

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.

I've just checked with our developers and they've confirmed that we pass the ApplicationName parameter to JDBC drivers of both databases: MySQL and MariaDB. It has always been this way and no changes were made to the code performing this part. However, unlike MySQL, the MariaDB JDBC drivers do not intercept this parameter we are passing due to problematic driver implementation and thus, not being shown in the command output. If downgrading the drivers doesn't resolve this, I am afraid there's nothing much we can do about it.

Got it. Thank you very much for looking into this!


Please sign in to leave a comment.