diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-01-10 23:24:01 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2018-01-11 13:28:30 +0100 |
commit | 2481e7dd49b8c8fe0dc97ff86a2a35267c2c06d3 (patch) | |
tree | 55786d64fd47c26a77a46cf81c79e192eee11b87 /dbaccess | |
parent | d45631314cef00008a538900800561b435202917 (diff) |
tdf#114955: Fix primary key management in copy table
When we chose to create a primary key, be sure the other existing
columns won't be in primary key
Change-Id: I523f1b3a4b56c92d48b65cb3d83793b5459c630c
Reviewed-on: https://gerrit.libreoffice.org/47732
(cherry picked from commit 2711f7639811929fc9ea8dc168ea28f1c5545e67)
Change-Id: I966b08ad4049c46f4a77812c48ff651b13ea7493
Reviewed-on: https://gerrit.libreoffice.org/47745
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index abc1205d998b..64b28edf9c0a 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -774,6 +774,10 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) { if ( m_bAddPKFirstTime ) { + // tdf#114955: since we chose to create a primary key + // be sure all other columns won't be in primary key + for (auto const& elem : m_vDestColumns) + elem.second->SetPrimaryKey(false); OFieldDescription* pField = new OFieldDescription(); pField->SetName(m_aKeyName); pField->FillFromTypeInfo(pTypeInfo,true,true); |