View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009298 | mantisbt | upgrade | public | 2008-06-24 22:34 | 2009-01-15 11:25 |
| Reporter | michield | Assigned To | jreese | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.1.2 | ||||
| Target Version | 1.2.0a3 | Fixed in Version | 1.2.0a3 | ||
| Summary | 0009298: upgrade from 1.1.2 to 1.2.0a1 fails | ||||
| Description | I tried upgrading from 1.1.2 to 1.2.0a1 and here are the results:
I get APPLICATION ERROR 0000401 Database query failed. Error received from database was 0001062: Duplicate entry '1-bugtracker' for key 2 for the query: INSERT INTO mantis_category_table ( name, project_id ) VALUES ( 'bugtracker', 1 )
category_migrate; ALTER TABLE mantis_bug_table DROP COLUMN category; DROP TABLE IF EXISTS mantis_project_category_table; ALTER TABLE mantis_project_table ADD category_id INTEGER UNSIGNED NOT NULL DEFAULT 1; INSERT INTO mantis_plugin_table ALTER TABLE mantis_project_table ADD inherit_global INTEGER UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE mantis_project_hierarchy_table ADD inherit_parent INTEGER UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE mantis_plugin_table ADD protected TINYINT NOT NULL DEFAULT '0'; ALTER TABLE mantis_plugin_table ADD priority INTEGER UNSIGNED NOT NULL DEFAULT 3; ALTER TABLE mantis_project_version_table ADD obsolete TINYINT NOT NULL DEFAULT '0'; ALTER TABLE mantis_bug_table ADD due_date DATETIME NOT NULL DEFAULT '1970-01-01'; INSERT INTO mantis_config_table ( value, type, access_reqd, config_id, project_id, user_id ) VALUES ('82', 1, 90, 'database_version', 20, 0 ); I presume the "category_migrate" is a stored procedure, but I'm a bit afraid this will wipe all my categories, so I didn't apply any of it. doing "select count(*) from mantis_category_table;" returns 170 entries. I reverted back to 1.1.2 for now. | ||||
| Tags | No tags attached. | ||||
|
another thing, when using the "system_utils" in the admin pages, I get APPLICATION ERROR 0000401 Database query failed. Error received from database was #1054: Unknown column 'priority' in 'field list' for the query: SELECT basename, priority, protected FROM mantis_plugin_table WHERE enabled=1 ORDER BY priority DESC |
|
|
I tried deleting all entries in the mantis_category_table (thinking they might be there from some previous attempt or something) but that didn't help: Tried again and got Database query failed. Error received from database was 0001062: Duplicate entry '4-templates' for key 2 for the query: INSERT INTO mantis_category_table ( name, project_id ) VALUES ( 'templates', 4 ) So, I guess in "install_functions.php" on line 59, the query needs an "IGNORE" $query = "INSERT IGNORE INTO $t_category_table ( name, project_id ) VALUES ( " . db_param(0) . ', ' . db_param(1) . ' )'; but in that case you need to check that $t_category_id = db_insert_id( $t_category_table ); actually returns something and skip the next SQL query if it didn't. That's safe to do, as the query will actually update all entries that match the name of the category and the project ID, so it'll replace all duplicates. if ($t_category_id) { |
|
|
John can you look into what causes this? Paul |
|
|
michield, Do you still have access to the data set that was generating this error? Paul |
|
|
yes, I still have the DB lying around, but if you want, I can also reproduce the error. All I did was take my 1.1.x installation, copy the DB to a new one, and configure the 1.2.x code to use the copy. |
|