Sybase - Insert into temp table is in inverted order

Description

As per Sybase documentation [1], this is the supported way to create temp tables based on the results of a select:

select type, "Total_amount" = sum(advance)
into #whatspent
from titles
group by type

But Hibernate [2] is generating:
insert into #Vehicle select vehicle0_.id as id from ( select id, vin, owner, 3 as clazz_ from SUV union select id, vin, owner, 4 as clazz_ from Pickup union select id, vin, owner, 1 as clazz_ from Car union select id, vin, owner, 2 as clazz_ from Truck ) vehicle0_

[1] http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug343.htm
[2] BulkManipulationTest#testTempTableGenerationIsolation

Environment

Branch_3_2_4_SP1_CP with Sybase 15

Activity

Show:
Gail Badner
December 20, 2008, 2:48 AM

Juca,

These tests are all succeeding now that tempdb is properly configured to allow DDL in transactions.

Gail

Gail Badner
January 6, 2009, 10:24 AM

Juca, can this be resolved?

Juraci Paixão Kröhling
January 6, 2009, 1:06 PM

I confirmed that all listed test cases are now passing for Sybase. So, I'm closing this issue.

Gail Badner
February 19, 2009, 8:30 PM

Changed resolution to "Rejected" because this was due to a DB config issue, not a Hibernate bug.

Steve Ebersole
March 21, 2011, 7:04 PM

Bulk closing stale resolved issues

Assignee

Gail Badner

Reporter

Juraci Paixão Kröhling

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure