Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0026487 | Openbravo ERP | Y. DBSourceManager | public | 2014-05-08 06:20 | 2014-06-10 22:24 |
Reporter | sjkumar | ||||
Assigned To | alostale | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | 3.0PR14Q3 | Fixed in Version | 3.0PR14Q3 | ||
Merge Request Status | |||||
Review Assigned To | marvintm | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0026487: update.database rebuilds unchanged tables (Oracle, charset UTF8) | ||||
Description | Logging this issue as per communication with Ivan Perdomo. Ant smartbuild building tables that has not been changed too. I installed some packages today and did an ant smartbuild -Dlocal=no - Dforce=true and noticed that is was needlessly rebuilding tables because they had not changed. On investigating the issue I noticed it looks like it is caused by something we noticed during training. Openbravo seems to be using the DATA_LENGTH column from user_tab_columns to determine column size instead of CHAR_LENGTH. The result of this is that it things any table with NVARCHAR2 or NCHAR data types has changed and rebuilds the table. The situation seems worse for NCHAR because that data type pads the value with spaces. Luckily there are only 2 tables that have NCHAR data type (C_UOM and C_UOM_TRL), So, for example, when the build comes to c_uom_trl which looks like this > >> (C_UOM_TRL_ID NOT NULL VARCHAR2(32) C_UOM_ID NOT NULL VARCHAR2(32) AD_LANGUAGE NOT NULL VARCHAR2(6) AD_CLIENT_ID NOT NULL VARCHAR2(32) AD_ORG_ID NOT NULL VARCHAR2(32) ISACTIVE NOT NULL CHAR(1) CREATED NOT NULL DATE CREATEDBY NOT NULL VARCHAR2(32) UPDATED NOT NULL DATE UPDATEDBY NOT NULL VARCHAR2(32) UOMSYMBOL NCHAR(3) NAME NOT NULL NVARCHAR2(60) DESCRIPTION NVARCHAR2(255) ISTRANSLATED NOT NULL CHAR(1) ) It decides that columns UOMSYMBOL,NAME,DESCRIPTION are the wrong size - it the case of UOMSYMBOL it thinks it is currently NCHAR9 instead of NCHAR3. So the build creates a temporary table like this and inserts data into it. (C_UOM_TRL_ID NOT NULL VARCHAR2(32) C_UOM_ID NOT NULL VARCHAR2(32) AD_LANGUAGE NOT NULL VARCHAR2(6) AD_CLIENT_ID NOT NULL VARCHAR2(32) AD_ORG_ID NOT NULL VARCHAR2(32) ISACTIVE NOT NULL CHAR(1) CREATED NOT NULL DATE CREATEDBY NOT NULL VARCHAR2(32) UPDATED NOT NULL DATE UPDATEDBY NOT NULL VARCHAR2(32) UOMSYMBOL *NCHAR(9)* NAME NOT NULL *NVARCHAR2(180)* DESCRIPTION *NVARCHAR2(765)* ISTRANSLATED NOT NULL CHAR(1) ) Next the build drops table C_UOM and recreates it exactly the same shape as it was before, then it tries to insert the data from the temp table back into the original table. The NVARCHAR columns are OK because number of bytes will still fit into the original table. But the NCHAR column will cause and error because the value has been padded to 9 characters, which is too large to fit in a column for 3 characters. So the build fails. I'm not sure if there is some setting somewhere which will handle this case. I assume there must be otherwise no one would have a clean build when they run smartbuild with local and force options | ||||
Steps To Reproduce | Please see the description. | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=6921&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=6946&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=6947&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=6960&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-05-08 06:20 | sjkumar | New Issue | |||
2014-05-08 06:20 | sjkumar | Assigned To | => marvintm | ||
2014-05-08 06:20 | sjkumar | Modules | => Core | ||
2014-05-08 06:20 | sjkumar | Triggers an Emergency Pack | => No | ||
2014-05-10 20:05 | sjkumar | File Added: update.log | |||
2014-05-10 20:05 | sjkumar | Note Added: 0067077 | |||
2014-05-23 21:02 | sjkumar | Note Added: 0067417 | |||
2014-05-23 21:03 | sjkumar | File Added: CharsetScreenShot.png | |||
2014-05-23 21:03 | sjkumar | File Added: update Issue 0026487.log | |||
2014-05-27 16:31 | alostale | Note Added: 0067481 | |||
2014-05-27 16:32 | alostale | Note Edited: 0067481 | bug_revision_view_page.php?bugnote_id=0067481#r5890 | ||
2014-05-27 16:33 | alostale | OBNetwork customer | => No | ||
2014-05-27 16:33 | alostale | Target Version | => PR14Q3 | ||
2014-05-27 17:45 | shuehner | Issue Monitored: shuehner | |||
2014-05-27 17:47 | alostale | Summary | Ant smartbuild building tables that has not been changed too => update.database rebuilds unchanged tables (Oracle, charset UTF8) | ||
2014-05-27 17:48 | alostale | OBNetwork customer | No => Yes | ||
2014-05-27 17:48 | alostale | Assigned To | marvintm => alostale | ||
2014-05-28 02:25 | johnfandl | Issue Monitored: johnfandl | |||
2014-05-28 13:13 | hgbot | Checkin | |||
2014-05-28 13:13 | hgbot | Note Added: 0067530 | |||
2014-05-28 13:13 | hgbot | Status | new => resolved | ||
2014-05-28 13:13 | hgbot | Resolution | open => fixed | ||
2014-05-28 13:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/fc1e0b6f0a4b8d06b8aed86d37a1fcaca1346ccf [^] | ||
2014-05-28 13:13 | hgbot | Checkin | |||
2014-05-28 13:13 | hgbot | Note Added: 0067531 | |||
2014-05-28 13:13 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/fc1e0b6f0a4b8d06b8aed86d37a1fcaca1346ccf [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/7116ef0da09d597de00749cc3976323452275f15 [^] | ||
2014-05-28 13:26 | alostale | Note Added: 0067533 | |||
2014-05-28 13:28 | alostale | Status | resolved => new | ||
2014-05-28 13:28 | alostale | Resolution | fixed => open | ||
2014-05-28 13:29 | alostale | File Added: test-ora-utf8.diff | |||
2014-05-28 13:29 | alostale | Review Assigned To | => marvintm | ||
2014-05-28 13:29 | alostale | Status | new => scheduled | ||
2014-05-28 13:29 | alostale | fix_in_branch | => pi | ||
2014-05-28 13:29 | alostale | Status | scheduled => resolved | ||
2014-05-28 13:29 | alostale | Fixed in Version | => PR14Q3 | ||
2014-05-28 13:29 | alostale | Resolution | open => fixed | ||
2014-05-29 23:01 | hudsonbot | Checkin | |||
2014-05-29 23:01 | hudsonbot | Note Added: 0067583 | |||
2014-06-09 08:30 | hgbot | Checkin | |||
2014-06-09 08:30 | hgbot | Note Added: 0067815 | |||
2014-06-09 10:48 | hgbot | Checkin | |||
2014-06-09 10:48 | hgbot | Note Added: 0067820 | |||
2014-06-09 10:51 | marvintm | Note Added: 0067821 | |||
2014-06-09 10:51 | marvintm | Status | resolved => closed | ||
2014-06-10 22:24 | hudsonbot | Checkin | |||
2014-06-10 22:24 | hudsonbot | Note Added: 0067889 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|