Opened 14 years ago

Closed 14 years ago

#453 closed defect (fixed)

SQLServerSpatial: crash when calculated property uses IsValid.

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone: 3.4.0
Component: FDO API Version: 3.4.0
Severity: 2 Keywords: SQLServerSpatial calculate property IsValid crash
Cc: External ID:

Description

Steps:

  • connect to a SQL Server 2008 datastore via the SQLServerSpatial provider
  • Create an FdoISelect command and set the class to a feature class with geometric property.
  • Add all of the class properties to the select command's property name list.
  • Add a calculated property with expression "IsValid(Geometry) = 0"
  • execute the command

a crash sometimes occurs.

Change History (1)

comment:1 by brentrobinson, 14 years ago

Resolution: fixed
Status: newclosed

Revision: 4368 Author: brentrobinson Date: 6:43:42 AM, Tuesday, February 03, 2009 Message: Ticket#453: fixed a number of problems that got in the way of creating calculated properties with the IsValid() function in their expressions. IsValid() is a function specific to the SQLServerSpatial provider. The fixes were:

Ported part of S021-RD1 from the Oracle provider. This changes FdoRdbmsFeatureReader::mPropertyInfoDefs (reader's property cache) from an array to a vector. Previously, the array was sized to the number of properties in the class being selected from, meaning that the array bounds can be exceeded when calculated properties are added. The vector allows the property cache to grow as needed.

Ported part of g018-PD2 from the Oracle Provider. FdoRdbmsFeatureReader::GetDbAliasName() was modified to compare names when matching a property to a computed identifier. Previously, the property would be matched to the first computed identifier if any existed. This had the side effect of adding RevisionNumber to the mPropertyInfoDefs cache, when a calculated property was specified, even when RevisionNumber did not exist. As a further precaution, modified FdoRdbmsFeatureReader::Property2ColNameChar() to not try to match system properties (such as RevisionNumber) to computed identifiers.

Modified FdoRdbmsFeatureReader::GetDbAliasName() to save the column name, returned by FdoRdbmsSchemaUtil::MakeDBValidName(), in a non-volatile string before continuing processing.


Modified : /trunk/Providers/GenericRdbms/Src/Fdo/FeatureCommands/FdoRdbmsFeatureReader.cpp Modified : /trunk/Providers/GenericRdbms/Src/Fdo/FeatureCommands/FdoRdbmsFeatureReader.h Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/SQLServerSpatial/SqlServerFdoAdvancedSelectTest.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/SQLServerSpatial/SqlServerFdoAdvancedSelectTest.h

Note: See TracTickets for help on using tickets.