Opened 15 years ago

Closed 15 years ago

#537 closed defect (fixed)

Fix MySQLFdoApplySchemaTest.TestOverride

Reported by: brentrobinson Owned by: brentrobinson
Priority: minor Milestone: 3.5.0
Component: MySQL Provider Version: 3.5.0
Severity: 3 Keywords: MySQLFdoApplySchemaTest.TestOverride unit test
Cc: External ID:

Description

This ticket will fix the MySQL provider in order for the MySQLFdoApplySchemaTest.TestOverride to pass.

Change History (1)

comment:1 by brentrobinson, 15 years ago

Resolution: fixed
Status: newclosed

Revision: 4814 Author: brentrobinson Date: 3:57:46 PM, Thursday, June 25, 2009 Message: ticket#537: Fixed the MySQLFdoApplySchemaTest.TestOverrides test, which was failing with:

RDBMS: Invalid default value for 'featid'

The reason is that if the following is done in MySQL:

create table table1 ( id bigint auto_increment, val nvarchar(10), primary key (id); create view view1 as select * from table1; desc view1;

view1.id will be shown as having a default value of 0.

In the unit test, ovclassh is a view. Similar to the above, MySQL reports ovclassh.featid as having a default value of 0, but the FDO MetaData indicates that it is autoincremented. The unit test the creates an ovclassh1, based on ovclassh. This fails because the provider tries to create an ovclassh1.featid column that is autoincremented and has a default value.

The fix was to ignore default value when reverse-engineering a column into an autoincremented property.


Modified : /trunk/Utilities/SchemaMgr/Src/Sm/Ph/PropertyReader.cpp

Note: See TracTickets for help on using tickets.