Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0014060 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Y. DBSourceManager | major | have not tried | 2010-07-27 10:57 | 2010-08-11 00:00 | |||
Reporter | marvintm | View Status | public | |||||
Assigned To | marvintm | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 2.50MP21 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 3324bf350dfe | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0014060: update.database will fail when recreating the table if a column had an illegal datatype | |||||||
Description | Right now, if a column has an illegal datatype, the export.database will fail with a clear error. However, this was not the case in previous versions of dbsourcemanager. This means that there could be modules out there with illegal datatypes in their physical columns (usually identified by being of type "VARCHAR" with length 0). Update.database will attempt to create the table with that incorrect type (VARCHAR(0)), and will of course fail. This could lead to data loss. | |||||||
Steps To Reproduce | In an old version of Openbravo, export a table with a column of type "INTEGER" in PostgreSQL. Verify that it is indeed exported with type "VARCHAR 0". Then, try to do update.database. The table creation will fail, and data could be lost. | |||||||
Proposed Solution | Update.database will do a validation while initializing the model. If it finds out an illegal type in the XML files, it will stop without doing anything to the database. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0029615) hgbot (developer) 2010-07-27 17:35 |
Repository: erp/devel/pi Changeset: c1df94e38a27320896984f63a13fe99ae12428e7 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Tue Jul 27 17:32:06 2010 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/c1df94e38a27320896984f63a13fe99ae12428e7 [^] Fixed issue 14060. Changed handling of illegal datatypes Now, both update.database and update.database.mod will fail early if an illegal datatype is detected either in the database or in the XML files, therefore minimizing the risk of data loss. Before, the change was attempted, usually ending in failure, and in some cases, with loss of data, due to failed recreation of the table. --- M src-db/database/lib/dbsourcemanager.jar --- |
(0029618) hgbot (developer) 2010-07-27 18:10 |
Repository: erp/devel/dbsm-main Changeset: 3324bf350dfed9decea6c9ee76a000ca9b6b2033 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Tue Jul 27 17:26:16 2010 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3324bf350dfed9decea6c9ee76a000ca9b6b2033 [^] Fixed issue 14060. Changed handling of illegal datatypes Now, both update.database and update.database.mod will fail early if an illegal datatype is detected either in the database or in the XML files, therefore minimizing the risk of data loss. Before, the change was attempted, usually ending in failure, and in some cases, with loss of data, due to failed recreation of the table. --- M src/org/apache/ddlutils/model/Database.java M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java --- |
(0029623) hudsonbot (viewer) 2010-07-27 23:48 |
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated: Changeset: http://code.openbravo.com/erp/devel/main/rev/c1df94e38a27 [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/5cf2bb15d5b1 [^] Tests: http://builds.openbravo.com/view/int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17927.obx [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2010-07-27 10:57 | marvintm | New Issue | |
2010-07-27 10:57 | marvintm | Assigned To | => marvintm |
2010-07-27 10:57 | marvintm | OBNetwork customer | => No |
2010-07-27 17:35 | hgbot | Checkin | |
2010-07-27 17:35 | hgbot | Note Added: 0029615 | |
2010-07-27 17:35 | hgbot | Status | new => resolved |
2010-07-27 17:35 | hgbot | Resolution | open => fixed |
2010-07-27 17:35 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c1df94e38a27320896984f63a13fe99ae12428e7 [^] |
2010-07-27 18:10 | hgbot | Checkin | |
2010-07-27 18:10 | hgbot | Note Added: 0029618 | |
2010-07-27 18:10 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/c1df94e38a27320896984f63a13fe99ae12428e7 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/3324bf350dfed9decea6c9ee76a000ca9b6b2033 [^] |
2010-07-27 23:48 | hudsonbot | Checkin | |
2010-07-27 23:48 | hudsonbot | Note Added: 0029623 | |
2010-08-10 16:15 | alostale | Status | resolved => closed |
2010-08-10 16:15 | alostale | Fixed in Version | => 2.50MP21 |
2010-08-11 00:00 | anonymous | sf_bug_id | 0 => 3042776 |
Copyright © 2000 - 2009 MantisBT Group |