Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-69507

Upgrading to Confluence 7.13.0 will fail when the database name involves a hyphen in MySQL Database

      We don't plan to backport the fix for this bug to earlier Long Term Support versions

      The fix for this bug isn't suitable for backporting to a bug fix release for any previous LTS versions. This is often because the fix is considered too high risk to implement in an older version.

      The fix for this issue will be included in future Long Term Support versions.

      Problem

      Upgrading to Confluence 7.13.0 will fail when the database name involves a hyphen in MySQL Database

      Environment

      • MySQL 8.0
      • JDBC driver 8.0.22

      Steps to Reproduce

      1. Setup MySQL 8.0 per this documentation
      2. Install Confluence 7.10.0 with MySQL
      3. Create the Confluence database name with a hyphen in it such as confl7100-test
      4. Stop Confluence and upgrade to Confluence to 7.13.0

      Expected Results

      Confluence is upgraded successfully

      Actual Results

      Confluence upgrade fails with the error message below in atlassian-confluence.log

      2021-09-21 12:28:59,129 ERROR [perm-delta-cache-receiver] [engine.jdbc.spi.SqlExceptionHelper] logExceptions Unknown column 'this_.external_id' in 'field list'
      
      2021-09-21 12:28:59,146 ERROR [perm-delta-cache-receiver] [gatekeeper.evaluator.cache.CacheUpdateReceiver] error Failed to initialize evaluator cache
      org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      	at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:228)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:388)
      	at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:337)
      	at com.atlassian.crowd.embedded.hibernate2.HibernateGroupDao.internalFindByName(HibernateGroupDao.java:479)
      	at com.atlassian.crowd.embedded.hibernate2.HibernateGroupDao.findByName(HibernateGroupDao.java:82)
      	at com.atlassian.confluence.impl.user.crowd.CachedCrowdGroupDao.findGroupInternal(CachedCrowdGroupDao.java:78)
      	at com.atlassian.confluence.impl.user.crowd.CachedCrowdGroupDao.lambda$findGroup$0(CachedCrowdGroupDao.java:101)
      	at com.atlassian.confluence.cache.CacheOperations.lambda$get$0(CacheOperations.java:172)
      	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
      	at com.atlassian.confluence.cache.CacheOperations.get(CacheOperations.java:172)
      	at com.atlassian.confluence.cache.DeferredOperationsCache.getOrLoad(DeferredOperationsCache.java:93)
      	at com.atlassian.confluence.cache.DeferredOperationsCache.get(DeferredOperationsCache.java:57)
      	at com.atlassian.confluence.cache.TransactionalCacheFactory$TransactionalCache.get(TransactionalCacheFactory.java:343)
      	at com.atlassian.confluence.impl.cache.tx.TransactionAwareCache$1.get(TransactionAwareCache.java:43)
      	at com.atlassian.confluence.impl.user.crowd.CachedCrowdGroupDao.findGroup(CachedCrowdGroupDao.java:101)
      	at com.atlassian.confluence.impl.user.crowd.CachedCrowdGroupDao.findByName(CachedCrowdGroupDao.java:113)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy98.findByName(Unknown Source)
      	at com.atlassian.crowd.directory.AbstractInternalDirectory.findGroupByName(AbstractInternalDirectory.java:709)
      	at com.atlassian.crowd.directory.AbstractInternalDirectory.findGroupByName(AbstractInternalDirectory.java:64)
      	at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findGroupByName(DirectoryManagerGeneric.java:497)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findByName(CanonicalEntityByNameFinder.java:106)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findByName(CanonicalEntityByNameFinder.java:92)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findGroupByName(CanonicalEntityByNameFinder.java:66)
      	at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findGroupByName(ApplicationServiceGeneric.java:653)
      	at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getGroup(CrowdServiceImpl.java:135)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy107.getGroup(Unknown Source)
      	at com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.getGroup(EmbeddedCrowdGroupManager.java:108)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy145.getGroup(Unknown Source)
      	at bucket.user.DefaultUserAccessor.getGroup(DefaultUserAccessor.java:257)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy92.getGroup(Unknown Source)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy536.getGroup(Unknown Source)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy2886.getGroup(Unknown Source)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.GroupMembersCache.getGroupMembersFromApi(GroupMembersCache.java:85)
      	at java.base/java.util.Map.computeIfAbsent(Map.java:1003)
      	at java.base/java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2682)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.GroupMembersCache.get(GroupMembersCache.java:105)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheImpl.hasUserCanUse(EvaluatorCacheImpl.java:209)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.UserCache.finish(UserCache.java:176)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheImpl.finish(EvaluatorCacheImpl.java:169)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheImpl.<init>(EvaluatorCacheImpl.java:85)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheFactoryImpl.lambda$createInstance$0(EvaluatorCacheFactoryImpl.java:38)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
      	at jdk.internal.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy272.execute(Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy2885.execute(Unknown Source)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheFactoryImpl.createInstance(EvaluatorCacheFactoryImpl.java:36)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.initCache(CacheUpdateReceiver.java:85)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.processAnyEvents(CacheUpdateReceiver.java:113)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.run(CacheUpdateReceiver.java:98)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
      	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
      	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69)
      	at org.hibernate.loader.Loader.getResultSet(Loader.java:2168)
      	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1931)
      	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1893)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:938)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)
      	at org.hibernate.loader.Loader.doList(Loader.java:2692)
      	at org.hibernate.loader.Loader.doList(Loader.java:2675)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2507)
      	at org.hibernate.loader.Loader.list(Loader.java:2502)
      	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
      	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1936)
      	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:370)
      	at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:392)
      	at com.atlassian.crowd.embedded.hibernate2.HibernateGroupDao.lambda$internalFindByName$17(HibernateGroupDao.java:483)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:385)
      	... 154 more
      Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'this_.external_id' in 'field list'
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
      	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60)
      	... 169 more
      

      Workaround

      1. Roll back the database and Confluence home&install directories to the pre-upgrade state.
      2. Update the database name and remove the hyphen from the name in MySQL
      3. Update the confluence.cfg.xml file with the new name

      Notes

      The atlassian-confluence.log will be spammed rapidly with the error message.

            [CONFSERVER-69507] Upgrading to Confluence 7.13.0 will fail when the database name involves a hyphen in MySQL Database

            A fix for this issue is available in Confluence Server and Data Center 8.0.0.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Server and Data Center 8.0.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi All,

            Resolving this issue requires upgrading an underlying core library, which is a breaking change. Breaking changes are only introduced in major version releases, such as Confluence 8.0.0.

            As a result, this change cannot be backported to older versions of Confluence.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, Resolving this issue requires upgrading an underlying core library, which is a breaking change. Breaking changes are only introduced in major version releases, such as Confluence 8.0.0. As a result, this change cannot be backported to older versions of Confluence. Thanks, James Ponting Engineering Manager - Confluence Data Center

            SamLe added a comment -

            If you used Option 2 from CONFSERVER-65134 to upgrade previously; then subsequent upgrades (eg. 7.13.0 to 7.15.0) will fail even though you've added the external_id column. 
            However, to prevent/resolve this issue, follow these steps:

            1. (If you've already attempted an upgrade, then unfortunately you'll need to start by rolling back your version and database to whatever stable version you had before attempting the upgrade.)
            2. Run the following query to manually create the FINALIZED column
              • ALTER TABLE [your_database_name].[your_schema_name].CONFVERSION ADD FINALIZED CHAR (1) NOT NULL DEFAULT 'N';
            3. After creating the column, you need to insert a value to the column as the column does not allow null value
              • update CONFVERSION SET FINALIZED = 'N';
            4. Run the following query to manually create the ORIG_BUILD_NUMBER column
              • ALTER TABLE [your_database_name].[your_schema_name].CONFZDU ADD ORIG_BUILD_NUMBER INT NOT NULL DEFAULT 0;
              •  Based on tests, there isn't really a need to add the default value 0 to the ORIG_BUILD_NUMBER
            5. Once the these columns are created, you can attempt/re-attempt the upgrade.

            SamLe added a comment - If you used Option 2 from CONFSERVER-65134 to upgrade previously; then subsequent upgrades (eg. 7.13.0 to 7.15.0) will fail even though you've added the external_id column.  However, to prevent/resolve this issue, follow these steps: (If you've already attempted an upgrade, then unfortunately you'll need to start by rolling back your version and database to whatever stable version you had before attempting the upgrade.) Run the following query to manually create the  FINALIZED  column ALTER TABLE [your_database_name] . [your_schema_name] .CONFVERSION ADD FINALIZED CHAR (1) NOT NULL DEFAULT 'N'; After creating the column, you need to insert a value to the column as the column does not allow null value update CONFVERSION SET FINALIZED = 'N'; Run the following query to manually create the  ORIG_BUILD_NUMBER  column ALTER TABLE [your_database_name] . [your_schema_name] .CONFZDU ADD ORIG_BUILD_NUMBER INT NOT NULL DEFAULT 0;  Based on tests, there isn't really a need to add the default value 0 to the ORIG_BUILD_NUMBER Once the these columns are created, you can attempt/re-attempt the upgrade.

            We believe this may affect us when moving to 7.13.1 or 7.13.2. We have tested upgrading from 7.12.2 to 7.13.1/.2

            We are unable to change the database name though as it's deployed via AWS RDS. This means the hyphen in the DB path where the region is shown cannot be changed easily e.g. databasename.eu-east-1.amazon.com

            James Beagrie added a comment - We believe this may affect us when moving to 7.13.1 or 7.13.2. We have tested upgrading from 7.12.2 to 7.13.1/.2 We are unable to change the database name though as it's deployed via AWS RDS. This means the hyphen in the DB path where the region is shown cannot be changed easily e.g. databasename.eu-east-1.amazon.com

              bhyde Bradley Hyde
              lwang3@atlassian.com Lei Wang
              Affected customers:
              2 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: