diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-10 11:12:57 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-10 11:12:57 +0100 |
commit | 5de9d4352d9d6a220bd84c5cd784667d17ab811b (patch) | |
tree | 1fcbbba329282b3a8449fb1cfa39f8768ce7f5c5 /connectivity/source/drivers | |
parent | 221cca20be4a9c79bb4373f632eec833651c0ecf (diff) | |
parent | 783a2bace3caadd1899a6ad247cb5991ab59b835 (diff) |
Automated merge with ssh://hg@hg.services.openoffice.org/cws/dba34c
Diffstat (limited to 'connectivity/source/drivers')
-rwxr-xr-x | connectivity/source/drivers/ado/ado.xcu | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/flat/ETable.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 18 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTerminateListener.cxx | 1 | ||||
-rwxr-xr-x | connectivity/source/drivers/jdbc/jdbc.xcu | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/jdbc/tools.cxx | 1 | ||||
-rwxr-xr-x | connectivity/source/drivers/odbc/odbc.xcu | 5 |
7 files changed, 36 insertions, 1 deletions
diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index e95e1a676c12..58bfcf8975a9 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -117,6 +117,11 @@ <value>true</value> </prop> </node> + <node oor:name="RespectDriverResultSetType" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="MetaData"> <node oor:name="SupportsTableCreation" oor:op="replace"> diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 4dc27265b585..b18c577030b0 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -159,7 +159,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } ++nRowCount; } - while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding)); + while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding) && !m_pFileStream->IsEof()); for (xub_StrLen i = 0; i < nFieldCount; i++) { diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index a0b755c107c9..3760b914cc1d 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/util/XFlushable.hpp> #include "HTerminateListener.hxx" #include "hsqldb/HCatalog.hxx" #include "diagnose_ex.h" @@ -70,6 +71,7 @@ namespace connectivity using namespace ::com::sun::star::embed; using namespace ::com::sun::star::io; using namespace ::com::sun::star::task; + using namespace ::com::sun::star::util; using namespace ::com::sun::star::reflection; namespace hsqldb @@ -616,6 +618,22 @@ namespace connectivity m_bInShutDownConnections = sal_True; } //------------------------------------------------------------------ + void ODriverDelegator::flushConnections() + { + TWeakPairVector::iterator aEnd = m_aConnections.end(); + for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i) + { + try + { + Reference<XFlushable> xCon(i->second.second.first.get(),UNO_QUERY); + xCon->flush(); + } + catch(Exception&) + { + } + } + } + //------------------------------------------------------------------ void SAL_CALL ODriverDelegator::preCommit( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx index c386334acd70..52d53fa99227 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx @@ -51,6 +51,7 @@ throw( RuntimeException ) void SAL_CALL OConnectionController::queryTermination( const EventObject& /*aEvent*/ ) throw( TerminationVetoException, RuntimeException ) { + m_pDriver->flushConnections(); } void SAL_CALL OConnectionController::notifyTermination( const EventObject& /*aEvent*/ ) diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index f4f599a701d9..2afaa54a9e90 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -147,6 +147,11 @@ <value>true</value> </prop> </node> + <node oor:name="RespectDriverResultSetType" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="MetaData"> <node oor:name="SupportsTableCreation" oor:op="replace"> diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 65315774a601..1be627b6d4ac 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -152,6 +152,7 @@ java_util_Properties* connectivity::createStringPropertyArray(const Sequence< Pr && pBegin->Name.compareToAscii( "Authentication" ) && pBegin->Name.compareToAscii( "PreferDosLikeLineEnds" ) && pBegin->Name.compareToAscii( "PrimaryKeySupport" ) + && pBegin->Name.compareToAscii( "RespectDriverResultSetType" ) ) { ::rtl::OUString aStr; diff --git a/connectivity/source/drivers/odbc/odbc.xcu b/connectivity/source/drivers/odbc/odbc.xcu index 74ba8815d021..c0d3939aa0e0 100755 --- a/connectivity/source/drivers/odbc/odbc.xcu +++ b/connectivity/source/drivers/odbc/odbc.xcu @@ -152,6 +152,11 @@ <value>true</value> </prop> </node> + <node oor:name="RespectDriverResultSetType" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="MetaData"> <node oor:name="SupportsTableCreation" oor:op="replace"> |