[Libreoffice-commits] core.git: 2 commits - connectivity/source dbaccess/source
Tamas Bunth (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 3 18:00:11 UTC 2019
connectivity/source/drivers/mysqlc/mysqlc_connection.cxx | 3 ++-
dbaccess/source/ui/inc/DExport.hxx | 3 ---
dbaccess/source/ui/uno/copytablewizard.cxx | 6 ------
3 files changed, 2 insertions(+), 10 deletions(-)
New commits:
commit 91a97c5e0b7b760ec0b46ad38b28ec1419c7d48f
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Tue Sep 3 15:29:55 2019 +0200
Commit: Tamás Bunth <btomi96 at gmail.com>
CommitDate: Tue Sep 3 19:59:17 2019 +0200
tdf#127093 mysqlc: set NO_AUTO_VALUE_ON_ZERO
Without setting this sql_mode, NULL or 0 inserted to an auto-incremented column
of a prepared statement would cause that to be auto generated.
Setting NO_AUTO_VALUE_ON_ZERO allows us to copy/paste auto-incremented
columns which may contain zero values as well.
Change-Id: I9602746371c75c82c99ff63240025e8cfb03776a
Reviewed-on: https://gerrit.libreoffice.org/78560
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 193cc1c6ffe2..a9d4438dfa97 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -196,7 +196,8 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>&
*this, OUString(), 0, Any());
}
- lcl_executeUpdate(&m_mysql, OString{ "SET session sql_mode='ANSI_QUOTES'" });
+ lcl_executeUpdate(&m_mysql,
+ OString{ "SET session sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'" });
lcl_executeUpdate(&m_mysql, OString{ "SET NAMES utf8" });
}
commit d783017c1ccb4e62e99f26b42250ac4e15780cff
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Tue Sep 3 15:28:05 2019 +0200
Commit: Tamás Bunth <btomi96 at gmail.com>
CommitDate: Tue Sep 3 19:59:07 2019 +0200
Revert "tdf#127093, tdf#127092 Fix pasting autoincremented"
This reverts commit fa177231cd20bf3c3f4bb9b50f6646da139c6766.
Change-Id: Ia0c2d83c840c0ff8981b721766a6a1df810f971d
Reviewed-on: https://gerrit.libreoffice.org/78559
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx
index 7dbcbf31fc6a..397b527d6d7d 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -61,9 +61,6 @@ namespace dbaui
public:
typedef std::map<OUString, OFieldDescription*, ::comphelper::UStringMixLess> TColumns;
typedef std::vector<TColumns::const_iterator> TColumnVector;
-
- // first value is the position in the destination table. The second
- // value is the position of the column in the source table.
typedef std::vector< std::pair<sal_Int32,sal_Int32> > TPositions;
protected:
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 6abaa55f9d54..8565ce5949de 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1183,12 +1183,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
// otherwise we don't get the correct value when only the 2nd source column was selected
continue;
}
- else if( xMeta->isAutoIncrement( rColumnPos.second ) )
- {
- // it is auto incremented. Let the DBMS deal with it.
- ++nSourceColumn;
- continue;
- }
if ( ( nSourceColumn < 1 ) || ( nSourceColumn >= static_cast<sal_Int32>(aSourceColTypes.size()) ) )
{ // ( we have to check here against 1 because the parameters are 1 based)
More information about the Libreoffice-commits
mailing list