tdf#147309: Recreating a view with same name and in the same session fails (FB)
Since HSQLDB already worked, just do the same.
Change-Id: I44929cf36179cc3cdff6e61f05899c9a913c78b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131442
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131447
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/connectivity/source/drivers/firebird/Catalog.hxx b/connectivity/source/drivers/firebird/Catalog.hxx
index b6bf02f..3ffb923 100644
--- a/connectivity/source/drivers/firebird/Catalog.hxx
+++ b/connectivity/source/drivers/firebird/Catalog.hxx
@@ -32,6 +32,7 @@ namespace connectivity::firebird
virtual void refreshUsers() override;
sdbcx::OCollection* getPrivateTables() const { return m_pTables.get(); }
sdbcx::OCollection* getPrivateViews() const { return m_pViews.get(); }
};
} // namespace connectivity::firebird
diff --git a/connectivity/source/drivers/firebird/Tables.cxx b/connectivity/source/drivers/firebird/Tables.cxx
index 06e6806..29662ef12 100644
--- a/connectivity/source/drivers/firebird/Tables.cxx
+++ b/connectivity/source/drivers/firebird/Tables.cxx
@@ -9,6 +9,7 @@
#include "Table.hxx"
#include "Tables.hxx"
#include "Views.hxx"
#include "Catalog.hxx"
#include "Util.hxx"
@@ -202,7 +203,14 @@ void Tables::dropObject(sal_Int32 nPosition, const OUString& sName)
const OUString sQuoteString = m_xMetaData->getIdentifierQuoteString();
m_xMetaData->getConnection()->createStatement()->execute(
"DROP " + sType + ::dbtools::quoteName(sQuoteString,sName));
"DROP " + sType + " " + ::dbtools::quoteName(sQuoteString,sName));
if (sType == "VIEW")
{
Views* pViews = static_cast<Views*>(static_cast<Catalog&>(m_rParent).getPrivateViews());
if ( pViews && pViews->hasByName(sName) )
pViews->dropByNameImpl(sName);
}
}
void connectivity::firebird::Tables::appendNew(const OUString& _rsNewTable)