Opened 16 years ago

Closed 16 years ago

#367 closed defect (fixed)

Eliminate nested filter SQL statements if nesting is not required

Reported by: thomasknoell Owned by: thomasknoell
Priority: major Milestone:
Component: GenericRdbms API Version: 3.2.0
Severity: 3 Keywords:
Cc: zjames External ID:

Description

For RDBMS systems, the process transferring a filter into a SQL statement creates many nested levels if the filter contains binary logical operations. The nesting is done in any case although not always required. For example, a filter stating id = 1 or id = 2 or id = 3 or id = 4 should not produce the SQL statement ((((id = 1) or (id = 2)) or (id = 3)) or (id = 4)) but rather (id = 1) or (id = 2) or (id = 3) or (id = 4). In some RDBMS systems - like ODBC - nesting may also result in a failure when a command with such a filter is executed due to system limitations (ODBC can only handle up to 26 levels of nesting).

Change History (3)

comment:1 by thomasknoell, 16 years ago

Owner: changed from gregboone to thomasknoell
Status: newassigned

comment:2 by zjames, 16 years ago

Cc: zjames added

comment:3 by thomasknoell, 16 years ago

Resolution: fixed
Status: assignedclosed

The issue has been fixed. The following files were added or modified:

Adding: Providers\GenericRdbms\Src\UnitTest\Common\FdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\Common\FdoFilterTest.h Adding: Providers\GenericRdbms\Src\UnitTest\MySql\MySqlFdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\MySql\MySqlFdoFilterTest.h Adding: Providers\GenericRdbms\Src\UnitTest\SQLServerSpatial\SqlServerFdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\SQLServerSpatial\SqlServerFdoFilterTest.h

Modified: Providers\ArcSDE\Src\Provider\ArcSDEFilterToSql.cpp Modified: Providers\ArcSDE\Src\Provider\ArcSDEFilterToSql.h Modified: Providers\ArcSDE\Src\Provider\ArcSDEUtils.cpp Modified: Providers\GenericRdbms\Src\Fdo\Filter\FdoRdbmsFilterProcessor.cpp Modified: Providers\GenericRdbms\Src\Fdo\Filter\FdoRdbmsFilterProcessor.h Modified: Providers\GenericRdbms\Src\UnitTest\Common\Makefile.am Modified: Providers\GenericRdbms\Src\UnitTest\MySql\Makefile.am Modified: Providers\GenericRdbms\Src\UnitTest\UnitTestMySql.vcproj Modified: Providers\GenericRdbms\Src\UnitTest\UnitTestSQLServerSpatial.vcproj Modified: Providers\GenericRdbms\Src\ODBC\Fdo\FdoRdbmsOdbcFilterProcessor.cpp

Note: See TracTickets for help on using tickets.