Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014060 | Openbravo ERP | Y. DBSourceManager | public | 2010-07-27 10:57 | 2010-08-11 00:00 |
|
Reporter | marvintm | |
Assigned To | marvintm | |
Priority | urgent | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 2.50MP21 | |
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. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
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 |
Notes |
|
(0029615)
|
hgbot
|
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
|
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
---
|
|
|
|
|