summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-12-28 11:23:23 +0100
committerJulien Nabet <serval2412@yahoo.fr>2021-12-28 12:27:35 +0100
commit4761e11aea650dd93fbc8830ddd7c4976334105e (patch)
treeada6d6eed9d77a39385c795fc8ec66be31e51c39 /connectivity
parent7d575c9f3db65297e4c3c6290d326ee31908ecbe (diff)
Drop FIREBIRD_SQL_DIALECT constant and use SQL_DIALECT_CURRENT
Change-Id: I6731ad4c49066b197ffc5b4e5d2c482bd7ca169e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127615 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Driver.hxx4
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx2
3 files changed, 5 insertions, 3 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 7122d80b7a15..d2245f88653f 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -219,7 +219,7 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
dpbBuffer.push_back(isc_dpb_version1);
dpbBuffer.push_back(isc_dpb_sql_dialect);
dpbBuffer.push_back(1); // 1 byte long
- dpbBuffer.push_back(FIREBIRD_SQL_DIALECT);
+ dpbBuffer.push_back(SQL_DIALECT_CURRENT);
// set UTF8 as default character set of the database
const char sCharset[] = "UTF8";
diff --git a/connectivity/source/drivers/firebird/Driver.hxx b/connectivity/source/drivers/firebird/Driver.hxx
index d8ce92b0ed93..06841d937e70 100644
--- a/connectivity/source/drivers/firebird/Driver.hxx
+++ b/connectivity/source/drivers/firebird/Driver.hxx
@@ -33,7 +33,9 @@ namespace connectivity::firebird
// The SQL dialect in use
// Has to be used in various isc_* calls.
// 3: Is IB6 -- minimum required for delimited identifiers.
- const int FIREBIRD_SQL_DIALECT = 3;
+ // SQL_DIALECT_V6 = 3, it's the last current version
+ // SQL_DIALECT_CURRENT is an alias for SQL_DIALECT_V6
+ // See src/dsql/sqlda_pub.h for full details
typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver,
css::sdbcx::XDataDefinitionSupplier,
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 01ed3f8fc854..234fd134562f 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -154,7 +154,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
&m_aStatementHandle,
0,
OUStringToOString(sql, RTL_TEXTENCODING_UTF8).getStr(),
- FIREBIRD_SQL_DIALECT,
+ SQL_DIALECT_CURRENT,
pOutSqlda);
if (aErr)