Issue 72111 - Crash executing SQL Select Statement
Summary: Crash executing SQL Select Statement
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: PC Windows XP
: P2 Trivial (vote)
Target Milestone: OOo 2.2
Assignee: marc.neumann
QA Contact: issues@dba
Keywords: regression
Depends on:
Reported: 2006-11-29 19:09 UTC by jcdiaz
Modified: 2007-04-23 12:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description jcdiaz 2006-11-29 19:09:21 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.
Comment 1 jcdiaz 2006-11-29 19:12:50 UTC
I forgot to add that the "producto_presentación" sheet does not exist.  It did
but then it was renamed to "product_presentation"
Comment 2 Frank Schönheit 2006-11-30 10:39:28 UTC
confirming, targeting, assigning

That's a regression between 2.0.3 and 2.0.4.
Comment 3 Frank Schönheit 2006-11-30 10:54:45 UTC
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.
Comment 4 ocke.janssen 2006-12-06 08:59:14 UTC
Fixed in cws dba22ui.
Comment 5 Frank Schönheit 2006-12-06 12:42:34 UTC
fs-> msc: please verify in CWS dba22ui
Comment 6 marc.neumann 2006-12-07 11:15:25 UTC
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:
Comment 7 Frank Schönheit 2006-12-11 09:46:39 UTC
targeting to 2.2, since the fix is part of a CWS aiming for this release
Comment 8 drewjensen.inbox 2007-04-23 12:45:54 UTC
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.