Kaydet (Commit) cd5b03ec authored tarafından Caolán McNamara's avatar Caolán McNamara

Fix busted multi-repeated column in evolution database view

In the evolution address book where we have real column names of e.g.
first_name, second_name and city. On parsing via
OSQLParseTreeIterator::appendColumns that creates some labels using those real
names but the evo XResultSet gives them proper labels of First Name, Second
Name and City the munge means that here we have e.g. just "City" as a label
because it matches, while the others don't

The symptoms are to load the evolocal.odb and of the 128 columns column 5 is
repeated until 128

This is all a horrible confusing mess. It seems safest to catch the
mismatch of column counts and throw away the partial list and force
a generate of a full list.

Change-Id: I1d6e2a282bdd43acac63c366eb2a9d029aa17878
üst af3662e3
......@@ -937,6 +937,18 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
} while ( false );
bool bMissingSomeColumnLabels = !aNames.empty() && aNames.size() != aSelectColumns->get().size();
SAL_WARN_IF(bMissingSomeColumnLabels, "dbaccess", "We have column labels for *some* columns but not all");
//^^this happens in the evolution address book where we have real column names of e.g.
//first_name, second_name and city. On parsing via
//OSQLParseTreeIterator::appendColumns it creates some labels using those real names
//but the evo address book gives them proper labels of First Name, Second Name and City
//the munge means that here we have e.g. just "City" as a label because it matches
//
//This is all a horrible mess
if (bMissingSomeColumnLabels)
aNames.clear();
if ( aNames.empty() )
m_aCurrentColumns[ SelectColumns ] = OPrivateColumns::createWithIntrinsicNames( aSelectColumns, bCase, *this, m_aMutex );
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment