diff options
Diffstat (limited to 'mysqlc/source/mysqlc_connection.cxx')
-rw-r--r-- | mysqlc/source/mysqlc_connection.cxx | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index 04fff735c627..75ae62bb09f3 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -68,13 +68,11 @@ OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver) ,cppDriver(_cppDriver) ,m_bClosed(false) { - OSL_TRACE("OConnection::OConnection"); m_rDriver.acquire(); } OConnection::~OConnection() { - OSL_TRACE("OConnection::~OConnection"); if (!isClosed()) { close(); } @@ -84,14 +82,12 @@ OConnection::~OConnection() void SAL_CALL OConnection::release() throw() { - OSL_TRACE("OConnection::release"); release_ChildImpl(); } void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyValue >& info) throw(SQLException) { - OSL_TRACE("OConnection::construct"); MutexGuard aGuard(m_aMutex); sal_Int32 nIndex; @@ -178,12 +174,6 @@ void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyVa connProps["socket"] = pipe_str; } - OSL_TRACE("hostName=%s", host_str.c_str()); - OSL_TRACE("port=%i", int(nPort)); - OSL_TRACE("userName=%s", user_str.c_str()); - OSL_TRACE("password=%s", pass_str.c_str()); - OSL_TRACE("schema=%s", schema_str.c_str()); - m_settings.cppConnection.reset(cppDriver->connect(connProps)); } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding()); @@ -193,7 +183,6 @@ void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyVa } m_settings.schema = aDbName; - OSL_TRACE("%s", rtl::OUStringToOString(m_settings.schema, getConnectionEncoding()).getStr()); // Check if the server is 4.1 or above if (this->getMysqlVersion() < 40100) { @@ -231,7 +220,6 @@ sal_Bool OConnection::supportsService(rtl::OUString const & ServiceName) Reference< XStatement > SAL_CALL OConnection::createStatement() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::createStatement"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -251,7 +239,6 @@ Reference< XStatement > SAL_CALL OConnection::createStatement() Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement(const rtl::OUString& _sSql) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::prepareStatement"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); const rtl::OUString sSqlStatement = transFormPreparedStatement( _sSql ); @@ -272,7 +259,6 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement(const rtl Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall(const rtl::OUString& /*_sSql*/ ) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::prepareCall"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -283,7 +269,6 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall(const rtl::OUS rtl::OUString SAL_CALL OConnection::nativeSQL(const rtl::OUString& _sSql) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::nativeSQL"); MutexGuard aGuard(m_aMutex); const rtl::OUString sSqlStatement = transFormPreparedStatement( _sSql ); @@ -300,7 +285,6 @@ rtl::OUString SAL_CALL OConnection::nativeSQL(const rtl::OUString& _sSql) void SAL_CALL OConnection::setAutoCommit(sal_Bool autoCommit) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::setAutoCommit"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); try { @@ -313,7 +297,6 @@ void SAL_CALL OConnection::setAutoCommit(sal_Bool autoCommit) sal_Bool SAL_CALL OConnection::getAutoCommit() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::getAutoCommit"); // you have to distinguish which if you are in autocommit mode or not // at normal case true should be fine here @@ -332,7 +315,6 @@ sal_Bool SAL_CALL OConnection::getAutoCommit() void SAL_CALL OConnection::commit() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::commit"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); try { @@ -345,7 +327,6 @@ void SAL_CALL OConnection::commit() void SAL_CALL OConnection::rollback() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::rollback"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); try { @@ -358,7 +339,6 @@ void SAL_CALL OConnection::rollback() sal_Bool SAL_CALL OConnection::isClosed() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::isClosed"); MutexGuard aGuard(m_aMutex); // just simple -> we are close when we are disposed that means someone called dispose(); (XComponent) @@ -368,7 +348,6 @@ sal_Bool SAL_CALL OConnection::isClosed() Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::getMetaData"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -388,7 +367,6 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData() void SAL_CALL OConnection::setReadOnly(sal_Bool readOnly) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::setReadOnly"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -398,7 +376,6 @@ void SAL_CALL OConnection::setReadOnly(sal_Bool readOnly) sal_Bool SAL_CALL OConnection::isReadOnly() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::isReadOnly"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -409,7 +386,6 @@ sal_Bool SAL_CALL OConnection::isReadOnly() void SAL_CALL OConnection::setCatalog(const rtl::OUString& catalog) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::setCatalog"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -424,7 +400,6 @@ void SAL_CALL OConnection::setCatalog(const rtl::OUString& catalog) rtl::OUString SAL_CALL OConnection::getCatalog() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::getCatalog"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -440,7 +415,6 @@ rtl::OUString SAL_CALL OConnection::getCatalog() void SAL_CALL OConnection::setTransactionIsolation(sal_Int32 level) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::setTransactionIsolation"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -475,7 +449,6 @@ void SAL_CALL OConnection::setTransactionIsolation(sal_Int32 level) sal_Int32 SAL_CALL OConnection::getTransactionIsolation() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::getTransactionIsolation"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -497,7 +470,6 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation() Reference<XNameAccess> SAL_CALL OConnection::getTypeMap() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::getTypeMap"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -508,7 +480,6 @@ Reference<XNameAccess> SAL_CALL OConnection::getTypeMap() void SAL_CALL OConnection::setTypeMap(const Reference<XNameAccess >& typeMap) throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::setTypeMap"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -519,7 +490,6 @@ void SAL_CALL OConnection::setTypeMap(const Reference<XNameAccess >& typeMap) void SAL_CALL OConnection::close() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::close"); /* we need block, because the mutex is a local variable, which will guard the block @@ -537,7 +507,6 @@ Any SAL_CALL OConnection::getWarnings() throw(SQLException, RuntimeException, std::exception) { Any x = Any(); - OSL_TRACE("OConnection::getWarnings"); // when you collected some warnings -> return it return x; } @@ -545,13 +514,11 @@ Any SAL_CALL OConnection::getWarnings() void SAL_CALL OConnection::clearWarnings() throw(SQLException, RuntimeException, std::exception) { - OSL_TRACE("OConnection::clearWarnings"); // you should clear your collected warnings here# } void OConnection::disposing() { - OSL_TRACE("OConnection::disposing"); // we noticed that we should be destroied in near future so we have to dispose our statements MutexGuard aGuard(m_aMutex); @@ -573,7 +540,6 @@ void OConnection::disposing() sal_Int32 OConnection::getMysqlVersion() throw(SQLException, RuntimeException) { - OSL_TRACE("OConnection::getMysqlVersion"); MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); @@ -591,7 +557,7 @@ sal_Int32 OConnection::getMysqlVersion() // TODO: Not used //sal_Int32 OConnection::sdbcColumnType(rtl::OUString typeName) //{ -// OSL_TRACE("OConnection::sdbcColumnType"); +// SAL_WARNx("mysqlc", "OConnection::sdbcColumnType"); // int i = 0; // while (mysqlc_types[i].typeName) { // if (rtl::OUString::createFromAscii(mysqlc_types[i].typeName).equals( |