Apache OpenOffice (AOO) Bugzilla – Issue 72111
Crash executing SQL Select Statement
Last modified: 2007-04-23 12:45:54 UTC
When submitting the following SQL statement, the OO process crashes (all windows are closed, even those with other documents): SELECT Aleación, Marca, commonName, ppId, Empaque2, Empaque, Presentación2, Presentación, Producto FROM producto_presentación ORDER BY Producto ASC,Aleación ASC,Presentación ASC; This crash happens when executing the statement using an OOOBase Query window and also when using an XStatement.executeQuery(String) method call. The connection (in both cases) is made to a Calc spreadsheet.
I forgot to add that the "producto_presentación" sheet does not exist. It did but then it was renamed to "product_presentation"
confirming, targeting, assigning That's a regression between 2.0.3 and 2.0.4.
fs->oj: I originally thought this is a file-driver issue, since the crash is in file::OResultSet::OpenImpl. However, further investigations reveal the following: In sqliterator.cxx, there's a function lcl_findTableInMetaData, which tries to find a given table name in the database's meta data. Now unfortunately OCalcDatabaseMetaData::getTables completely *ignores* the tableNamePattern parameter - it always returns all tables. This later on results in the crash. For fixing it, I suggest we fix OCalcDatabaseMetaData::getTables to only return the tables it was asked for.
Fixed in cws dba22ui.
fs-> msc: please verify in CWS dba22ui
verified in CWS dba22ui find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fdba22ui
targeting to 2.2, since the fix is part of a CWS aiming for this release
Test with 2.2.1 Build 1940 Following steps: Created test_data.ods Created test_data.odb ( connected to calc file ) Created simple query Closed test_data.odb Renamed test_data.ods > *.*.bak Open test_data.odb Attempted to run query. No crash, query simply refuses to run. Attempted to edit query. No crash, query simply refuses to open. Renamed Calc file back to original name, while ODB file open. Attempted to run query - ran with no errors.