[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/parse/sqlflex.l |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit ede39fd49c03f2f604507bb1b79ac32fe52da493 Author: Lionel Elie Mamane AuthorDate: Fri May 8 07:51:53 2020 +0200 Commit: Michael Stahl CommitDate: Fri Jun 5 11:19:51 2020 +0200 tdf#122461 SQL identifiers (names) can contain newlines Change-Id: Ic58e6b65e146b2e0d9cb656aa5fa06cfe955d11d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93690 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane (cherry picked from commit b6ab865a371f5c46f96d931721f03afde82b7ec1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93787 Reviewed-by: Michael Stahl diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index 1002ecef7970..2269d1c6e52c 100644 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -526,6 +526,8 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp) int ch; OStringBuffer sBuffer(256); +assert(nTyp == 0 || nTyp == 1 || nTyp == 2); + while (!checkeof(ch = yyinput())) { if (ch == delim) @@ -554,7 +556,7 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp) } } -else if (nTyp != 1 && (ch == '\r' || ch == '\n') ) +else if (nTyp == 2 && (ch == '\r' || ch == '\n') ) break; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source include/connectivity
connectivity/source/commontools/dbtools.cxx |3 +++ connectivity/source/commontools/statementcomposer.cxx | 11 +++ include/connectivity/statementcomposer.hxx|1 + 3 files changed, 15 insertions(+) New commits: commit bfaa243b0cac1753330982bedb47f272724bfa1c Author: Lionel Elie Mamane AuthorDate: Mon May 4 22:58:31 2020 +0200 Commit: Michael Stahl CommitDate: Wed May 13 10:04:52 2020 +0200 tdf#122408 make StatementComposer apply HAVING clause Change-Id: I381c918e8cac2800367bc586f8c230d46bcd71e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93378 Tested-by: Lionel Elie Mamane Reviewed-by: Michael Stahl diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 514b026b26c9..34d83e573a1e 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1247,7 +1247,10 @@ static Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const bool bApplyFilter = true; _rxRowSet->getPropertyValue("ApplyFilter") >>= bApplyFilter; if ( bApplyFilter ) +{ aComposer.setFilter( getString( _rxRowSet->getPropertyValue("Filter") ) ); +aComposer.setHavingClause( getString( _rxRowSet->getPropertyValue("HavingClause") ) ); +} aComposer.getQuery(); diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index a21c8cf1a41d..01f20e9c1e3c 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -60,6 +60,7 @@ namespace dbtools Reference< XSingleSelectQueryComposer > xComposer; OUString sCommand; OUString sFilter; +OUString sHavingClause; OUString sOrder; sal_Int32 nCommandType; boolbEscapeProcessing; @@ -189,6 +190,8 @@ namespace dbtools OUString sFilter; OSL_VERIFY( xQuery->getPropertyValue("Filter") >>= sFilter ); xComposer->setFilter( sFilter ); +OSL_VERIFY( xQuery->getPropertyValue("HavingClause") >>= sFilter ); +xComposer->setHavingClause( sFilter ); } // the composed statement @@ -212,6 +215,7 @@ namespace dbtools // append sort/filter xComposer->setOrder( _rData.sOrder ); xComposer->setFilter( _rData.sFilter ); +xComposer->setHavingClause( _rData.sHavingClause ); sStatement = xComposer->getQuery(); @@ -262,6 +266,13 @@ namespace dbtools } +void StatementComposer::setHavingClause( const OUString& _rHavingClause ) +{ +m_pData->sHavingClause = _rHavingClause; +m_pData->bComposerDirty = true; +} + + void StatementComposer::setOrder( const OUString& _rOrder ) { m_pData->sOrder = _rOrder; diff --git a/include/connectivity/statementcomposer.hxx b/include/connectivity/statementcomposer.hxx index 944a4321b12a..88fa61f553b1 100644 --- a/include/connectivity/statementcomposer.hxx +++ b/include/connectivity/statementcomposer.hxx @@ -68,6 +68,7 @@ namespace dbtools voidsetDisposeComposer( bool _bDoDispose ); voidsetFilter( const OUString& _rFilter ); +voidsetHavingClause( const OUString& _rHavingClause ); voidsetOrder( const OUString& _rOrder ); /** returns the composer which has been fed with the current settings ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/DatabaseMetaData.cxx |2 +- connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit c7e30a805a2451752070f6eef7149b32079bdc59 Author: Julien Nabet AuthorDate: Sun May 10 20:44:12 2020 +0200 Commit: Julien Nabet CommitDate: Mon May 11 12:50:36 2020 +0200 tdf#126468: MySQL/MariaDB and Firebird don't require order field in select part Change-Id: I75f050dd6f38fefe83d24a4886610d421f72826e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93937 Reviewed-by: Lionel Elie Mamane Tested-by: Julien Nabet (cherry picked from commit 572c9db0440d9aba4945fb1761ec7f83e717c2f0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93801 Tested-by: Jenkins diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 3d0401678d60..88fec644527b 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -513,7 +513,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) { -return false; +return true; } sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx index d9c7f81f9139..2b14104ff02b 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx @@ -286,7 +286,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets() { return false sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause() { return true; } -sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated() { return false; } +sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated() { return true; } sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/mysql_jdbc/YTable.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit ae513765f65c9497533f516e5cde2898c0911a1f Author: Julien Nabet AuthorDate: Sun May 10 11:22:06 2020 +0200 Commit: Michael Weghorn CommitDate: Mon May 11 09:31:48 2020 +0200 tdf#132814: fix put autovalue to Yes in gui for Mysql/MariaDB See part of bt: https://bugs.documentfoundation.org/show_bug.cgi?id=132814#c3 Like this since at least: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b2cefc2e36925b4384eb0aea54aa2c6bcfb018a8 author Tamas Bunth2018-10-08 11:04:48 +0200 committer Tamás Bunth 2018-10-14 22:16:05 +0200 commit b2cefc2e36925b4384eb0aea54aa2c6bcfb018a8 (patch) treef1ab6e9fec3c66f0a3285b3cbae38dc7185d parent ba6723431afa843232fadf44e12ddab44e85c9f0 (diff) Revert removal of mysql jdbc connector And also make some minor fixes so it cooperates with the new mysqlc library. Change-Id: Id328c8378be1555fb5934c738def7fcd62f7a14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93915 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane Reviewed-by: Julien Nabet (cherry picked from commit f8c62ed408ae9b390d8268b43f4d49c2c6057227) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93794 Reviewed-by: Michael Weghorn diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx index 6eeaf3a23897..67b166d0e13e 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx @@ -208,6 +208,8 @@ void SAL_CALL OMySQLTable::alterColumnByName(const OUString& colName, if (sTypeName.indexOf(s_sAutoIncrement) == -1) { sTypeName += OUStringLiteral(" ") + s_sAutoIncrement; + descriptor->setPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME), + makeAny(sTypeName)); } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/parse/sqlbison.y | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) New commits: commit 4310b8b67ed9d0d32d4fd468b370bd3cfed07975 Author: Julien Nabet AuthorDate: Sat Apr 25 15:30:19 2020 +0200 Commit: Julien Nabet CommitDate: Sun Apr 26 13:05:22 2020 +0200 tdf#132385: sql parser: don't drop clauses from window specification bison rule window_specification: '(' window_specification_details ')' { $$ = SQL_NEW_RULE; $$->append(newNode("(", SQLNodeType::Punctuation)); $$->append($2); $$->append(newNode(")", SQLNodeType::Punctuation)); } ; makes it look like rule "window_specification_details" is a single node, but in reality it is a sequence of four nodes: window_specification_details: opt_existing_window_name opt_window_partition_clause opt_order_by_clause opt_window_frame_clause ; The result is that only the "opt_existing_window_name" clause was being put in the parse tree, and the other three were simply discarded. Since that will forever be a trap, and this is the only place where window_specification_details is used, we inline it into window_specification and remove it. Change-Id: I568904355174d2bc36155bde1d4dd09f57759cd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92776 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 453019b928ed..c9d423e3219c 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -250,7 +250,7 @@ using namespace connectivity; %type window_function window_function_type ntile_function number_of_tiles lead_or_lag_function lead_or_lag lead_or_lag_extent offset default_expression null_treatment %type first_or_last_value_function first_or_last_value nth_value_function nth_row from_first_or_last window_name_or_specification in_line_window_specification opt_lead_or_lag_function %type opt_null_treatment opt_from_first_or_last simple_value_specification dynamic_parameter_specification window_name window_clause window_definition_list window_definition -%type new_window_name window_specification_details existing_window_name window_partition_clause window_partition_column_reference_list window_partition_column_reference window_frame_clause +%type new_window_name existing_window_name window_partition_clause window_partition_column_reference_list window_partition_column_reference window_frame_clause %type window_frame_units window_frame_extent window_frame_start window_frame_preceding window_frame_between window_frame_bound_1 window_frame_bound_2 window_frame_bound window_frame_following window_frame_exclusion %type opt_window_frame_clause opt_window_partition_clause opt_existing_window_name window_specification opt_window_frame_exclusion opt_window_clause opt_offset %type opt_fetch_first_row_count fetch_first_clause offset_row_count fetch_first_row_count first_or_next row_or_rows opt_result_offset_clause result_offset_clause @@ -2202,11 +2202,19 @@ new_window_name: window_name ; window_specification: - '(' window_specification_details ')' + '(' + opt_existing_window_name + opt_window_partition_clause + opt_order_by_clause + opt_window_frame_clause + ')' { $$ = SQL_NEW_RULE; $$->append(newNode("(", SQLNodeType::Punctuation)); $$->append($2); + $$->append($3); + $$->append($4); + $$->append($5); $$->append(newNode(")", SQLNodeType::Punctuation)); } ; @@ -,12 +2230,6 @@ opt_window_frame_clause: /* empty */ {$$ = SQL_NEW_RULE;} | window_frame_clause ; -window_specification_details: - opt_existing_window_name - opt_window_partition_clause - opt_order_by_clause - opt_window_frame_clause - ; existing_window_name: window_name ; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 9e72262b420bad1e54287e35463be55769063608 Author: Julien Nabet AuthorDate: Mon Mar 30 19:38:55 2020 +0200 Commit: Julien Nabet CommitDate: Mon Mar 30 21:09:11 2020 +0200 tdf#131712: fix crash on table with non null float field (mysql native) See bt with infinite loop here: http://bugs.documentfoundation.org/attachment.cgi?id=159161 Change-Id: Iaa4e998c640c414dec60a72d5977f8d6a6a8433f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91379 Tested-by: Jenkins (cherry picked from commit 192ee96db3bc3544c388034b19fa7a9cd6e7537d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91386 Reviewed-by: Lionel Elie Mamane diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx index ddaba5fc9e45..984914016a13 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx @@ -330,6 +330,7 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex) case MYSQL_TYPE_LONGLONG: return getLong(nColumnIndex); case MYSQL_TYPE_FLOAT: +return getFloat(nColumnIndex); case MYSQL_TYPE_DOUBLE: return getDouble(nColumnIndex); case MYSQL_TYPE_TIMESTAMP: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/Util.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit ee2f51cd43ef4e5fbda33918daee26e06ab38580 Author: Julien Nabet AuthorDate: Mon Mar 9 18:59:29 2020 +0100 Commit: Xisco Faulí CommitDate: Wed Mar 25 16:31:01 2020 +0100 tdf#130334: Firebird deal with array fields See https://bugs.documentfoundation.org/show_bug.cgi?id=130334#c11 See https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-datatypes-bnrytypes.html#fblangref25-datatypes-array Change-Id: I27c53b9c771fcdb3b89e66af325a8234c7de08bb Change-Id: I7b9d27f78e351eda611d13f5a07ef3c80ff00e3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90239 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit 2ede753a8b7adecbf6ca78745e43e23c7498e289) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90042 Reviewed-by: Xisco Faulí diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index c4d6eeece4d1..572767851770 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -304,12 +304,12 @@ void firebird::mallocSQLVAR(XSQLDA* pSqlda) case SQL_TIMESTAMP: pVar->sqldata = static_cast(malloc(sizeof(ISC_TIMESTAMP))); break; +// an ARRAY is in fact a BLOB of a specialized type +// See https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-datatypes-bnrytypes.html#fblangref25-datatypes-array +case SQL_ARRAY: case SQL_BLOB: pVar->sqldata = static_cast(malloc(sizeof(ISC_QUAD))); break; -case SQL_ARRAY: -assert(false); // TODO: implement -break; case SQL_TYPE_TIME: pVar->sqldata = static_cast(malloc(sizeof(ISC_TIME))); break; @@ -353,6 +353,9 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda) case SQL_DOUBLE: case SQL_D_FLOAT: case SQL_TIMESTAMP: +// an ARRAY is in fact a BLOB of a specialized type +// See https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-datatypes-bnrytypes.html#fblangref25-datatypes-array +case SQL_ARRAY: case SQL_BLOB: case SQL_INT64: case SQL_TYPE_TIME: @@ -364,9 +367,6 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda) pVar->sqldata = nullptr; } break; -case SQL_ARRAY: -assert(false); // TODO: implement -break; case SQL_NULL: assert(false); // TODO: implement break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/User.cxx | 11 +-- connectivity/source/drivers/firebird/User.hxx |7 +-- connectivity/source/drivers/firebird/Users.cxx |4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) New commits: commit 358d34e12d8f88543ddca8c0e852712e6ef1b10c Author: Julien Nabet AuthorDate: Sat Mar 7 23:15:13 2020 +0100 Commit: Noel Grandin CommitDate: Tue Mar 10 07:26:33 2020 +0100 tdf#131212: Implement change user password in Firebird Command retrieved from https://firebirdsql.org/refdocs/langrefupd25-security-sql-user-mgmt.html Change-Id: Idd16c74cd3b00f8a5c9cc135e11ac032811557f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90177 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90182 diff --git a/connectivity/source/drivers/firebird/User.cxx b/connectivity/source/drivers/firebird/User.cxx index 024d7eb4958a..a2e6f71e3bed 100644 --- a/connectivity/source/drivers/firebird/User.cxx +++ b/connectivity/source/drivers/firebird/User.cxx @@ -16,15 +16,22 @@ using namespace ::connectivity::sdbcx; using namespace ::com::sun::star; using namespace ::com::sun::star::sdbc; -User::User(): +User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection): OUser(true) // Case Sensitive +, m_xConnection(rConnection) {} -User::User(const OUString& rName): +User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName): OUser(rName, true) // Case Sensitive +, m_xConnection(rConnection) {} +void User::changePassword(const OUString&, const OUString& newPassword) +{ +m_xConnection->createStatement()->execute("ALTER USER " + m_Name + " PASSWORD '" + newPassword + "'"); +} + //- IRefreshableGroups void User::refreshGroups() { diff --git a/connectivity/source/drivers/firebird/User.hxx b/connectivity/source/drivers/firebird/User.hxx index d2cc091000b9..ff1de34ea5fb 100644 --- a/connectivity/source/drivers/firebird/User.hxx +++ b/connectivity/source/drivers/firebird/User.hxx @@ -11,6 +11,7 @@ #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_USER_HXX #include +#include namespace connectivity { @@ -22,17 +23,19 @@ namespace connectivity */ class User: public ::connectivity::sdbcx::OUser { +css::uno::Reference< css::sdbc::XConnection > m_xConnection; public: /** * Create a "new" descriptor, which isn't yet in the database. */ -User(); +User(const css::uno::Reference< css::sdbc::XConnection >& rConnection); /** * For a user that already exists in the db. */ -User(const OUString& rName); +User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName); +virtual void SAL_CALL changePassword(const OUString&, const OUString& newPassword) override; // IRefreshableGroups:: virtual void refreshGroups() override; }; diff --git a/connectivity/source/drivers/firebird/Users.cxx b/connectivity/source/drivers/firebird/Users.cxx index 0423d9c33181..061200fde5d3 100644 --- a/connectivity/source/drivers/firebird/Users.cxx +++ b/connectivity/source/drivers/firebird/Users.cxx @@ -47,7 +47,7 @@ void Users::impl_refresh() ObjectType Users::createObject(const OUString& rName) { -return new User(rName); +return new User(m_xMetaData->getConnection(), rName); } uno::Reference< XPropertySet > Users::createDescriptor() @@ -55,7 +55,7 @@ uno::Reference< XPropertySet > Users::createDescriptor() // There is some internal magic so that the same class can be used as either // a descriptor or as a normal user. See VUser.cxx for the details. In our // case we just need to ensure we use the correct constructor. -return new User; +return new User(m_xMetaData->getConnection()); } //- XAppend --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/DatabaseMetaData.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 92438b37a470b603642775fb44dc08b8f6b78042 Author: Julien Nabet AuthorDate: Sun Mar 8 13:58:35 2020 +0100 Commit: Lionel Elie Mamane CommitDate: Sun Mar 8 18:27:43 2020 +0100 tdf#131217: position arg in Blob::getBytes begins at 1 not 0 (Firebird) See part of bt here: https://bugs.documentfoundation.org/show_bug.cgi?id=131217#c5 According to: https://cgit.freedesktop.org/libreoffice/core/commit/?id=38ce989b4f9d2aead097e5a2e95b819def7e2624 position can't be 0 Change-Id: Ia7bf973b820b8642b45eb0bbc125011cab99de9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90186 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit bb51f81507a405266d251297684bd3ab60998197) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90036 Reviewed-by: Lionel Elie Mamane diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index b2ca13fb56f3..3d0401678d60 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1247,7 +1247,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( if (xDescriptionBlob.is()) { sal_Int32 aBlobLength = static_cast(xDescriptionBlob->length()); -aDescription = OUString(reinterpret_cast(xDescriptionBlob->getBytes(0, aBlobLength).getArray()), +aDescription = OUString(reinterpret_cast(xDescriptionBlob->getBytes(1, aBlobLength).getArray()), aBlobLength, RTL_TEXTENCODING_UTF8); } @@ -1414,7 +1414,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( // TODO: we should actually be using CLOB here instead. // However we haven't implemented CLOB yet, so use BLOB. sal_Int32 aBlobLength = static_cast(xBlob->length()); -sDescription = OUString(reinterpret_cast(xBlob->getBytes(0, aBlobLength).getArray()), +sDescription = OUString(reinterpret_cast(xBlob->getBytes(1, aBlobLength).getArray()), aBlobLength, RTL_TEXTENCODING_UTF8); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/Catalog.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ee5a599516e4c9480b5dbd0a471baa237c74b53d Author: Julien Nabet AuthorDate: Fri Mar 6 18:15:18 2020 +0100 Commit: Caolán McNamara CommitDate: Sat Mar 7 15:44:45 2020 +0100 tdf#131164: Fix crash on Tools>User Administration (Firebird) see https://bugs.documentfoundation.org/show_bug.cgi?id=131164#c8 Change-Id: If55a7b015e4e14575c3933a98c70ed4aaf4d7c73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90123 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit dada19a89cbdc5f089fe1200275a1688a1ff1967) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90032 Reviewed-by: Caolán McNamara diff --git a/connectivity/source/drivers/firebird/Catalog.cxx b/connectivity/source/drivers/firebird/Catalog.cxx index 7dc3593d577a..6207625296f6 100644 --- a/connectivity/source/drivers/firebird/Catalog.cxx +++ b/connectivity/source/drivers/firebird/Catalog.cxx @@ -71,8 +71,8 @@ void Catalog::refreshUsers() { OUString const sSql("SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES"); -uno::Reference< XResultSet > xUsers = m_xMetaData->getConnection() - ->createStatement()->executeQuery(sSql); +Reference xStmt= m_xMetaData->getConnection()->createStatement(); +uno::Reference< XResultSet > xUsers = xStmt->executeQuery(sSql); if (!xUsers.is()) return; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/postgresql/pq_connection.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 145f5297c705f7f7cde999149c288f07852fcd87 Author: Julien Nabet AuthorDate: Sun Feb 23 17:36:14 2020 +0100 Commit: Noel Grandin CommitDate: Mon Feb 24 09:26:06 2020 +0100 Postgresql native, fix readLogLevelFromConfiguration With: osl_getModuleURLFromFunctionAddress( reinterpret_cast(readLogLevelFromConfiguration), &fileName.pData ); The method retrieves the path to libpostgresql-sdbc-impllo.so, eg: file:///home/julien/lo/libreoffice/instdir/program/libpostgresql-sdbc-impllo.so but then instead of retrieving path + "postgresql-sdbc.ini" we obtained ".so" filename + "postgresql-sdbc.ini"=> libpostgresql-sdbc-impllo.sopostgresql-sdbc.ini Regression from 1bdb2b6f06c556b9af91dba4f29f3ac73190b09e author Noel Grandin 2013-11-04 13:51:21 +0200 committer Noel Grandin 2013-11-11 11:21:25 +0200 commit 1bdb2b6f06c556b9af91dba4f29f3ac73190b09e (patch) tree1d941e17952cd891f5309fd862215dd09a84b001 parent 2f2416ff060c780ad87b4d3979112f52da2ae902 (diff) remove unnecessary use of OUString constructor in CONNECTIVITY module Change-Id: Ie7be4b1078760f94d34dd1f6cb9932bd7fa70962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89303 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit abf44a9ddd084952bde4609e3f6d386f7916b68a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89275 Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 56670cef1aa5..89baa0799202 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -131,7 +131,7 @@ static LogLevel readLogLevelFromConfiguration() OUString fileName; osl_getModuleURLFromFunctionAddress( reinterpret_cast(readLogLevelFromConfiguration), &fileName.pData ); -fileName = fileName.copy( fileName.lastIndexOf( '/' )+1 ) + +fileName = fileName.copy( 0, fileName.lastIndexOf( '/' )+1 ) + #ifdef MACOSX "../Resources/" #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 08eede3a026e8d788a5f877c5fd646e685fd0d5e Author: Julien Nabet AuthorDate: Sun Feb 16 13:36:45 2020 +0100 Commit: Xisco Faulí CommitDate: Mon Feb 17 11:25:33 2020 +0100 tdf#130708: Firebird: fix wrong precision and scale for DECIMAL and NUMERIC See https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-datatypes.html Change-Id: I2377679bb925425ceb0bf80c5309005421fe2c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88778 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit 4605dfa29649864638187940de4d1064ff056ac8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88786 Reviewed-by: Xisco Faulí diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index c152694a5963..b2ca13fb56f3 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -934,16 +934,16 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() // Numeric aRow[1] = new ORowSetValueDecorator(OUString("NUMERIC")); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); -aRow[3] = new ORowSetValueDecorator(sal_Int16(15)); // Precision -aRow[14] = new ORowSetValueDecorator(sal_Int16(1)); // Minimum scale -aRow[15] = new ORowSetValueDecorator(sal_Int16(15)); // Max scale +aRow[3] = new ORowSetValueDecorator(sal_Int16(18)); // Precision +aRow[14] = new ORowSetValueDecorator(sal_Int16(0)); // Minimum scale +aRow[15] = new ORowSetValueDecorator(sal_Int16(18)); // Max scale tmp.push_back(aRow); // Decimal aRow[1] = new ORowSetValueDecorator(OUString("DECIMAL")); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); -aRow[3] = new ORowSetValueDecorator(sal_Int16(15)); // Precision -aRow[14] = new ORowSetValueDecorator(sal_Int16(1)); // Minimum scale -aRow[15] = new ORowSetValueDecorator(sal_Int16(15)); // Max scale +aRow[3] = new ORowSetValueDecorator(sal_Int16(18)); // Precision +aRow[14] = new ORowSetValueDecorator(sal_Int16(0)); // Minimum scale +aRow[15] = new ORowSetValueDecorator(sal_Int16(18)); // Max scale tmp.push_back(aRow); aRow[6] = new ORowSetValueDecorator(); // Create Params ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit b89ccad446a28cf1a2396836199a6f8a4f77903b Author: Julien Nabet AuthorDate: Fri Nov 29 17:45:01 2019 +0100 Commit: Xisco Faulí CommitDate: Wed Dec 18 11:05:19 2019 +0100 Related tdf#128974: Really deal with "default" and "default-release" profiles See https://support.mozilla.org/gl/questions/1264072 for some background info. Change-Id: I4939a0c9a8ad09753de4a152f464c647ec637f31 Reviewed-on: https://gerrit.libreoffice.org/84077 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit a3822a44100ddba8b5f1e0cdd469a89244eaf498) Reviewed-on: https://gerrit.libreoffice.org/84085 Reviewed-by: Xisco Faulí diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index b34eaafc3e46..6f17ab137177 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -133,6 +133,16 @@ namespace connectivity } +// Depending on TB versions, some generate "default" profile +// others "default-release" profile +// See https://support.mozilla.org/gl/questions/1264072 +// for some background info (the link quotes Firefox but it seems +// the same for TB). +if (profileName == "default-release") +{ +rProduct.mCurrentProfileName = profileName; +break; +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c7832ada6cf7264602064da9a957c03f89732f34 Author: Julien Nabet AuthorDate: Tue Nov 26 23:37:23 2019 +0100 Commit: Xisco Faulí CommitDate: Mon Dec 2 09:14:43 2019 +0100 In the same way as 97ad402d58b52a1f2636905137c21298531c2935 OPreparedStatement::setDate works but let's use good habits. Change-Id: Ic410910ea138cc23d7f33bccd96812efd041732c Reviewed-on: https://gerrit.libreoffice.org/83842 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit 4895e01dee323d97d5573a6a2ff4696c3e7bcd25) Reviewed-on: https://gerrit.libreoffice.org/84134 Reviewed-by: Xisco Faulí diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx index 7cdd19667f30..68911564e1ec 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx @@ -249,7 +249,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkParameterIndex(parameter); -MYSQL_TIME my_time; +MYSQL_TIME my_time = {}; my_time.year = aData.Year; my_time.month = aData.Month; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - connectivity/source
connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ef80d47c38a7adeae3b4122ecfae8fd99773bff7 Author: Julien Nabet AuthorDate: Tue Nov 26 18:45:52 2019 +0100 Commit: Lionel Elie Mamane CommitDate: Wed Nov 27 05:27:04 2019 +0100 tdf#128698: MySQL/MariaDB direct Connection: time-values not written to table Initialize MYSQL_TIME my_time structure before using it Same idea as part of f4393330b2bbebc7290b72ad2f5b81d26244ac64 but by using modern initialization instead of memset Change-Id: Ife9741604e7bf8f0fbe4671ddb16a56204f4fa43 Reviewed-on: https://gerrit.libreoffice.org/83811 (cherry picked from commit 97ad402d58b52a1f2636905137c21298531c2935) Reviewed-on: https://gerrit.libreoffice.org/83840 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx index 902a1d93edb0..7cdd19667f30 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx @@ -267,7 +267,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal) checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkParameterIndex(parameter); -MYSQL_TIME my_time; +MYSQL_TIME my_time = {}; my_time.hour = aVal.Hours; my_time.minute = aVal.Minutes; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits