diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2018-03-25 13:26:57 +0200 |
---|---|---|
committer | Tamás Bunth <btomi96@gmail.com> | 2018-04-07 17:08:26 +0200 |
commit | 159dd28651788a19848eae56693ad06ed947414d (patch) | |
tree | b69013db1c0fa45677b59d58999ce0d8ebebd76c /connectivity/source | |
parent | 1a9bfdd8976d28fa3a56726bdcae9f2b294d6c6d (diff) |
dbaccess: Enable hsql migration by default
Also make Firebird driver not experimental anymore.
With hsql migration enabled, the hsqldb related unit tests can be
reused, because the underlying DBMS is transparent. To achieve that, I
added firebird_sdbc component to hsqldb CppunitTest_* files.
This commit also contains fixes for upcoming bugs while migrating from
hsqldb to firebird, shown by hsqldb related unit tests:
- null values: in case of null values, the setNull method should be used
instead of nothing. (malformed string otherwise)
Remove DBACCESS_HSQL_MIGRATION environment variable, since migration is
default from now on.
JunitTest_dbaccess_complex was based on HSQLDB. This commit replaces
"if exists" hsql specific solution with firebird specific. Also disable
test for queries with named parameters.
Change-Id: Ieb68f5ad3a11389599c4f268ea4df82a83643b82
Reviewed-on: https://gerrit.libreoffice.org/52008
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'connectivity/source')
3 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index c93b4876875d..c7561b51e845 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -29,7 +29,6 @@ #include <osl/file.hxx> #include <osl/process.h> #include <rtl/bootstrap.hxx> -#include <svtools/miscopt.hxx> #include <unotools/localfilehelper.hxx> using namespace com::sun::star; @@ -191,10 +190,7 @@ Reference< XConnection > SAL_CALL FirebirdDriver::connect( sal_Bool SAL_CALL FirebirdDriver::acceptsURL( const OUString& url ) { - SvtMiscOptions aMiscOptions; - - return aMiscOptions.IsExperimentalMode() && - (url == "sdbc:embedded:firebird" || url.startsWith("sdbc:firebird:")); + return (url == "sdbc:embedded:firebird" || url.startsWith("sdbc:firebird:")); } Sequence< DriverPropertyInfo > SAL_CALL FirebirdDriver::getPropertyInfo( diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 2f48c63c746e..0a43d5c93851 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -834,6 +834,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, } else if( dType == SQL_VARYING ) { + setParameterNull(nParameterIndex, false); const sal_Int32 nMaxSize = 0xFFFF; Sequence<sal_Int8> xBytesCopy(xBytes); // First 2 bytes indicate string size @@ -848,6 +849,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, } else if( dType == SQL_TEXT ) { + setParameterNull(nParameterIndex, false); memcpy(pVar->sqldata, xBytes.getConstArray(), xBytes.getLength() ); // Fill remainder with spaces memset(pVar->sqldata + xBytes.getLength(), 0, pVar->sqllen - xBytes.getLength()); diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx index dafc9e3d1972..157070c7fdb0 100644 --- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx +++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx @@ -433,6 +433,8 @@ sal_Int32 OStatementCommonBase::getStatementChangeCount() case isc_info_sql_stmt_delete: aDesiredInfoType = isc_info_req_delete_count; break; + case isc_info_sql_stmt_exec_procedure: + return 0; // cannot determine default: throw SQLException(); // TODO: better error message? } |