[Libreoffice-commits] core.git: 2 commits - connectivity/Library_firebird_sdbc.mk connectivity/source
Andrzej J.R. Hunt
andrzej at ahunt.org
Fri Jul 19 00:40:42 PDT 2013
connectivity/Library_firebird_sdbc.mk | 1
connectivity/source/drivers/firebird/FConnection.hxx | 4
connectivity/source/drivers/firebird/FPreparedStatement.cxx | 58 +--
connectivity/source/drivers/firebird/FResultSet.cxx | 135 ++++----
connectivity/source/drivers/firebird/FResultSet.hxx | 7
connectivity/source/drivers/firebird/FStatement.cxx | 24 -
connectivity/source/drivers/firebird/FStatement.hxx | 4
connectivity/source/drivers/firebird/propertyids.cxx | 185 ------------
connectivity/source/drivers/firebird/propertyids.hxx | 163 ----------
9 files changed, 121 insertions(+), 460 deletions(-)
New commits:
commit d739440d434e3c2caf02a241d9cde2610d5df1b4
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Fri Jul 19 09:21:43 2013 +0200
Remove duplicate propertyids.[hc]xx.
Change-Id: I488cea6e34180d46fecfc169e4368159c67bb0d4
diff --git a/connectivity/Library_firebird_sdbc.mk b/connectivity/Library_firebird_sdbc.mk
index bada0a8..0c364c5 100644
--- a/connectivity/Library_firebird_sdbc.mk
+++ b/connectivity/Library_firebird_sdbc.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Library_use_libraries,firebird_sdbc, \
$(eval $(call gb_Library_set_componentfile,firebird_sdbc,connectivity/source/drivers/firebird/firebird_sdbc))
$(eval $(call gb_Library_add_exception_objects,firebird_sdbc,\
- connectivity/source/drivers/firebird/propertyids \
connectivity/source/drivers/firebird/FConnection \
connectivity/source/drivers/firebird/FDatabaseMetaData \
connectivity/source/drivers/firebird/FDriver \
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 726d8cbcd..d587c85 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -35,7 +35,8 @@
#include "FResultSet.hxx"
#include "FResultSetMetaData.hxx"
-#include "propertyids.hxx"
+#include <propertyids.hxx>
+#include <TConnection.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 5201d54..eeb0df0 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -33,10 +33,11 @@
*
*************************************************************************/
-#include "propertyids.hxx"
#include "FStatement.hxx"
#include "FConnection.hxx"
#include "FResultSet.hxx"
+#include <propertyids.hxx>
+#include <TConnection.hxx>
#include <ibase.h>
diff --git a/connectivity/source/drivers/firebird/propertyids.cxx b/connectivity/source/drivers/firebird/propertyids.cxx
deleted file mode 100644
index a20aa45..0000000
--- a/connectivity/source/drivers/firebird/propertyids.cxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <osl/diagnose.h>
-#include "propertyids.hxx"
-namespace connectivity
-{
-namespace firebird
-{
- const sal_Char* getPROPERTY_QUERYTIMEOUT() { return "QueryTimeOut"; }
- const sal_Char* getPROPERTY_MAXFIELDSIZE() { return "MaxFieldSize"; }
- const sal_Char* getPROPERTY_MAXROWS() { return "MaxRows"; }
- const sal_Char* getPROPERTY_CURSORNAME() { return "CursorName"; }
- const sal_Char* getPROPERTY_RESULTSETCONCURRENCY() { return "ResultSetConcurrency"; }
- const sal_Char* getPROPERTY_RESULTSETTYPE() { return "ResultSetType"; }
- const sal_Char* getPROPERTY_FETCHDIRECTION() { return "FetchDirection"; }
- const sal_Char* getPROPERTY_FETCHSIZE() { return "FetchSize"; }
- const sal_Char* getPROPERTY_ESCAPEPROCESSING() { return "EscapeProcessing"; }
- const sal_Char* getPROPERTY_USEBOOKMARKS() { return "UseBookmarks"; }
-
- const sal_Char* getPROPERTY_NAME() { return "Name"; }
- const sal_Char* getPROPERTY_TYPE() { return "Type"; }
- const sal_Char* getPROPERTY_TYPENAME() { return "TypeName"; }
- const sal_Char* getPROPERTY_PRECISION() { return "Precision"; }
- const sal_Char* getPROPERTY_SCALE() { return "Scale"; }
- const sal_Char* getPROPERTY_ISNULLABLE() { return "IsNullable"; }
- const sal_Char* getPROPERTY_ISAUTOINCREMENT() { return "IsAutoIncrement"; }
- const sal_Char* getPROPERTY_ISROWVERSION() { return "IsRowVersion"; }
- const sal_Char* getPROPERTY_DESCRIPTION() { return "Description"; }
- const sal_Char* getPROPERTY_DEFAULTVALUE() { return "DefaultValue"; }
-
- const sal_Char* getPROPERTY_REFERENCEDTABLE() { return "ReferencedTable"; }
- const sal_Char* getPROPERTY_UPDATERULE() { return "UpdateRule"; }
- const sal_Char* getPROPERTY_DELETERULE() { return "DeleteRule"; }
- const sal_Char* getPROPERTY_CATALOG() { return "Catalog"; }
- const sal_Char* getPROPERTY_ISUNIQUE() { return "IsUnique"; }
- const sal_Char* getPROPERTY_ISPRIMARYKEYINDEX() { return "IsPrimaryKeyIndex"; }
- const sal_Char* getPROPERTY_ISCLUSTERED() { return "IsClustered"; }
- const sal_Char* getPROPERTY_ISASCENDING() { return "IsAscending"; }
- const sal_Char* getPROPERTY_SCHEMANAME() { return "SchemaName"; }
- const sal_Char* getPROPERTY_CATALOGNAME() { return "CatalogName"; }
- const sal_Char* getPROPERTY_COMMAND() { return "Command"; }
- const sal_Char* getPROPERTY_CHECKOPTION() { return "CheckOption"; }
- const sal_Char* getPROPERTY_PASSWORD() { return "Password"; }
- const sal_Char* getPROPERTY_RELATEDCOLUMN() { return "RelatedColumn"; }
-
- const sal_Char* getSTAT_INVALID_INDEX() { return "Invalid descriptor index"; }
-
- const sal_Char* getPROPERTY_FUNCTION() { return "Function"; }
- const sal_Char* getPROPERTY_TABLENAME() { return "TableName"; }
- const sal_Char* getPROPERTY_REALNAME() { return "RealName"; }
- const sal_Char* getPROPERTY_DBASEPRECISIONCHANGED() { return "DbasePrecisionChanged"; }
- const sal_Char* getPROPERTY_ISCURRENCY() { return "IsCurrency"; }
- const sal_Char* getPROPERTY_ISBOOKMARKABLE() { return "IsBookmarkable"; }
-
- const sal_Char* getPROPERTY_FORMATKEY() { return "FormatKey"; }
- const sal_Char* getPROPERTY_LOCALE() { return "Locale"; }
-
- const sal_Char* getPROPERTY_AUTOINCREMENTCREATION() { return "AutoIncrementCreation"; }
- const sal_Char* getPROPERTY_PRIVILEGES() { return "Privileges"; }
- //============================================================
- //= error messages
- //============================================================
- const sal_Char* getERRORMSG_SEQUENCE() { return "Function sequence error"; }
- const sal_Char* getSQLSTATE_SEQUENCE() { return "HY010"; }
- const sal_Char* getSQLSTATE_GENERAL() { return "HY0000"; }
- const sal_Char* getSTR_DELIMITER() { return "/"; }
-
- OPropertyMap::~OPropertyMap()
- {
- ::std::map<sal_Int32 , rtl_uString*>::iterator aIter = m_aPropertyMap.begin();
- for(;aIter != m_aPropertyMap.end();++aIter)
- if(aIter->second)
- rtl_uString_release(aIter->second);
- }
- // ------------------------------------------------------------------------------
- ::rtl::OUString OPropertyMap::getNameByIndex(sal_Int32 _nIndex) const
- {
- ::rtl::OUString sRet;
- ::std::map<sal_Int32 , rtl_uString*>::const_iterator aIter = m_aPropertyMap.find(_nIndex);
- if(aIter == m_aPropertyMap.end())
- sRet = const_cast<OPropertyMap*>(this)->fillValue(_nIndex);
- else
- sRet = aIter->second;
- return sRet;
- }
- // ------------------------------------------------------------------------------
- ::rtl::OUString OPropertyMap::fillValue(sal_Int32 _nIndex)
- {
- rtl_uString* pStr = NULL;
- switch(_nIndex)
- {
- case PROPERTY_ID_QUERYTIMEOUT: { rtl_uString_newFromAscii(&pStr,getPROPERTY_QUERYTIMEOUT() ); break; }
- case PROPERTY_ID_MAXFIELDSIZE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_MAXFIELDSIZE() ); break; }
- case PROPERTY_ID_MAXROWS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_MAXROWS() ); break; }
- case PROPERTY_ID_CURSORNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CURSORNAME() ); break; }
- case PROPERTY_ID_RESULTSETCONCURRENCY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RESULTSETCONCURRENCY() ); break; }
- case PROPERTY_ID_RESULTSETTYPE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RESULTSETTYPE() ); break; }
- case PROPERTY_ID_FETCHDIRECTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FETCHDIRECTION() ); break; }
- case PROPERTY_ID_FETCHSIZE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FETCHSIZE() ); break; }
- case PROPERTY_ID_ESCAPEPROCESSING: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ESCAPEPROCESSING() ); break; }
- case PROPERTY_ID_USEBOOKMARKS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_USEBOOKMARKS() ); break; }
- // Column
- case PROPERTY_ID_NAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_NAME() ); break; }
- case PROPERTY_ID_TYPE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TYPE() ); break; }
- case PROPERTY_ID_TYPENAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TYPENAME() ); break; }
- case PROPERTY_ID_PRECISION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PRECISION() ); break; }
- case PROPERTY_ID_SCALE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_SCALE() ); break; }
- case PROPERTY_ID_ISNULLABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISNULLABLE() ); break; }
- case PROPERTY_ID_ISAUTOINCREMENT: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISAUTOINCREMENT() ); break; }
- case PROPERTY_ID_ISROWVERSION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISROWVERSION() ); break; }
- case PROPERTY_ID_DESCRIPTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DESCRIPTION() ); break; }
- case PROPERTY_ID_DEFAULTVALUE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DEFAULTVALUE() ); break; }
-
- case PROPERTY_ID_REFERENCEDTABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_REFERENCEDTABLE() ); break; }
- case PROPERTY_ID_UPDATERULE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_UPDATERULE() ); break; }
- case PROPERTY_ID_DELETERULE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DELETERULE() ); break; }
- case PROPERTY_ID_CATALOG: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CATALOG() ); break; }
- case PROPERTY_ID_ISUNIQUE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISUNIQUE() ); break; }
- case PROPERTY_ID_ISPRIMARYKEYINDEX: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISPRIMARYKEYINDEX() ); break; }
- case PROPERTY_ID_ISCLUSTERED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISCLUSTERED() ); break; }
- case PROPERTY_ID_ISASCENDING: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISASCENDING() ); break; }
- case PROPERTY_ID_SCHEMANAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_SCHEMANAME() ); break; }
- case PROPERTY_ID_CATALOGNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CATALOGNAME() ); break; }
-
- case PROPERTY_ID_COMMAND: { rtl_uString_newFromAscii(&pStr,getPROPERTY_COMMAND() ); break; }
- case PROPERTY_ID_CHECKOPTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CHECKOPTION() ); break; }
- case PROPERTY_ID_PASSWORD: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PASSWORD() ); break; }
- case PROPERTY_ID_RELATEDCOLUMN: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RELATEDCOLUMN() ); break; }
-
- case PROPERTY_ID_FUNCTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FUNCTION() ); break; }
- case PROPERTY_ID_TABLENAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TABLENAME() ); break; }
- case PROPERTY_ID_REALNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_REALNAME() ); break; }
- case PROPERTY_ID_DBASEPRECISIONCHANGED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DBASEPRECISIONCHANGED() ); break; }
- case PROPERTY_ID_ISCURRENCY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISCURRENCY() ); break; }
- case PROPERTY_ID_ISBOOKMARKABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISBOOKMARKABLE() ); break; }
- case PROPERTY_ID_INVALID_INDEX: { rtl_uString_newFromAscii(&pStr,getSTAT_INVALID_INDEX() ); break; }
- case PROPERTY_ID_ERRORMSG_SEQUENCE: { rtl_uString_newFromAscii(&pStr,getERRORMSG_SEQUENCE() ); break; }
- case PROPERTY_ID_HY010: { rtl_uString_newFromAscii(&pStr,getSQLSTATE_SEQUENCE() ); break; }
- case PROPERTY_ID_HY0000: { rtl_uString_newFromAscii(&pStr,getSQLSTATE_GENERAL() ); break; }
- case PROPERTY_ID_DELIMITER: { rtl_uString_newFromAscii(&pStr,getSTR_DELIMITER() ); break; }
- case PROPERTY_ID_FORMATKEY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FORMATKEY() ); break; }
- case PROPERTY_ID_LOCALE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_LOCALE() ); break; }
- case PROPERTY_ID_AUTOINCREMENTCREATION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_AUTOINCREMENTCREATION() ); break; }
- case PROPERTY_ID_PRIVILEGES: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PRIVILEGES() ); break; }
- }
- m_aPropertyMap[_nIndex] = pStr;
- return pStr;
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/firebird/propertyids.hxx b/connectivity/source/drivers/firebird/propertyids.hxx
deleted file mode 100644
index 4e8dcc1..0000000
--- a/connectivity/source/drivers/firebird/propertyids.hxx
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#define _CONNECTIVITY_PROPERTYIDS_HXX_
-
-// this define has to be set to split the names into different dll's or so's
-// every dll has his own set of property names
-#include <rtl/ustring.hxx>
-#ifndef _MAP_
-#include <map>
-#endif
-
-namespace connectivity
-{
-namespace firebird
-{
- class OPropertyMap
- {
- ::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap;
-
- ::rtl::OUString fillValue(sal_Int32 _nIndex);
- public:
- OPropertyMap()
- {
- }
- ~OPropertyMap();
- ::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const;
-
- static OPropertyMap& getPropMap()
- {
- static OPropertyMap s_aPropMap;
- return s_aPropMap;
- }
- };
-
-
-
- typedef const sal_Char* (*PVFN)();
-
- struct UStringDescription
- {
- const sal_Char* pZeroTerminatedName;
- sal_Int32 nLength;
-
- UStringDescription(PVFN _fCharFkt);
- operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); }
- ~UStringDescription();
- private:
- UStringDescription();
- };
- }
-}
-
-
-//------------------------------------------------------------------------------
-#define DECL_PROP1IMPL(varname, type) \
-pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::cppu::UnoType< type >::get(),
-//------------------------------------------------------------------------------
-#define DECL_PROP0(varname, type) \
- DECL_PROP1IMPL(varname, type) 0)
-//------------------------------------------------------------------------------
-#define DECL_BOOL_PROP1IMPL(varname) \
- pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
-//------------------------------------------------------------------------------
-#define DECL_BOOL_PROP0(varname) \
- DECL_BOOL_PROP1IMPL(varname) 0)
-
-
-#define PROPERTY_ID_QUERYTIMEOUT 1
-#define PROPERTY_ID_MAXFIELDSIZE 2
-#define PROPERTY_ID_MAXROWS 3
-#define PROPERTY_ID_CURSORNAME 4
-#define PROPERTY_ID_RESULTSETCONCURRENCY 5
-#define PROPERTY_ID_RESULTSETTYPE 6
-#define PROPERTY_ID_FETCHDIRECTION 7
-#define PROPERTY_ID_FETCHSIZE 8
-#define PROPERTY_ID_ESCAPEPROCESSING 9
-#define PROPERTY_ID_USEBOOKMARKS 10
-// Column
-#define PROPERTY_ID_NAME 11
-#define PROPERTY_ID_TYPE 12
-#define PROPERTY_ID_TYPENAME 13
-#define PROPERTY_ID_PRECISION 14
-#define PROPERTY_ID_SCALE 15
-#define PROPERTY_ID_ISNULLABLE 16
-#define PROPERTY_ID_ISAUTOINCREMENT 17
-#define PROPERTY_ID_ISROWVERSION 18
-#define PROPERTY_ID_DESCRIPTION 19
-#define PROPERTY_ID_DEFAULTVALUE 20
-
-#define PROPERTY_ID_REFERENCEDTABLE 21
-#define PROPERTY_ID_UPDATERULE 22
-#define PROPERTY_ID_DELETERULE 23
-#define PROPERTY_ID_CATALOG 24
-#define PROPERTY_ID_ISUNIQUE 25
-#define PROPERTY_ID_ISPRIMARYKEYINDEX 26
-#define PROPERTY_ID_ISCLUSTERED 27
-#define PROPERTY_ID_ISASCENDING 28
-#define PROPERTY_ID_SCHEMANAME 29
-#define PROPERTY_ID_CATALOGNAME 30
-
-#define PROPERTY_ID_COMMAND 31
-#define PROPERTY_ID_CHECKOPTION 32
-#define PROPERTY_ID_PASSWORD 33
-#define PROPERTY_ID_RELATEDCOLUMN 34
-
-#define PROPERTY_ID_FUNCTION 35
-#define PROPERTY_ID_TABLENAME 36
-#define PROPERTY_ID_REALNAME 37
-#define PROPERTY_ID_DBASEPRECISIONCHANGED 38
-#define PROPERTY_ID_ISCURRENCY 39
-#define PROPERTY_ID_ISBOOKMARKABLE 40
-
-#define PROPERTY_ID_INVALID_INDEX 41
-#define PROPERTY_ID_ERRORMSG_SEQUENCE 42
-#define PROPERTY_ID_HY010 43
-#define PROPERTY_ID_HY0000 44
-#define PROPERTY_ID_DELIMITER 45
-#define PROPERTY_ID_FORMATKEY 46
-#define PROPERTY_ID_LOCALE 47
-#define PROPERTY_ID_IM001 48
-
-#define PROPERTY_ID_AUTOINCREMENTCREATION 49
-
-#define PROPERTY_ID_PRIVILEGES 50
-
-#endif // _CONNECTIVITY_PROPERTYIDS_HXX_
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5045308328e5a5734c7652183e845c8c981bc49b
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Fri Jul 19 09:04:36 2013 +0200
Use one mutex per connection (firebird-sdbc).
Change-Id: I1c21163bb96d565eef29508df179acac7b066ce6
diff --git a/connectivity/source/drivers/firebird/FConnection.hxx b/connectivity/source/drivers/firebird/FConnection.hxx
index 1942821..7bf25d3 100644
--- a/connectivity/source/drivers/firebird/FConnection.hxx
+++ b/connectivity/source/drivers/firebird/FConnection.hxx
@@ -83,6 +83,10 @@ namespace connectivity
protected:
::osl::Mutex m_aMutex;
+ public:
+ ::osl::Mutex& getMutex()
+ { return m_aMutex; }
+ protected:
static const OUString sDBLocation; // Location within .odb container
rtl_TextEncoding m_nTextEncoding; // the encoding which is used for all text conversions
//====================================================================
diff --git a/connectivity/source/drivers/firebird/FPreparedStatement.cxx b/connectivity/source/drivers/firebird/FPreparedStatement.cxx
index 168b000..c516b6fa 100644
--- a/connectivity/source/drivers/firebird/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/FPreparedStatement.cxx
@@ -109,7 +109,7 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt
Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
if(!m_xMetaData.is())
@@ -122,7 +122,7 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException
{
SAL_INFO("connectivity.firebird", "close()");
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -143,7 +143,7 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException
sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -154,7 +154,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc
sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
// same as in statement with the difference that this statement also can contain parameter
@@ -168,7 +168,7 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::r
"parameterIndex: " << parameterIndex << " , "
"x: " << x);
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
if (NULL == m_INsqlda)
@@ -203,7 +203,7 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::r
Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
return (Reference< XConnection >)m_pConnection;
@@ -215,7 +215,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE
SAL_INFO("connectivity.firebird", "executeQuery(). "
"Got called with sql: " << m_sSqlStatement);
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
// ISC_STATUS_ARRAY status; /* status vector */
@@ -225,7 +225,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE
// return NULL;
isc_stmt_handle aHandle = 0;
- Reference< OResultSet > pResult( new OResultSet( this, aHandle, 0) );
+ Reference< OResultSet > pResult( new OResultSet( m_pConnection, this, aHandle, 0) );
//initializeResultSet( pResult.get() );
Reference< XResultSet > xRS = pResult.get();
@@ -240,7 +240,7 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -249,7 +249,7 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -260,7 +260,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
{
(void) parameterIndex;
(void) aData;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -271,7 +271,7 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time&
{
(void) parameterIndex;
(void) aVal;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -281,7 +281,7 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
{
(void) parameterIndex;
(void) aVal;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -291,7 +291,7 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -302,7 +302,7 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -312,7 +312,7 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -322,7 +322,7 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 a
{
(void) parameterIndex;
(void) aVal;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -332,7 +332,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
{
(void) parameterIndex;
(void) sqlType;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -342,7 +342,7 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -352,7 +352,7 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -362,7 +362,7 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -372,7 +372,7 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -385,7 +385,7 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
(void) sqlType;
(void) scale;
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
}
// -------------------------------------------------------------------------
@@ -395,7 +395,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
(void) parameterIndex;
(void) sqlType;
(void) typeName;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -405,7 +405,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -415,7 +415,7 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -425,7 +425,7 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
{
(void) parameterIndex;
(void) x;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -437,7 +437,7 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
(void) parameterIndex;
(void) x;
(void) length;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -448,7 +448,7 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con
(void) parameterIndex;
(void) x;
(void) length;
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_pConnection->getMutex() );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 392edde..726d8cbcd 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -64,11 +64,13 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::util;
-OResultSet::OResultSet(const uno::Reference< XStatement >& xStatement,
+OResultSet::OResultSet(OConnection* pConnection,
+ const uno::Reference< XStatement >& xStatement,
isc_stmt_handle& aStatementHandle,
XSQLDA* pSqlda)
- : OResultSet_BASE(m_aMutex)
+ : OResultSet_BASE(pConnection->getMutex())
, OPropertySetHelper(OResultSet_BASE::rBHelper)
+ , m_pConnection(pConnection)
, m_xStatement(xStatement)
, m_xMetaData(NULL)
, m_pSqlda(pSqlda)
@@ -92,7 +94,7 @@ OResultSet::~OResultSet()
void OResultSet::ensureDataAvailable() throw (SQLException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
if (!m_bIsPopulated)
@@ -177,7 +179,7 @@ const ORowSetValue& OResultSet::getSqlData(sal_Int32 aRow, sal_Int32 aColumn)
// ---- XResultSet -- Row retrieval methods ------------------------------------
sal_Int32 SAL_CALL OResultSet::getRow() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return m_currentRow;
@@ -185,7 +187,7 @@ sal_Int32 SAL_CALL OResultSet::getRow() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::next() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -202,7 +204,7 @@ sal_Bool SAL_CALL OResultSet::next() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::previous() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -219,7 +221,7 @@ sal_Bool SAL_CALL OResultSet::previous() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::isBeforeFirst() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return m_currentRow == 0;
@@ -227,7 +229,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst() throw(SQLException, RuntimeExcepti
sal_Bool SAL_CALL OResultSet::isAfterLast() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -236,7 +238,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast() throw(SQLException, RuntimeException
sal_Bool SAL_CALL OResultSet::isFirst() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -245,7 +247,7 @@ sal_Bool SAL_CALL OResultSet::isFirst() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::isLast() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -255,7 +257,7 @@ sal_Bool SAL_CALL OResultSet::isLast() throw(SQLException, RuntimeException)
// Move to front
void SAL_CALL OResultSet::beforeFirst() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
m_currentRow = 0;
@@ -263,7 +265,7 @@ void SAL_CALL OResultSet::beforeFirst() throw(SQLException, RuntimeException)
// Move to back
void SAL_CALL OResultSet::afterLast() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -272,7 +274,7 @@ void SAL_CALL OResultSet::afterLast() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -289,7 +291,7 @@ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::last() throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -306,7 +308,7 @@ sal_Bool SAL_CALL OResultSet::last() throw(SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 aRow) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -334,7 +336,7 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 aRow) throw(SQLException, Runti
sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -357,7 +359,7 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) throw(SQLException, Runtim
void SAL_CALL OResultSet::checkColumnIndex(sal_Int32 index ) throw ( SQLException, RuntimeException )
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
if( index < 1 || index > m_fieldCount )
@@ -368,7 +370,7 @@ void SAL_CALL OResultSet::checkColumnIndex(sal_Int32 index ) throw ( SQLExceptio
void SAL_CALL OResultSet::checkRowIndex(sal_Bool mustBeOnValidRow)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -394,7 +396,7 @@ void OResultSet::disposing(void)
OPropertySetHelper::disposing();
- MutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_pConnection->getMutex());
m_xMetaData = NULL;
}
@@ -425,7 +427,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ
// find the first column with the name columnName
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
uno::Reference< XResultSetMetaData > xMeta = getMetaData();
sal_Int32 nLen = xMeta->getColumnCount();
@@ -440,7 +442,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ
uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -451,7 +453,7 @@ uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 c
uno::Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -463,7 +465,7 @@ uno::Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int3
const ORowSetValue& OResultSet::safelyRetrieveValue(sal_Int32 columnIndex)
throw(SQLException)
{
- MutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -542,7 +544,7 @@ Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, R
// -------------------------------------------------------------------------
uno::Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -555,7 +557,7 @@ uno::Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(
uno::Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -567,7 +569,7 @@ uno::Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex )
uno::Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -577,7 +579,7 @@ uno::Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) th
uno::Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -588,7 +590,7 @@ uno::Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) th
uno::Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -600,7 +602,7 @@ Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const uno::Reference<
{
(void) columnIndex;
(void) typeMap;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureDataAvailable();
@@ -616,7 +618,7 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException)
SAL_INFO("connectivity.firebird", "close().");
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -627,7 +629,7 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException)
uno::Reference< XInterface > SAL_CALL OResultSet::getStatement()
throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return m_xStatement;
@@ -636,7 +638,7 @@ uno::Reference< XInterface > SAL_CALL OResultSet::getStatement()
sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -645,7 +647,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -654,7 +656,7 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -665,7 +667,7 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio
sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -675,7 +677,7 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException)
void SAL_CALL OResultSet::cancel( ) throw(RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -691,7 +693,7 @@ Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException)
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
// you only have to implement this if you want to insert new rows
@@ -699,7 +701,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -708,21 +710,21 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -732,7 +734,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti
void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@@ -740,7 +742,7 @@ void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeExcept
void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
(void) columnIndex;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
@@ -749,7 +751,7 @@ void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) thr
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -759,7 +761,7 @@ void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(
(void) columnIndex;
(void) x;
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
}
// -------------------------------------------------------------------------
@@ -768,7 +770,7 @@ void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) thro
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -778,7 +780,7 @@ void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(
(void) columnIndex;
(void) x;
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
}
// -------------------------------------------------------------------------
@@ -786,7 +788,7 @@ void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -795,7 +797,7 @@ void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQ
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -805,7 +807,7 @@ void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -814,7 +816,7 @@ void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -823,7 +825,7 @@ void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sa
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -832,7 +834,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -842,7 +844,7 @@ void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) thr
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -852,7 +854,7 @@ void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -863,7 +865,7 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const uno::
(void) columnIndex;
(void) x;
(void) length;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -873,14 +875,14 @@ void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const un
(void) columnIndex;
(void) x;
(void) length;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -889,7 +891,7 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th
{
(void) columnIndex;
(void) x;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -900,7 +902,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any&
(void) columnIndex;
(void) x;
(void) scale;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
}
@@ -908,7 +910,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any&
// XRowLocate
Any SAL_CALL OResultSet::getBookmark( ) throw( SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
// if you don't want to support bookmark you must remove the XRowLocate interface
@@ -919,7 +921,7 @@ Any SAL_CALL OResultSet::getBookmark( ) throw( SQLException, RuntimeException)
sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
{
(void) bookmark;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return sal_False;
@@ -929,7 +931,7 @@ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_
{
(void) bookmark;
(void) rows;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return sal_False;
@@ -939,7 +941,7 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& aFirst, const Any&
{
(void) aFirst;
(void) aSecond;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return CompareBookmark::NOT_EQUAL;
@@ -960,7 +962,7 @@ sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& bookmark ) throw( SQLEx
Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException)
{
(void) rows;
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
return Sequence< sal_Int32 >();
diff --git a/connectivity/source/drivers/firebird/FResultSet.hxx b/connectivity/source/drivers/firebird/FResultSet.hxx
index 149d72d..b79b6c7 100644
--- a/connectivity/source/drivers/firebird/FResultSet.hxx
+++ b/connectivity/source/drivers/firebird/FResultSet.hxx
@@ -81,12 +81,12 @@ namespace connectivity
::com::sun::star::sdbc::XColumnLocate,
::com::sun::star::lang::XServiceInfo> OResultSet_BASE;
- class OResultSet : public OBase_Mutex,
- public OResultSet_BASE,
+ class OResultSet : public OResultSet_BASE,
public ::cppu::OPropertySetHelper,
public OPropertyArrayUsageHelper<OResultSet>
{
protected:
+ OConnection* m_pConnection;
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement >& m_xStatement;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
@@ -142,7 +142,8 @@ namespace connectivity
public:
DECLARE_SERVICE_INFO();
- OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement >& xStatement,
+ OResultSet(OConnection* pConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement >& xStatement,
isc_stmt_handle& aStatementHandle,
XSQLDA* aSqlda);
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index ac14ac6..5201d54 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -69,7 +69,7 @@ using namespace ::rtl;
using namespace ::std;
OStatement_Base::OStatement_Base(OConnection* _pConnection)
- : OStatement_BASE(m_aMutex),
+ : OStatement_BASE(_pConnection->getMutex()),
OPropertySetHelper(OStatement_BASE::rBHelper),
m_pConnection(_pConnection),
rBHelper(OStatement_BASE::rBHelper)
@@ -100,7 +100,7 @@ void OStatement_BASE2::disposing()
{
SAL_INFO("connectivity.firebird", "disposing().");
- MutexGuard aGuard(m_aMutex);
+ MutexGuard aGuard(m_pConnection->getMutex());
disposeResultSet();
@@ -153,7 +153,7 @@ Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException)
void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
// cancel the current sql statement
}
@@ -164,7 +164,7 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
SAL_INFO("connectivity.firebird", "close().");
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
}
@@ -184,7 +184,7 @@ sal_Int32 SAL_CALL OStatement_Base::executeUpdate(const OUString& sqlIn)
throw(SQLException, RuntimeException)
{
// TODO: close ResultSet if existing -- so so in all 3 execute methods.
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
const OUString sql = sanitizeSqlString(sqlIn);
@@ -219,7 +219,7 @@ int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
XSQLDA*& pOutSqlda,
XSQLVAR*& pVar)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
const OUString sql = sanitizeSqlString(sqlIn);
@@ -342,7 +342,7 @@ int OStatement_Base::prepareAndDescribeStatement(const OUString& sqlIn,
uno::Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery(const OUString& sql) throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
XSQLDA* pOutSqlda = 0;
@@ -371,7 +371,8 @@ uno::Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery(const OUStri
SAL_WARN("connectivity.firebird", "isc_dsql_execute failed" );
}
- uno::Reference< OResultSet > pResult(new OResultSet(uno::Reference< XStatement >(this),
+ uno::Reference< OResultSet > pResult(new OResultSet(m_pConnection,
+ uno::Reference< XStatement >(this),
aStatementHandle,
pOutSqlda));
//initializeResultSet( pResult.get() );
@@ -388,7 +389,7 @@ sal_Bool SAL_CALL OStatement_Base::execute(const OUString& sql) throw(SQLExcepti
SAL_INFO("connectivity.firebird", "executeQuery(). "
"Got called with sql: " << sql);
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
XSQLDA* pOutSqlda = 0;
@@ -426,7 +427,7 @@ sal_Bool SAL_CALL OStatement_Base::execute(const OUString& sql) throw(SQLExcepti
uno::Reference< XConnection > SAL_CALL OStatement_Base::getConnection()
throw(SQLException, RuntimeException)
{
- MutexGuard aGuard( m_aMutex );
+ MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
return (uno::Reference< XConnection >)m_pConnection;
diff --git a/connectivity/source/drivers/firebird/FStatement.hxx b/connectivity/source/drivers/firebird/FStatement.hxx
index 6102b9e..0311491 100644
--- a/connectivity/source/drivers/firebird/FStatement.hxx
+++ b/connectivity/source/drivers/firebird/FStatement.hxx
@@ -64,8 +64,7 @@ namespace connectivity
//************ Class: OStatement_Base
// is a base class for the normal statement and for the prepared statement
//**************************************************************
- class OStatement_Base : public OBase_Mutex,
- public OStatement_BASE,
+ class OStatement_Base : public OStatement_BASE,
public ::cppu::OPropertySetHelper,
public OPropertyArrayUsageHelper<OStatement_Base>
@@ -109,6 +108,7 @@ namespace connectivity
XSQLVAR*& pVar);
::rtl::OUString sanitizeSqlString(const OUString& sqlIn);
public:
+
::cppu::OBroadcastHelper& rBHelper;
OStatement_Base(OConnection* _pConnection);
using OStatement_BASE::operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >;
More information about the Libreoffice-commits
mailing list