[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5909) SybaseASE15Dialect getMaxAliasLength() cause SQL exception
Yang Li (JIRA)
noreply at atlassian.com
Tue Jul 26 10:10:16 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43061#comment-43061 ]
Yang Li commented on HHH-5909:
------------------------------
The test case is in the Sybase15.5 ESD#3 isql on Solaris 10 system.
bash-3.00# isql -Udblmodel -Pdblmodel -w300
1> select @@version
2> go
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Adaptive Server Enterprise/15.5/EBF 18376 SMP ESD#3/P/Sun_svr4/OS 5.8/asear155/2531/64-bit/FBO/Fri Jan 14 11:08:31 2011
(1 row affected)
1> create table testtable(name varchar(20), id int)
2> go
1> insert testtable values('myname', 1)
2> go
(1 row affected)
1> select * from testtable
2> go
name id
-------------------- -----------
myname 1
(1 row affected)
1> select name as testnameforhibernatebugHHH5909, id from testtable
2> go
testnameforhibernatebugHHH5909 id
------------------------------ -----------
myname 1
(1 row affected)
1> select name as testnameforhibernatebugHHH5909test, id from testtable
2> go
Msg 103, Level 15, State 205:
Server 'rd118', Line 1:
The identifier that starts with 'testnameforhibernatebugHHH5909' is too long. Maximum length is 30.
1> exit
bash-3.00#
> SybaseASE15Dialect getMaxAliasLength() cause SQL exception
> ----------------------------------------------------------
>
> Key: HHH-5909
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5909
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.6.0, 3.6.1
> Environment: Sybase ASE 15.5 with Sybase JDBC 3 (jconn3.jar)
> Hibernate 3.6.0 final
> JDK 1.6.0_23
> Reporter: Yang Li
> Assignee: Strong Liu
> Priority: Critical
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> After upgrade Hibernate from 3.2.0 to 3.6.0, I got following exception with following SQL (converted from HQL):
> select defaultwdo1_.displayDescriptionTemplate as displayDescriptionTemplate30_1_ from WJob wjob0_, WDocDist defaultwdo1_
> Caused by: com.sybase.jdbc3.jdbc.SybSQLException: The identifier that starts with 'displayDescriptionTemplate30_1' is too long. Maximum length is 30.
> at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
> at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
> at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
> at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
> at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
> at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source)
> at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source)
> at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
> The same SQL can be executed in native Sybase ISQL environment without any error.
> The workaround using Sybase11Dilect or modify getMaxAliasLength() inside SybaseASE15Dialect to return a smaller number(e.g. 20)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list