[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - connectivity/source
Julien Nabet
serval2412 at yahoo.fr
Tue May 30 07:21:37 UTC 2017
connectivity/source/drivers/firebird/Table.cxx | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 7b7c43f3c86eeeb7c092621464a747604a1cd48a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu May 25 10:14:30 2017 +0200
Related tdf#108068: Use new name of column when it's been changed
First fix simple case, the rename of a column which is not a primary key
Change-Id: Ia0de8e531021cbec0409408008c541c25a4bcd85
Reviewed-on: https://gerrit.libreoffice.org/38014
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit c751318868f3f0082b2c86df493216d452b8ecc5)
Reviewed-on: https://gerrit.libreoffice.org/38023
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx
index fea904630ffb..21a59e4ee0c2 100644
--- a/connectivity/source/drivers/firebird/Table.cxx
+++ b/connectivity/source/drivers/firebird/Table.cxx
@@ -133,17 +133,6 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
bool bDefaultChanged = xColumn->getPropertyValue("DefaultValue")
!= rDescriptor->getPropertyValue("DefaultValue");
- // TODO: quote identifiers as needed.
- if (bNameChanged)
- {
- OUString sNewTableName;
- rDescriptor->getPropertyValue("Name") >>= sNewTableName;
- OUString sSql(getAlterTableColumn(rColName)
- + " TO \"" + sNewTableName + "\"");
-
- getConnection()->createStatement()->execute(sSql);
- }
-
if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged)
{
// If bPrecisionChanged this will only succeed if we have increased the
@@ -217,6 +206,17 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
getConnection()->createStatement()->execute(sSql);
}
+ // TODO: quote identifiers as needed.
+ if (bNameChanged)
+ {
+ OUString sNewTableName;
+ rDescriptor->getPropertyValue("Name") >>= sNewTableName;
+ OUString sSql(getAlterTableColumn(rColName)
+ + " TO \"" + sNewTableName + "\"");
+
+ getConnection()->createStatement()->execute(sSql);
+ }
+
m_pColumns->refresh();
}
More information about the Libreoffice-commits
mailing list