0

I have a web application backed by hibernate. For last few days, I have started closely monitoring mysql and found that hibernate is sending unknown queries to the database which infact are not being sent from any part of app.

query looks like

| /* mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) */SHOW VARIABLES WHERE Variable_name ='l |

Manish Mudgal
  • 1,166
  • 1
  • 9
  • 24

1 Answers1

1

This is not related to Hibernate or to the pooling mechanism. This is performed by the driver itself once a connection is made. The driver does that to configure itself. See the code in com.mysql.jdbc.ConnectionImpl.loadServerVariables()

jpkroehling
  • 13,881
  • 1
  • 37
  • 39
  • Thanks but how to avoid this. It has become issue now. – Manish Mudgal Apr 07 '11 at 06:51
  • Well, this could be answered by looking at the documentation. But here it is: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html > "Performance Extensions" > "cacheServerConfiguration". In other words, set the property "cacheServerConfiguration" to true in the JDBC URL. – jpkroehling Apr 07 '11 at 07:15
  • Already having useConfig=maxPerformance. Still done the changes in connecting URL. Lets see how it behaves over the time. Will update . – Manish Mudgal Apr 07 '11 at 11:52