[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4732?page=c...
]
Strong Liu commented on HHH-4732:
---------------------------------
drop table UPerson
23:46:10,426 DEBUG SchemaExport:370 - Unsuccessful: drop table UPerson
23:46:10,427 DEBUG SchemaExport:371 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
3807] [SQLState 42S02] Object 'UPerson' does not exist.
23:46:10,428 DEBUG SchemaExport:385 -
create table UCustomer (
person_id NUMERIC(18,0) not null,
name VARCHAR(80) not null,
sex CHAR(1) not null,
height_centimeters DOUBLE PRECISION not null,
address VARCHAR(255),
zip VARCHAR(255),
country VARCHAR(255),
comments VARCHAR(255),
salesperson NUMERIC(18,0),
primary key (person_id),
unique (name)
)
23:46:10,469 DEBUG SchemaExport:385 -
create table UEmployee (
person_id NUMERIC(18,0) not null,
name VARCHAR(80) not null,
sex CHAR(1) not null,
height_centimeters DOUBLE PRECISION not null,
address VARCHAR(255),
zip VARCHAR(255),
country VARCHAR(255),
"title" VARCHAR(20) not null,
salary NUMERIC(18,1),
pwd_expiry_weeks DOUBLE PRECISION not null,
manager NUMERIC(18,0),
primary key (person_id),
unique (name)
)
23:46:10,511 DEBUG SchemaExport:385 -
create table UPerson (
person_id NUMERIC(18,0) not null,
name VARCHAR(80) not null,
sex CHAR(1) not null,
height_centimeters DOUBLE PRECISION not null,
address VARCHAR(255),
zip VARCHAR(255),
country VARCHAR(255),
primary key (person_id),
unique (name)
)
23:46:10,543 DEBUG SchemaExport:385 -
create index UCustomerAddressIndex on UCustomer (address, zip)
23:46:10,547 ERROR SchemaExport:348 - Unsuccessful: create index UCustomerAddressIndex on
UCustomer (address, zip)
23:46:10,547 ERROR SchemaExport:349 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
3706] [SQLState 42000] Syntax error: Must specify index field(s) for CREATE INDEX.
23:46:10,547 DEBUG SchemaExport:385 -
alter table UCustomer
add constraint FK62B4BF5398311FBC
foreign key (salesperson)
references UEmployee
23:46:10,554 ERROR SchemaExport:348 - Unsuccessful: alter table UCustomer add constraint
FK62B4BF5398311FBC foreign key (salesperson) references UEmployee
23:46:10,554 ERROR SchemaExport:349 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
5303] [SQLState HY000] Error table 'HIBERNATE.UCustomer_0' already exists.
23:46:10,554 DEBUG SchemaExport:385 -
create index UEmployeeAddressIndex on UEmployee (address, zip)
23:46:10,559 ERROR SchemaExport:348 - Unsuccessful: create index UEmployeeAddressIndex on
UEmployee (address, zip)
23:46:10,559 ERROR SchemaExport:349 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
3706] [SQLState 42000] Syntax error: Must specify index field(s) for CREATE INDEX.
23:46:10,559 DEBUG SchemaExport:385 -
alter table UEmployee
add constraint FK85B6262346644408
foreign key (manager)
references UEmployee
23:46:10,564 ERROR SchemaExport:348 - Unsuccessful: alter table UEmployee add constraint
FK85B6262346644408 foreign key (manager) references UEmployee
23:46:10,564 ERROR SchemaExport:349 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
5303] [SQLState HY000] Error table 'HIBERNATE.UEmployee_0' already exists.
23:46:10,564 DEBUG SchemaExport:385 -
create index AddressIndex on UPerson (address, zip)
23:46:10,569 ERROR SchemaExport:348 - Unsuccessful: create index AddressIndex on UPerson
(address, zip)
23:46:10,569 ERROR SchemaExport:349 - [Teradata Database] [TeraJDBC 13.00.00.20] [Error
3706] [SQLState 42000] Syntax error: Must specify index field(s) for CREATE INDEX.
Update Teradata Dialect for Teradata 13.0
-----------------------------------------
Key: HHH-4732
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4732
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.2
Environment: Hibernate 3.3.2/ Teradata JDBC Driver 13.0, Teradata Database 13.0
Reporter: David Repshas
Assignee: Strong Liu
Attachments: teradata.zip, teradataDiff.zip, testsuiteMods.zip
Would like to update Teradata Dialect to work with Teradata Database 13.0.
I've include the following files with changes as noted:
org.hibernate.dialect.dialect.java
- added include of java.sql.statement
- added code to support the removal of temporary
files created when using referential integrity
The three new methods are:
public boolean supportsDropPreProcess()
public String performDropPreProcess(Statement stmt, String dropSql) throws
SQLException
public void performDropPostProcess(Statement stmt, String dropSql) throws
SQLException
==================================
org.hibernate.dialect.TeradataDialect.java
- added new include files
- modified registerFunction calls for "current_time" and
"current_date"
- put registerKeyword list in alphabetical order and added keywords:
column,map,password,summary, type, value and year
- changed "getAddColumnString()" to return "Add"
- added new methods:
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
public String extractConstraintName(SQLException sqlex)
public boolean supportsNotNullUnique()
public boolean supportsExpectedLobUsagePattern()
public boolean supportsUnboundedLobLocatorMaterialization()
public boolean supportsDropPreProcess()
public String performDropPreProcess(Statement stmt, String dropSql) throws
SQLException
public void performDropPostProcess(Statement stmt, String dropSql) throws SQLException
==================================
org.hibernate.tool.hbm2ddl.SchemaExport
- added hooks for new methods:
supportsDropPreProcess,performDropPreProcess and performDropPostProcess
==================================
Also made some changes to some of the files in testsuite:
=============================================
test/hql/astParserLoadingTest.java
- Add instance check of TeradataDialect to get correct behavior
=============================================
test/legacy/foobartest.java
- Add instance check of TeradataDialect to get correct behavior
- modified SQL: Teradata requires "<>" rather than "!="
=============================================
test/typeParameters\typeparametertest.java
-needed to disable these tests as Teradata locking was causing
a deadlock situation when they run
=============================================
--
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