Kaydet (Commit) 7177eebc authored tarafından Michael Stahl's avatar Michael Stahl

connectivity: fdo#43479: sort order doesn't matter

üst 8f23e981
...@@ -1449,7 +1449,7 @@ sal_Bool OResultSet::OpenImpl() ...@@ -1449,7 +1449,7 @@ sal_Bool OResultSet::OpenImpl()
// order of columns that are not specified in ORDER BY // order of columns that are not specified in ORDER BY
// clause is undefined, so it doesn't hurt to sort on // clause is undefined, so it doesn't hurt to sort on
// these; pad the vectors to include them. // these; pad the vectors to include them.
for (sal_Int32 i = 1; for (sal_Int32 i = 1; // 0: bookmark (see setBoundedColumns)
static_cast<size_t>(i) < m_aColMapping.size(); ++i) static_cast<size_t>(i) < m_aColMapping.size(); ++i)
{ {
if (::std::find(m_aOrderbyColumnNumber.begin(), if (::std::find(m_aOrderbyColumnNumber.begin(),
...@@ -1457,10 +1457,8 @@ sal_Bool OResultSet::OpenImpl() ...@@ -1457,10 +1457,8 @@ sal_Bool OResultSet::OpenImpl()
== m_aOrderbyColumnNumber.end()) == m_aOrderbyColumnNumber.end())
{ {
m_aOrderbyColumnNumber.push_back(i); m_aOrderbyColumnNumber.push_back(i);
m_aOrderbyAscending.push_back( // ASC or DESC doesn't matter
(m_aOrderbyAscending.empty()) m_aOrderbyAscending.push_back(SQL_ASC);
? SQL_ASC // default for no ORDER BY
: m_aOrderbyAscending.back());
} }
} }
bDistinct = sal_True; bDistinct = sal_True;
......
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