Tag: cws_src680_dba201b User: fs Date: 05/07/11 06:56:45 Modified: /dba/connectivity/source/commontools/ dbtools.cxx /dba/connectivity/source/drivers/ado/ ADatabaseMetaData.cxx, Aolevariant.cxx, Awrapado.cxx /dba/connectivity/source/drivers/hsqldb/ HDriver.cxx, HStorageAccess.cxx, StorageFileAccess.cxx, StorageNativeInputStream.cxx, StorageNativeOutputStream.cxx, accesslog.cxx, accesslog.hxx /dba/connectivity/source/drivers/odbc/ OResultSet.cxx
Log: merging CWS dba201a into dba201b File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbtools.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbtools.cxx?r1=1.55&r2=1.55.54.1 Delta lines: +5 -3 ------------------- --- dbtools.cxx 10 Mar 2005 15:18:36 -0000 1.55 +++ dbtools.cxx 11 Jul 2005 13:56:36 -0000 1.55.54.1 @@ -2,9 +2,9 @@ * * $RCSfile: dbtools.cxx,v $ * - * $Revision: 1.55 $ + * $Revision: 1.55.54.1 $ * - * last change: $Author: vg $ $Date: 2005/03/10 15:18:36 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1450,6 +1450,8 @@ , sal_Bool _bUseSchemaInSelect) { OSL_ENSURE(_rxMetaData.is(), "composeTableName : invalid meta data !"); + if ( !_rxMetaData.is() ) + return; // just to be save here OSL_ENSURE(_rName.getLength(), "composeTableName : at least the name should be non-empty !"); ::std::mem_fun_t<bool,OMetaDataWrapper> aCatalogCall = ::std::mem_fun(&OMetaDataWrapper::supportsCatalogsInDataManipulation); Directory: /dba/connectivity/source/drivers/ado/ ================================================ File [changed]: ADatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/ADatabaseMetaData.cxx?r1=1.16&r2=1.16.54.1 Delta lines: +31 -25 --------------------- --- ADatabaseMetaData.cxx 10 Mar 2005 15:22:20 -0000 1.16 +++ ADatabaseMetaData.cxx 11 Jul 2005 13:56:37 -0000 1.16.54.1 @@ -2,9 +2,9 @@ * * $RCSfile: ADatabaseMetaData.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.16.54.1 $ * - * last change: $Author: vg $ $Date: 2005/03/10 15:22:20 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -164,7 +164,7 @@ m_pADOConnection->OpenSchema(adSchemaCatalogs,vtEmpty,vtEmpty,&pRecordset); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setCatalogsMap(); @@ -187,7 +187,7 @@ m_pADOConnection->OpenSchema(adSchemaSchemata,vtEmpty,vtEmpty,&pRecordset); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setSchemasMap(); @@ -202,7 +202,7 @@ ADORecordset *pRecordset = m_pADOConnection->getColumnPrivileges(catalog,schema,table,columnNamePattern); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setColumnPrivilegesMap(); @@ -217,7 +217,7 @@ ADORecordset *pRecordset = m_pADOConnection->getColumns(catalog,schemaPattern,tableNamePattern,columnNamePattern); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setColumnsMap(); @@ -233,7 +233,7 @@ ADORecordset *pRecordset = m_pADOConnection->getTables(catalog,schemaPattern,tableNamePattern,types); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setTablesMap(); @@ -249,7 +249,7 @@ ADORecordset *pRecordset = m_pADOConnection->getProcedureColumns(catalog,schemaPattern,procedureNamePattern,columnNamePattern); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setProcedureColumnsMap(); @@ -266,7 +266,7 @@ ADORecordset *pRecordset = m_pADOConnection->getProcedures(catalog,schemaPattern,procedureNamePattern); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setProceduresMap(); @@ -278,7 +278,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) { - return new ODatabaseMetaDataResultSet(NULL); + Reference< XResultSet > xRef; + ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); + xRef = pResult; + pResult->setVersionColumnsMap(); + return xRef; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) @@ -348,7 +352,7 @@ ADORecordset *pRecordset = m_pADOConnection->getExportedKeys(catalog,schema,table); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setCrossReferenceMap(); xRef = pResult; @@ -362,7 +366,7 @@ ADORecordset *pRecordset = m_pADOConnection->getImportedKeys(catalog,schema,table); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setCrossReferenceMap(); @@ -377,7 +381,7 @@ ADORecordset *pRecordset = m_pADOConnection->getPrimaryKeys(catalog,schema,table); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setPrimaryKeysMap(); @@ -393,7 +397,7 @@ ADORecordset *pRecordset = m_pADOConnection->getIndexInfo(catalog,schema,table,unique,approximate); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setIndexInfoMap(); @@ -406,17 +410,18 @@ const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) { - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; - ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(NULL); + ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); xRef = pResult; + pResult->setBestRowIdentifierMap(); return xRef; } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException) { - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; if(!ADOS::isJetEngine(m_pConnection->getEngineType())) { // the jet provider doesn't support this method // Create elements used in the array @@ -475,7 +480,7 @@ ADORecordset *pRecordset = m_pADOConnection->getCrossReference(primaryCatalog,primarySchema,primaryTable,foreignCatalog,foreignSchema,foreignTable); ADOS::ThrowException(*m_pADOConnection,*this); - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setCrossReferenceMap(); @@ -696,10 +701,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { // Create elements used in the array - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; - ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(NULL); + ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); xRef = pResult; + pResult->setTableTypes(); return xRef; } // ------------------------------------------------------------------------- @@ -1153,7 +1159,7 @@ // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException) { - Reference< XResultSet > xRef = NULL; + Reference< XResultSet > xRef; ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(NULL); xRef = pResult; File [changed]: Aolevariant.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/Aolevariant.cxx?r1=1.9&r2=1.9.236.1 Delta lines: +4 -4 ------------------- --- Aolevariant.cxx 22 May 2003 10:49:38 -0000 1.9 +++ Aolevariant.cxx 11 Jul 2005 13:56:38 -0000 1.9.236.1 @@ -2,9 +2,9 @@ * * $RCSfile: Aolevariant.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.9.236.1 $ * - * last change: $Author: vg $ $Date: 2003/05/22 10:49:38 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses File [changed]: Awrapado.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/Awrapado.cxx?r1=1.14&r2=1.14.122.1 Delta lines: +40 -27 --------------------- --- Awrapado.cxx 1 Jun 2004 10:06:32 -0000 1.14 +++ Awrapado.cxx 11 Jul 2005 13:56:38 -0000 1.14.122.1 @@ -2,9 +2,9 @@ * * $RCSfile: Awrapado.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.14.122.1 $ * - * last change: $Author: obo $ $Date: 2004/06/01 10:06:32 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,10 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _RTL_USTRBUF_HXX_ +#include <rtl/ustrbuf.hxx> +#endif + namespace connectivity { @@ -2020,40 +2024,49 @@ { // Create elements used in the array HRESULT hr = S_OK; - SAFEARRAYBOUND rgsabound[1]; - SAFEARRAY *psa = NULL; OLEVariant varCriteria[4]; - // Create SafeArray Bounds and initialize the array - rgsabound[0].lLbound = 0; - rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0]; - psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound ); - sal_Int32 nPos=0; - if(catalog.hasValue()) - varCriteria[nPos].setString(::comphelper::getString(catalog)); + ::rtl::OUString sCatalog; + if ( catalog.hasValue() && (catalog >>= sCatalog) ) + varCriteria[nPos].setString(sCatalog); - hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG + ++nPos; if(schemaPattern.getLength() && schemaPattern.toChar() != '%') varCriteria[nPos].setString(schemaPattern); - hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA + ++nPos; if(tableNamePattern.toChar() != '%') varCriteria[nPos].setString(tableNamePattern); - hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME - ::rtl::OUString aTypes,aComma = ::rtl::OUString::createFromAscii(","); - const ::rtl::OUString* pBegin = types.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + types.getLength(); - for(;pBegin != pEnd;++pBegin) - aTypes = aTypes + *pBegin + aComma; - - if(aTypes.getLength()) - varCriteria[nPos].setString(aTypes); - // else - // varCriteria[nPos].setString(::rtl::OUString::createFromAscii("TABLE")); + ++nPos; + ::rtl::OUStringBuffer aTypes; + ::rtl::OUString aComma = ::rtl::OUString::createFromAscii(","); + const ::rtl::OUString* pIter = types.getConstArray(); + const ::rtl::OUString* pEnd = pIter + types.getLength(); + for( ; pIter != pEnd ; ++pIter) + { + if ( aTypes.getLength() ) + aTypes.append(aComma); + aTypes.append(*pIter); + } + + ::rtl::OUString sTypeNames = aTypes.makeStringAndClear(); + if ( sTypeNames.getLength() ) + varCriteria[nPos].setString(sTypeNames); - hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_TYPE + // Create SafeArray Bounds and initialize the array + const sal_Int32 nCrit = sizeof varCriteria / sizeof varCriteria[0]; + SAFEARRAYBOUND rgsabound[1]; + rgsabound[0].lLbound = 0; + rgsabound[0].cElements = nCrit; + SAFEARRAY *psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound ); + + // Set the values for each element of the array + for( long i = 0 ; i < nCrit && SUCCEEDED( hr );i++) + { + hr = SafeArrayPutElement(psa, &i,&varCriteria[i]); + } OLEVariant vtEmpty; vtEmpty.setNoArg(); Directory: /dba/connectivity/source/drivers/hsqldb/ =================================================== File [changed]: HDriver.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HDriver.cxx?r1=1.12&r2=1.12.12.1 Delta lines: +37 -33 --------------------- --- HDriver.cxx 27 Jun 2005 08:24:37 -0000 1.12 +++ HDriver.cxx 11 Jul 2005 13:56:39 -0000 1.12.12.1 @@ -2,9 +2,9 @@ * * $RCSfile: HDriver.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.12.12.1 $ * - * last change: $Author: rt $ $Date: 2005/06/27 08:24:37 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -507,8 +507,9 @@ } if ( bLastOne ) { - Reference<XTransactionListener> xListener(*this,UNO_QUERY); - StorageContainer::revokeStorage(_aIter->second.first,xListener); + // Reference<XTransactionListener> xListener(*this,UNO_QUERY); + // a shutdown should commit all changes to the db files + StorageContainer::revokeStorage(_aIter->second.first,NULL); } if ( !m_bInShutDownConnections ) m_aConnections.erase(_aIter); @@ -570,6 +571,8 @@ Reference< XStorage> xStorage(aEvent.Source,UNO_QUERY); ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage); + if ( sKey.getLength() ) + { TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey) ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >()))); @@ -599,6 +602,7 @@ { OSL_ENSURE( false, "ODriverDelegator::preCommit: caught an exception!" ); } + } } } //------------------------------------------------------------------ File [changed]: HStorageAccess.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HStorageAccess.cxx?r1=1.7&r2=1.7.38.1 Delta lines: +27 -27 --------------------- --- HStorageAccess.cxx 6 Apr 2005 10:35:22 -0000 1.7 +++ HStorageAccess.cxx 11 Jul 2005 13:56:39 -0000 1.7.38.1 @@ -2,9 +2,9 @@ * * $RCSfile: HStorageAccess.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.7.38.1 $ * - * last change: $Author: hr $ $Date: 2005/04/06 10:35:22 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,7 +99,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream (JNIEnv * env, jobject obj_this,jstring name, jstring key, jint mode) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile( env, name, "data" ).logOperation( "openStream" ); LogFile( env, name, "data" ).create(); @@ -117,7 +117,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sName = StorageContainer::jstring2ustring(env,name); @@ -134,7 +134,7 @@ { OSL_ENSURE( false, "NativeStorageAccess::close: caught an exception while flushing!" ); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "close" ); @@ -156,7 +156,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePointer (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "getFilePointer" ); #endif @@ -165,7 +165,7 @@ OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getPosition() : jlong(0); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nReturn ); #endif return nReturn; @@ -180,7 +180,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_length (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "length" ); #endif @@ -189,7 +189,7 @@ OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getLength() :jlong(0); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nReturn ); #endif return nReturn; @@ -226,7 +226,7 @@ if (tmpInt < 0 ) tmpInt = 256 +tmpInt; -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( tmpInt ); #endif @@ -246,7 +246,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv* env, jobject obj_this, jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "read" ); @@ -261,7 +261,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len, DataLogFile* logger ) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sName = StorageContainer::jstring2ustring(env,name); @@ -297,7 +297,7 @@ return -1; env->SetByteArrayRegion(buffer,off,nBytesRead,&aData[0]); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( aData.getConstArray(), nBytesRead ); #endif @@ -318,7 +318,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2_3BII (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "read( byte[], int, int )" ); @@ -339,7 +339,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "readInt" ); #endif @@ -384,7 +384,7 @@ return -1; } jint nRet = ((ch[0] << 24) + (ch[1] << 16) + (ch[2] << 8) + (ch[3] << 0)); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG DataLogFile aDataLog( env, name, "data" ); aDataLog.write( nRet ); @@ -407,7 +407,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek (JNIEnv * env, jobject obj_this,jstring name, jstring key, jlong position) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "seek", position ); #endif @@ -418,7 +418,7 @@ OSL_ENSURE(xSeek.is(),"No Seekable stream!"); if ( xSeek.is() ) { - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG DataLogFile aDataLog( env, name, "data" ); #endif @@ -426,7 +426,7 @@ if ( nLen < position) { static ::sal_Int64 BUFFER_SIZE = 9192; - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.seek( nLen ); #endif xSeek->seek(nLen); @@ -450,7 +450,7 @@ Sequence< ::sal_Int8 > aData(n); memset(aData.getArray(),0,n); xOut->writeBytes(aData); - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.write( aData.getConstArray(), n ); #endif } @@ -458,7 +458,7 @@ xSeek->seek(position); OSL_ENSURE(xSeek->getPosition() == position,"Wrong position after seeking the stream"); - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.seek( position ); OSL_ENSURE( xSeek->getPosition() == aDataLog.tell(), "Wrong position after seeking the stream" ); #endif @@ -477,7 +477,7 @@ if ( xOut.is() ) { jbyte *buf = env->GetByteArrayElements(buffer,NULL); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OSL_ENSURE(len <= env->GetArrayLength(buffer),"Length is greater than the buffer!"); #endif @@ -492,7 +492,7 @@ Sequence< ::sal_Int8 > aData(buf + off,len); xOut->writeBytes(aData); env->ReleaseByteArrayElements(buffer, buf, JNI_ABORT); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( aData.getConstArray(), len ); #endif @@ -522,7 +522,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "write( byte[], int, int )" ); @@ -550,7 +550,7 @@ oneByte[3] = (sal_Int8) ((v >> 0) & 0xFF); xOut->writeBytes(oneByte); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( oneByte.getConstArray(), 4 ); #endif @@ -579,7 +579,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt (JNIEnv * env, jobject obj_this,jstring name, jstring key, jint v) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "writeInt" ); File [changed]: StorageFileAccess.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx?r1=1.5&r2=1.5.38.1 Delta lines: +6 -6 ------------------- --- StorageFileAccess.cxx 6 Apr 2005 10:36:30 -0000 1.5 +++ StorageFileAccess.cxx 11 Jul 2005 13:56:40 -0000 1.5.38.1 @@ -2,9 +2,9 @@ * * $RCSfile: StorageFileAccess.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.5.38.1 $ * - * last change: $Author: hr $ $Date: 2005/04/06 10:36:30 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -145,7 +145,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement (JNIEnv * env, jobject obj_this,jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sName = StorageContainer::jstring2ustring(env,name); @@ -180,7 +180,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement (JNIEnv * env, jobject obj_this,jstring key, jstring oldname, jstring newname) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sNewName = StorageContainer::jstring2ustring(env,newname); @@ -196,7 +196,7 @@ StorageContainer::removeURLPrefix(StorageContainer::jstring2ustring(env,oldname),aStoragePair.first.second), StorageContainer::removeURLPrefix(StorageContainer::jstring2ustring(env,newname),aStoragePair.first.second) ); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sNewName = StorageContainer::removeURLPrefix(StorageContainer::jstring2ustring(env,newname),aStoragePair.first.second); OSL_ENSURE(aStoragePair.first.first->isStreamElement(sNewName),"Stream could not be renamed"); File [changed]: StorageNativeInputStream.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx?r1=1.5&r2=1.5.40.1 Delta lines: +15 -15 --------------------- --- StorageNativeInputStream.cxx 30 Mar 2005 11:52:05 -0000 1.5 +++ StorageNativeInputStream.cxx 11 Jul 2005 13:56:40 -0000 1.5.40.1 @@ -2,9 +2,9 @@ * * $RCSfile: StorageNativeInputStream.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.5.40.1 $ * - * last change: $Author: rt $ $Date: 2005/03/30 11:52:05 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -124,7 +124,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_openStream (JNIEnv * env, jobject obj_this,jstring key, jstring name, jint mode) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile( env, name, "input" ).logOperation( "openStream" ); LogFile( env, name, "input" ).create(); @@ -142,7 +142,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv * env, jobject obj_this,jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "input" ).logOperation( "read()" ); DataLogFile aDataLog( env, name, "input" ); @@ -161,7 +161,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3BII (JNIEnv * env, jobject obj_this,jstring key, jstring name, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "input" ).logOperation( "read( byte[], int, int )" ); DataLogFile aDataLog( env, name, "input" ); @@ -180,7 +180,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_close (JNIEnv * env, jobject obj_this,jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "input" ); aOpLog.logOperation( "close" ); aOpLog.close(); @@ -200,7 +200,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_skip (JNIEnv * env, jobject obj_this,jstring key, jstring name, jlong n) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "input" ).logOperation( "skip()" ); #endif @@ -236,7 +236,7 @@ } while (tmpLongVal > 0); } - catch(Exception& e ) + catch(Exception& ) { } @@ -267,7 +267,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_available (JNIEnv * env, jobject obj_this,jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "input" ); aOpLog.logOperation( "available" ); #endif @@ -280,7 +280,7 @@ try { jint nAvailable = xIn->available(); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nAvailable ); #endif return nAvailable; @@ -309,7 +309,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3B (JNIEnv * env, jobject obj_this,jstring key, jstring name, jbyteArray buffer) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "input" ); aOpLog.logOperation( "read( byte[] )" ); @@ -340,7 +340,7 @@ // must <= len. // if (nBytesRead <= 0) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( (jint)-1 ); #endif return -1; @@ -348,11 +348,11 @@ OSL_ENSURE(nLen >= nBytesRead,"Buffer is too small!"); OSL_ENSURE(aData.getLength() >= nBytesRead,"Buffer is too small!"); env->SetByteArrayRegion(buffer,0,nBytesRead,&aData[0]); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aDataLog.write( &aData[0], nBytesRead ); #endif } -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nBytesRead ); #endif return nBytesRead; File [changed]: StorageNativeOutputStream.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx?r1=1.6&r2=1.6.38.1 Delta lines: +11 -11 --------------------- --- StorageNativeOutputStream.cxx 6 Apr 2005 10:39:36 -0000 1.6 +++ StorageNativeOutputStream.cxx 11 Jul 2005 13:56:41 -0000 1.6.38.1 @@ -2,9 +2,9 @@ * * $RCSfile: StorageNativeOutputStream.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.6.38.1 $ * - * last change: $Author: hr $ $Date: 2005/04/06 10:39:36 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,7 +130,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_openStream (JNIEnv * env, jobject obj_this, jstring name, jstring key, jint mode) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile( env, name, "output" ).logOperation( "openStream" ); LogFile( env, name, "output" ).create(); @@ -146,7 +146,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3BII (JNIEnv * env, jobject obj_this, jstring key, jstring name, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "write( byte[], int, int )" ); DataLogFile aDataLog( env, name, "output" ); @@ -164,7 +164,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3B (JNIEnv * env, jobject obj_this, jstring key, jstring name, jbyteArray buffer) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "write( byte[] )" ); DataLogFile aDataLog( env, name, "output" ); @@ -182,7 +182,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_close (JNIEnv * env, jobject obj_this, jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "output" ); aOpLog.logOperation( "close" ); @@ -199,7 +199,7 @@ catch(Exception&) {} -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aDataLog.close(); aOpLog.close(); #endif @@ -214,7 +214,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2I (JNIEnv * env, jobject obj_this, jstring key, jstring name,jint b) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "write( int )" ); DataLogFile aDataLog( env, name, "output" ); @@ -232,7 +232,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_flush (JNIEnv * env, jobject obj_this, jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "flush" ); ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); @@ -248,7 +248,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_sync (JNIEnv * env, jobject obj_this, jstring key, jstring name) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "sync" ); #endif ::boost::shared_ptr< StreamHelper > pStream = StorageContainer::getRegisteredStream( env, name, key ); File [changed]: accesslog.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/accesslog.cxx?r1=1.2&r2=1.2.42.1 Delta lines: +3 -3 ------------------- --- accesslog.cxx 30 Mar 2005 11:52:27 -0000 1.2 +++ accesslog.cxx 11 Jul 2005 13:56:41 -0000 1.2.42.1 @@ -2,9 +2,9 @@ * * $RCSfile: accesslog.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.42.1 $ * - * last change: $Author: rt $ $Date: 2005/03/30 11:52:27 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,7 +59,7 @@ * ************************************************************************/ -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG #ifndef CONNECTIVITY_HSQLDB_ACCESSLOG_HXX #include "accesslog.hxx" File [changed]: accesslog.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/accesslog.hxx?r1=1.2&r2=1.2.42.1 Delta lines: +3 -3 ------------------- --- accesslog.hxx 30 Mar 2005 11:52:37 -0000 1.2 +++ accesslog.hxx 11 Jul 2005 13:56:41 -0000 1.2.42.1 @@ -2,9 +2,9 @@ * * $RCSfile: accesslog.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.42.1 $ * - * last change: $Author: rt $ $Date: 2005/03/30 11:52:37 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,7 @@ #ifndef CONNECTIVITY_HSQLDB_ACCESSLOG_HXX #define CONNECTIVITY_HSQLDB_ACCESSLOG_HXX -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG #include <stdio.h> #include <jni.h> Directory: /dba/connectivity/source/drivers/odbc/ ================================================= File [changed]: OResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OResultSet.cxx?r1=1.58&r2=1.58.90.1 Delta lines: +14 -11 --------------------- --- OResultSet.cxx 22 Oct 2004 08:44:52 -0000 1.58 +++ OResultSet.cxx 11 Jul 2005 13:56:42 -0000 1.58.90.1 @@ -2,9 +2,9 @@ * * $RCSfile: OResultSet.cxx,v $ * - * $Revision: 1.58 $ + * $Revision: 1.58.90.1 $ * - * last change: $Author: rt $ $Date: 2004/10/22 08:44:52 $ + * last change: $Author: fs $ $Date: 2005/07/11 13:56:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1193,6 +1193,8 @@ { SQLRETURN nReturn = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_FETCH_BOOKMARK_PTR,m_aBookmark.getArray(),SQL_IS_POINTER); // SQL_LEN_BINARY_ATTR(aBookmark.getLength()) + if ( SQL_INVALID_HANDLE != nReturn && SQL_ERROR != nReturn ) + { m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_BOOKMARK,0); OTools::ThrowException(m_pStatement->getOwnConnection(),m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); TBookmarkPosMap::iterator aFind = m_aPosToBookmarks.find(m_aBookmark); @@ -1201,6 +1203,7 @@ else m_nRowPos = -1; return m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; + } } return sal_False; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
