Opened 10 years ago
Closed 10 years ago
#907 closed defect (fixed)
SQLite provider m_nTotalProps is not initialized when select aggregates
Reported by: | christinebao | Owned by: | christine bao |
---|---|---|---|
Priority: | major | Milestone: | 4.1.0 |
Component: | SQLite Provider | Version: | 4.0.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: | DE22147 |
Description
Reported from Autodesk QA.
- In mapguide, load attached sqlite Hawaii_N83_4.sqlite.
- In mapagent, execute Feature->SelectAggregates, Class nam = lulc_n83, Computed Properties = CeilPerim;Ceil(PERIMETER).
- Report error:
An exception occurred in FDO component. Property index '0' is out of bounds. (Cause: , Root Cause: Property index '0' is out of bounds.)
Attachments (1)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
This exception happen in
void SltReader::ValidateIndex(sqlite3_stmt *pStmt, int index) { if (index < 0 || index >= m_nTotalProps) { wchar_t tmp[15]; swprintf(tmp, 15, L"%d", index); throw FdoCommandException::Create((std::wstring(L"Property index \'") + tmp + L"\' is out of bounds.").c_str()); }
m_nTotalProps
is a memory cache to indicate how many columns the table has. It is initialized in each constructor, but forget to initialize in one constructor SltReader::SltReader(SltConnection* connection, FdoIdentifierCollection* props, FdoParameterValueCollection* parmValues, const char* fcname, const char* sql)
in case props->GetCount()
is 0.
by , 10 years ago
Attachment: | Fix907.patch added |
---|
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The sqlite file is 9M, too large to attach.