summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-24 20:06:32 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-24 20:36:01 +0200
commit5d7573df1d7551535230e93f439c0fa46c2efca3 (patch)
tree04a3ff898b8c687ee0167b9d13f0e5bc1a336ee6 /connectivity
parentb3f6b5e934a4bbe694cbb33404e6afa719b2b942 (diff)
Remove unneded string sanitisation (firebird-sdbc).
This was only needed because of the incorrect sql dialect previousy used which didn't permit quoted identifiers. Change-Id: I31b50add0363f14c8a8cc228f3dfbe084fe42d1c
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/FStatement.cxx14
-rw-r--r--connectivity/source/drivers/firebird/FStatement.hxx3
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx13
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.hxx1
4 files changed, 5 insertions, 26 deletions
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 9f4a58c24754..907e57c9d972 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -95,15 +95,13 @@ void SAL_CALL OStatement::release() throw()
}
// ---- XStatement -----------------------------------------------------------
-sal_Int32 SAL_CALL OStatement::executeUpdate(const OUString& sqlIn)
+sal_Int32 SAL_CALL OStatement::executeUpdate(const OUString& sql)
throw(SQLException, RuntimeException)
{
// TODO: close ResultSet if existing -- so so in all 3 execute methods.
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
- const OUString sql = sanitizeSqlString(sqlIn);
-
int aErr = isc_dsql_execute_immediate(m_statusVector,
&m_pConnection->getDBHandle(),
&m_pConnection->getTransaction(),
@@ -122,14 +120,12 @@ sal_Int32 SAL_CALL OStatement::executeUpdate(const OUString& sqlIn)
}
-uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& sqlIn)
+uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& sql)
throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
- const OUString sql = sanitizeSqlString(sqlIn);
-
XSQLDA* pOutSqlda = 0;
isc_stmt_handle aStatementHandle = 0;
int aErr = 0;
@@ -166,11 +162,11 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
return m_xResultSet;
}
-sal_Bool SAL_CALL OStatement::execute(const OUString& sqlIn)
+sal_Bool SAL_CALL OStatement::execute(const OUString& sql)
throw(SQLException, RuntimeException)
{
SAL_INFO("connectivity.firebird", "executeQuery(). "
- "Got called with sql: " << sqlIn);
+ "Got called with sql: " << sql);
MutexGuard aGuard(m_pConnection->getMutex());
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
@@ -179,8 +175,6 @@ sal_Bool SAL_CALL OStatement::execute(const OUString& sqlIn)
isc_stmt_handle aStatementHandle = 0;
int aErr = 0;
- const OUString sql = sanitizeSqlString(sqlIn);
-
aErr = prepareAndDescribeStatement(sql,
aStatementHandle,
pOutSqlda);
diff --git a/connectivity/source/drivers/firebird/FStatement.hxx b/connectivity/source/drivers/firebird/FStatement.hxx
index 385329887e4e..bbe2adea6ad7 100644
--- a/connectivity/source/drivers/firebird/FStatement.hxx
+++ b/connectivity/source/drivers/firebird/FStatement.hxx
@@ -45,9 +45,6 @@ namespace connectivity
namespace firebird
{
- // The name OStatementStatement_BASE is temporary and will be changed
- // once the general restructuring of Statement/PreparedStatement is
- // complete.
typedef ::cppu::ImplHelper1< ::com::sun::star::sdbc::XStatement >
OStatement_Base;
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index fe6c6a2c6c88..87bbb02424c5 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -122,24 +122,13 @@ void SAL_CALL OStatementCommonBase::close( ) throw(SQLException, RuntimeExcepti
dispose();
}
-
-OUString OStatementCommonBase::sanitizeSqlString(const OUString& sqlIn)
-{
- // TODO: verify this is all we need.
- static const sal_Unicode pattern('"');
- static const sal_Unicode empty(' ');
- return sqlIn.replace(pattern, empty);
-}
-
-int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sqlIn,
+int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sql,
isc_stmt_handle& aStatementHandle,
XSQLDA*& pOutSqlda,
XSQLDA* pInSqlda)
{
MutexGuard aGuard(m_pConnection->getMutex());
- const OUString sql = sanitizeSqlString(sqlIn);
-
if (!pOutSqlda)
{
pOutSqlda = (XSQLDA*) malloc(XSQLDA_LENGTH(10));
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.hxx b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
index cd8f9359eef5..98965386661c 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.hxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
@@ -103,7 +103,6 @@ namespace connectivity
isc_stmt_handle& aStatementHandle,
XSQLDA*& pOutSqlda,
XSQLDA* pInSqlda=0);
- ::rtl::OUString sanitizeSqlString(const OUString& sqlIn);
public:
::cppu::OBroadcastHelper& rBHelper;