Description:
Hi,
I've downloaded mysqlmonitor-2.3.0.2036-windows-installer.exe and installed it.
Then I opened the Dashboard and "played" with it. Settings -> Manage Servers did sounds interesting to me and I went there. Without knowing what its about I pressed the button "create group". A popup window appeared. The popup shows an input form:
Enter name of the group:
[ ]
The input field has pretty much exactly the size of description text above it. It fits 20 characters (is that appropriate for a group name?) before vertical scrolling starts.
I've put in:
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
(260 characters to hit the limit of the often used varchar(255) fields)
When I press the "create" button, I'm getting another popup. It states:
"could not insert: [com.mysql.etools.monitor.pom.hib.HibNamedGroup] org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:100)"
Please make it a nice message explaining what I did wrong.
Then I tried a much longer input value:
No warning appears. When I make my input much, much longer the error message changes it bit but does not get much more useful:
could not insert: [com.mysql.etools.monitor.pom.hib.HibNamedGroup] org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
Please use a speaking error messages.
How to repeat:
Dashboard -> Settings -> Manage Server -> create group -> use invalid group name (too long, much too long)
Suggested fix:
Make the input field (the GUI element) not wider than necessary, let it not accept like 100kb long group names. Bail at the user if he tries to use group names longer than supported and present a user-friendly error message instead of or in addition to some Java errror.