[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3685?page=c...
]
Gail Badner commented on HHH-3685:
----------------------------------
A workaround has been added to the mapping file for
org.hibernate.test.sql.hand.custom.sybase.SybaseCustomSQLTest in Branch_3_2_4_SP1_CP,
Branch_3_2, Branch_3_3, and trunk.
The Branch_3_3 version of the mapping file is at
https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3/testsuite/...
. Search for the string "sp_procxmode" to find the workaround.
Sybase - SchemaExport cannot create stored procedures in chained
transaction mode
---------------------------------------------------------------------------------
Key: HHH-3685
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3685
Project: Hibernate Core
Issue Type: Bug
Components: core
Reporter: Gail Badner
In order to create a Sybase stored procedure that can be executed in a transaction (not
autocommit), either:
1) the stored procedure needs to be created in a transaction
or 2) the system stored procedure, sp_procxmode, has to be called (sp_procxmode
<stored-proc-name> 'chained')
SchemaExport executes DDL using autocommit, so Sybase stored procedures created with
SchemaExport cannot be used in a transaction.
It is not possible to run SchemaExport with autocommit=false.
This causes the unit tests for Sybase stored procedures to fail with a message like:
"Stored procedure 'simpleScalar' may be run only in unchained transaction
mode. The 'SET CHAINED OFF' command will cause the current session to use
unchained transaction mode.'
A workaround is to add a <database-object> tag containing the command to change the
stored procedure to chained mode. This tag needs to follow the tag that defines the new
stored procedure.
For example, adding the following after the definition of paramHandling in the mapping
for SybaseCustomSQLTest will change the paramHandling stored procedure so that it can be
used in a transaction.
<database-object>
<create>
sp_procxmode paramHandling, 'chained'
</create>
<drop/>
</database-object>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira