Details
-
Bug
-
Resolution: Done
-
Low
-
5.13.0.1, 5.14.3.1
-
Severity 2 - Major
-
Description
Summary
During an upgrade to 5.13 or greater, upgrade task 51301 : Change column names to uppercase on Microsoft SQL fails with 51301 : Change column names to uppercase on MS SQL. This occurs when the Containment Type of the database is Partial or Full (e.g. in Azure). Due to the system catalog being a case-insensitive collation, sp_rename to change the column casing thinks there is a duplicate and fails.
Environment
- Microsoft SQL 2012+ with a Containment type on the database of Partial or Full (Azure)
- Upgrade to Bamboo 5.13 or above
Steps to Reproduce
- Upgrade a Bamboo Microsoft SQL database with Partial containment type from a version older than 5.13 to a version >=5.13.
Expected Results
Upgrade succeeds.
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2016-12-19 12:01:58,310 INFO [localhost-startStop-1] [AbstractUpgradeManager] -------------------------------------------------- 2016-12-19 12:01:58,310 INFO [localhost-startStop-1] [AbstractUpgradeManager] 51301 : Change column names to uppercase on MS SQL 2016-12-19 12:01:58,310 INFO [localhost-startStop-1] [AbstractUpgradeManager] -------------------------------------------------- 2016-12-19 12:01:58,341 ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.sql.SQLException: Error: The new name 'ENTITY_NAME' is already in use as a COLUMN name and would cause a duplicate that is not permitted. java.sql.SQLException: Error: The new name 'ENTITY_NAME' is already in use as a COLUMN name and would cause a duplicate that is not permitted. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572) at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809) at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75) at com.atlassian.bamboo.utils.db.MsSqlDbmsBean.renameColumn(MsSqlDbmsBean.java:200) at com.atlassian.bamboo.upgrade.tasks.v5_13.UpgradeTask51301UpperCaseDbColumnNames.doUpgrade(UpgradeTask51301UpperCaseDbColumnNames.java:59)
Workaround
None
Attachments
Issue Links
- mentioned in
-
Page Loading...