me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Mysql 5.5 Show innodb sytax changed #195

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Click "Database" under "System information" on main menu
2. Select "Innodb Status" from Drop down
3.

What is the expected output? 
Expected to see results of mysql innodb status

What do you see instead?
You have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near 'innodb status' at line 1

What version of the product are you using?
javamelody-1.35.0

operating system?
Mysql 5.5

Please provide any additional information below.
MySQL 5.5 removed "show innodb status" command. It is superseded by "SHOW 
ENGINE INNODB STATUS" 

from: http://dev.mysql.com/doc/refman/5.1/en/show-engine.html
"Older (and now deprecated) synonyms are SHOW INNODB STATUS for SHOW ENGINE 
INNODB STATUS and SHOW MUTEX STATUS for SHOW ENGINE INNODB MUTEX. SHOW INNODB 
STATUS and SHOW MUTEX STATUS are removed in MySQL 5.5"

Original issue reported on code.google.com by mayna...@gmail.com on 7 Mar 2012 at 10:46

GoogleCodeExporter commented 9 years ago
Thanks.
I should probably keep the old syntax available below the new one in the list, 
for compatibility with old versions.

Original comment by evernat@free.fr on 7 Mar 2012 at 11:17

GoogleCodeExporter commented 9 years ago
Sure. Ideally javamelody would "discover" the version to determine the correct 
syntax to use. 
I think you would have to execute "select version()" and then could parse the 
major version number (i.e 4 or 5) out of the string coming back and switch the 
sql syntax accordingly.

DatabaseInformations.getDatabaseForConnection(Connection connection) method 
seems like the right place to check

Any thoughts?

Original comment by mayna...@gmail.com on 9 Mar 2012 at 8:52

GoogleCodeExporter commented 9 years ago
It is now fixed in trunk (revision 2614) and ready for the next release (1.36).
Finally, it should be displayed simply as "innodb status" and compatible with 
both mysql 4 and mysql 5 and 5.5.

And I have made a new build from the current trunk and it is available at:
http://javamelody.googlecode.com/files/javamelody-20120311b.jar

Original comment by evernat@free.fr on 11 Mar 2012 at 4:55

GoogleCodeExporter commented 9 years ago
And thanks.

Original comment by evernat@free.fr on 11 Mar 2012 at 6:10