Bug #40965 Very long alias name causes a hibernate error.
Submitted: 24 Nov 2008 6:51 Modified: 11 Dec 2008 14:27
Reporter: Meiji KIMURA Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.0.0.7102 OS:Any
Assigned to: Josh Sled CPU Architecture:Any

[24 Nov 2008 6:51] Meiji KIMURA
Description:
MEM 2.0 can define an alias name for SQL statement in QUAN(Query Analyzer) function.

At that time, if I define a very long name for an alias. This error displayed.

An Error Occurred  	close

    * Could not execute JDBC batch update org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)

How to repeat:
Define a very long alias for SQL statement in QUAN.

Suggested fix:
[For developer]
Check the maximum length for hibernate operation.

[Workaround]
Not to use a long name for an alias.
[25 Nov 2008 19:16] Josh Sled
The "limit" here is ≥ 256 characters, fwiw.
[26 Nov 2008 19:38] Josh Sled
revno: 6514
revision-id: jsled@asynchronous.org-20081126193529-2pwrdspy8vnowp89
parent: jsled@asynchronous.org-20081126193226-leudec2mzbctx23o
committer: Josh Sled <jsled@asynchronous.org>
branch nick: 2.0
timestamp: Wed 2008-11-26 14:35:29 -0500
message:
  Bug#40965: check the alias length limit to prevent the DB from complaining.
[5 Dec 2008 17:31] Marcos Palacios
Tested OK with build 2.0.0.7119.

One minor issue is that (having the max length at 255 chars, inclusive - as tested) the error message says:

U0163 The requested alias is too long; aliases must be less than 255 characters.
[11 Dec 2008 14:27] MC Brown
The documentation has been updated to indicate the character limit for aliases.