-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 5.2.10, 6.3, 6.3.7, 6.4, 7.3.0
-
Component/s: Installation
-
5.02
-
13
-
Severity 3 - Minor
-
0
Summary
During JIRA startup it executes DB configuration - this is reporting as OK using a MySQL DB with a schema when it's not OK.
Environment
- Ubuntu.
- MySQL 5.1.41.
Steps to Reproduce
- Install a version of JIRA that is not the latest using MySQL.
- Stop it.
- Add a schema to the dbconfig.xml, e.g.:
<schema-name>jiradb</schema-name>
- Upgrade it to the latest version.
- Start JIRA.
Expected Results
It notifies the user of an error in the log files that the MySQL configuration is incorrect and requires fixing.
Actual Results
It reports as OK, even though it's not:
2013-04-15 13:29:30,665 localhost-startStop-1 WARN [core.entity.jdbc.DatabaseUtil] Entity "Worklog" has no table in the database
2013-04-15 13:29:30,666 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] Could not create table "jiradb.worklog"
2013-04-15 13:29:30,666 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE jiradb.worklog (ID DECIMAL(18,0) NOT NULL, issueid DECIMAL(18,0), AUTHOR VARCHAR(255), grouplevel VARCHAR(255), rolelevel DECIMAL(18,0), worklogbody LONGTEXT, CREATED DATETIME, UPDATEAUTHOR VARCHAR(255), UPDATED DATETIME, STARTDATE DATETIME, timeworked DECIMAL(18,0), CONSTRAINT PK_worklog PRIMARY KEY (ID))
Error was: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'worklog' already exists
2013-04-15 13:29:31,103 localhost-startStop-1 INFO [core.entity.jdbc.DatabaseUtil] Created declared indices for entity "ApplicationUser"
2013-04-15 13:29:31,355 localhost-startStop-1 INFO [core.entity.jdbc.DatabaseUtil] Created declared indices for entity "DraftWorkflowScheme"
2013-04-15 13:29:31,614 localhost-startStop-1 INFO [core.entity.jdbc.DatabaseUtil] Created declared indices for entity "DraftWorkflowSchemeEntity"
2013-04-15 13:29:31,874 localhost-startStop-1 INFO [core.entity.jdbc.DatabaseUtil] Created declared indices for entity "Feature"
2013-04-15 13:29:32,133 localhost-startStop-1 INFO [core.entity.jdbc.DatabaseUtil] Created declared indices for entity "ManagedConfigurationItem"
2013-04-15 13:29:32,527 localhost-startStop-1 INFO [atlassian.jira.startup.DatabaseChecklistLauncher] JIRA database startup checks completed successfully.
2013-04-15 13:29:32,528 localhost-startStop-1 INFO [jira.config.database.DatabaseConfigurationManagerImpl] Now running Post database-configuration launchers
2013-04-15 13:29:33,251 localhost-startStop-1 INFO [jira.config.database.SystemTenantDatabaseConfigurationLoader] Reading database configuration from /var/atlassian/application-data/jira/dbconfig.xml
2013-04-15 13:29:33,849 localhost-startStop-1 INFO [atlassian.jira.startup.DatabaseLauncher] Database transactions enabled: true
2013-04-15 13:29:33,850 localhost-startStop-1 INFO [atlassian.jira.startup.DatabaseLauncher] Using JIRA's default for database transaction isolation level: 2
2013-04-15 13:29:33,852 localhost-startStop-1 INFO [atlassian.jira.startup.JiraStartupLogger]
Database configuration OK
___ Database Configuration _________________
Loading entityengine.xml from : file:/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/entityengine.xml
Entity model field type name : mysql
Entity model schema name : jiradb
Database Version : MySQL - 5.1.41-3ubuntu12.8
Database Driver : MySQL-AB JDBC Driver - mysql-connector-java-5.1.10 ( Revision: ${svn.Revision} )
Database URL : jdbc:mysql://allurbase:3306/jiradb?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB
Database JDBC config : mysql jdbc:mysql://allurbase:3306/jiradb?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB
2013-04-15 13:29:35,695 localhost-startStop-1 INFO [atlassian.jira.startup.JiraStartupLogger]
Notes
This can lead to a failed upgrade as the DB cannot create the new columns that the auto-export functionality expects to be there, as per a previous bug, JRA-28526.
Workaround
Remove the invalid schema element <schema-name>...</schema-name> in dbconfig.xml.