summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2020-05-09 13:36:54 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2020-05-09 20:52:33 +0200
commita69996aab61b1b9206d3e004e283db90d1ca87e2 (patch)
tree4367d0f81c248f0d72d2c44bb477149b458093bd /connectivity
parentc558ad61ba56d45a46e286c5f1329c436e009617 (diff)
mysql-sdbc: do not lie about supporting XBatchExecution
Change-Id: I414c5b43fe942203207b57bd23bfae79f1c3cbf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93849 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.cxx34
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.hxx10
3 files changed, 23 insertions, 23 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
index c9814a9da659..960b6c8875fc 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
@@ -540,7 +540,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected(sal_Int32 /*setType*/) {
sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected(sal_Int32 /*setType*/) { return false; }
-sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates() { return true; }
+sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates() { return false; }
Reference<XConnection> SAL_CALL ODatabaseMetaData::getConnection() { return &m_rConnection; }
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
index 5e9128a80f1a..3211fe09eff7 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
@@ -108,10 +108,10 @@ void SAL_CALL OCommonStatement::close()
disposeResultSet();
}
-void SAL_CALL OStatement::clearBatch()
-{
- // if you support batches clear it here
-}
+// void SAL_CALL OStatement::clearBatch()
+// {
+// mysqlc_sdbc_driver::throwFeatureNotImplementedException("com:sun:star:sdbc:XBatchExecution");
+// }
sal_Bool SAL_CALL OCommonStatement::execute(const OUString& sql)
{
@@ -180,7 +180,7 @@ sal_Int32 SAL_CALL OCommonStatement::getUpdateCount() { return m_nAffectedRows;
Any SAL_CALL OStatement::queryInterface(const Type& rType)
{
- Any aRet = ::cppu::queryInterface(rType, static_cast<XBatchExecution*>(this));
+ Any aRet = ::cppu::queryInterface(rType, static_cast<XServiceInfo*>(this));
if (!aRet.hasValue())
{
aRet = OCommonStatement::queryInterface(rType);
@@ -188,19 +188,21 @@ Any SAL_CALL OStatement::queryInterface(const Type& rType)
return aRet;
}
-void SAL_CALL OStatement::addBatch(const OUString&)
-{
- MutexGuard aGuard(m_aMutex);
- checkDisposed(rBHelper.bDisposed);
-}
+// void SAL_CALL OStatement::addBatch(const OUString&)
+// {
+// MutexGuard aGuard(m_aMutex);
+// checkDisposed(rBHelper.bDisposed);
-Sequence<sal_Int32> SAL_CALL OStatement::executeBatch()
-{
- MutexGuard aGuard(m_aMutex);
- checkDisposed(rBHelper.bDisposed);
+// mysqlc_sdbc_driver::throwFeatureNotImplementedException("com:sun:star:sdbc:XBatchExecution");
+// }
- return Sequence<sal_Int32>();
-}
+// Sequence<sal_Int32> SAL_CALL OStatement::executeBatch()
+// {
+// MutexGuard aGuard(m_aMutex);
+// checkDisposed(rBHelper.bDisposed);
+
+// mysqlc_sdbc_driver::throwFeatureNotImplementedException("com:sun:star:sdbc:XBatchExecution");
+// }
sal_Int32 SAL_CALL OCommonStatement::executeUpdate(const OUString& sql)
{
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
index 9b0d3c952763..54d67bd9d901 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
@@ -144,9 +144,7 @@ private:
using ::cppu::OPropertySetHelper::getFastPropertyValue;
};
-class OStatement final : public OCommonStatement,
- public css::sdbc::XBatchExecution,
- public css::lang::XServiceInfo
+class OStatement final : public OCommonStatement, public css::lang::XServiceInfo
{
virtual ~OStatement() override = default;
@@ -170,11 +168,11 @@ public:
void SAL_CALL release() throw() override;
// XBatchExecution
- void SAL_CALL addBatch(const OUString& sql) override;
+ // void SAL_CALL addBatch(const OUString& sql) override;
- void SAL_CALL clearBatch() override;
+ // void SAL_CALL clearBatch() override;
- css::uno::Sequence<sal_Int32> SAL_CALL executeBatch() override;
+ // css::uno::Sequence<sal_Int32> SAL_CALL executeBatch() override;
};
}
}