Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0035628 | Openbravo ERP | A. Platform | public | 2017-03-28 09:50 | 2017-03-31 09:04 | ||||||||||||||
Reporter | alostale | ||||||||||||||||||
Assigned To | alostale | ||||||||||||||||||
Priority | urgent | Severity | major | Reproducibility | sometimes | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | Fixed in Version | 3.0PR17Q2 | |||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | caristu | ||||||||||||||||||
OBNetwork customer | |||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | |||||||||||||||||||
Regression date | |||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0035628: ORA: sometimes update.database after install.source detects db changes | ||||||||||||||||||
Description | Using Oracle 12 in some occasions, update.database just after install source detects local structural DB changes. The problem is caused by Oracle's virtual columns [1] which are included within the CRC used to check local changes, as their names might not be consistent, they can cause this situation. (See below for more details) == Detailed analysis == Applying the attached debugging patch, install.source and update.database shows the following results when failing. -- last CRC OK select substr(obj_type,1,3), substr(obj_name,1,40), case when to_char(substr(old_value,1,4000)) = to_char(substr(new_value,1,4000)) then 'same values' else 'diff values' end from db_checksums where old_crc = new_crc and obj_type='col' and obj_name = (select max(obj_name) from db_checksums where old_crc = new_crc and obj_type='col') order by 2; type name same values ---- --------------------------- ----------- col AD_MODEL_OBJECT.UPDATEDBY same values -- first differenct CRC select substr(obj_type,1,3), substr(obj_name,1,40), case when to_char(substr(old_value,1,4000)) = to_char(substr(new_value,1,4000)) then 'same values' else 'diff values' end from db_checksums where old_crc != new_crc and obj_type='col' and obj_name = (select min(obj_name) from db_checksums where old_crc != new_crc and obj_type='col') order by 2; type name same values ---- ------------------------------------- ----------- col AD_MODEL_OBJECT_MAPPING.AD_CLIENT_ID same values -- objects with different value to calculate crc select count(1) from db_checksums where CAST(old_value AS VARCHAR2(100)) != CAST(old_value AS VARCHAR2(100)); 0 -- objects present in one check but not in the other select substr(obj_type,1,5) as ob_type, substr(obj_name,1,40) as ob_name, case when old_value is null then 'null' else 'not null' end as old, case when new_value is null then 'null' else 'not null' end as new from db_checksums where old_value is null or new_value is null order by 1, 2; OB_TYPE OB_NAME OLD NEW -------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- -------- col AD_MODEL_OBJECT.SYS_STSE58YAH1UUV2MU99DR null not null col AD_MODEL_OBJECT.SYS_STSZ64L#G7R$IW913WO7 null not null col AD_ORG.SYS_STSBTFDMLW$XN5GQX0VD5WXNN9 null not null col C_TAXCATEGORY.SYS_STST77VG34JNVJ$RBGUB46 null not null col C_UOM.SYS_STST77VG34JNVJ$RBGUB46USK1 null not null col GL_CATEGORY.SYS_STST77VG34JNVJ$RBGUB46US null not null col M_LOCATOR.SYS_STST77VG34JNVJ$RBGUB46USK1 null not null col OBPOS_APP_PAYMENT.SYS_STSV4HY32RGA6QC_6Y null not null col OBUIAPP_PARAMETER.SYS_STSDD52J8SWA3Y97GL null not null 9 rows selected. -- SYS_% columns select table_name, column_name,data_default from user_tab_cols where column_name like 'SYS\_%' escape '\' order by 1,2 TABLE_NAME COLUMN_NAME DATA_DEFAULT -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- AD_MODEL_OBJECT SYS_STSE58YAH1UUV2MU99DR0UZYX# SYS_OP_COMBINED_HASH("ISACTIVE","OBJECT_TYPE") AD_MODEL_OBJECT SYS_STSZ64L#G7R$IW913WO7OO2#VE SYS_OP_COMBINED_HASH("ISACTIVE","ACTION","ISDEFAULT","AD_PROCESS_ID") AD_ORG SYS_STSBTFDMLW$XN5GQX0VD5WXNN9 SYS_OP_COMBINED_HASH("AD_ORG_ID","AD_CLIENT_ID","ISACTIVE") C_BPARTNER SYS_NC00097$ UPPER("NAME") C_BPARTNER SYS_NC00098$ UPPER("REFERENCENO") C_BPARTNER SYS_NC00099$ UPPER("VALUE") C_ORDER SYS_NC00102$ UPPER("DOCUMENTNO") C_TAXCATEGORY SYS_STST77VG34JNVJ$RBGUB46USK1 SYS_OP_COMBINED_HASH("AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","ISDEFAULT") C_UOM SYS_STST77VG34JNVJ$RBGUB46USK1 SYS_OP_COMBINED_HASH("AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","ISDEFAULT") FIN_PAYMENT SYS_NC00043$ "RET_HIGVOL_ORACLE"."OBEQUALS"("GENERATED_CREDIT","USED_CREDIT") GL_CATEGORY SYS_STST77VG34JNVJ$RBGUB46USK1 SYS_OP_COMBINED_HASH("AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","ISDEFAULT") TABLE_NAME COLUMN_NAME DATA_DEFAULT -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- M_INOUT SYS_NC00066$ UPPER("DOCUMENTNO") M_LOCATOR SYS_STST77VG34JNVJ$RBGUB46USK1 SYS_OP_COMBINED_HASH("AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","ISDEFAULT") M_PRODUCT SYS_NC00110$ UPPER("NAME") M_PRODUCT SYS_NC00111$ UPPER("UPC") M_PRODUCT SYS_NC00112$ UPPER("VALUE") OBPOS_APP_PAYMENT SYS_STSV4HY32RGA6QC_6Y4KE76DMR SYS_OP_COMBINED_HASH("VALUE","FIN_FINANCIAL_ACCOUNT_ID","NAME") OBUIAPP_PARAMETER SYS_STSDD52J8SWA3Y97GLJ1AA8GM5 SYS_OP_COMBINED_HASH("AD_REFERENCE_ID","AD_REFERENCE_VALUE_ID","OBUIAPP_PROCESS_ 18 rows selected. [1] https://blogs.oracle.com/sql/entry/ora_54033_and_the_hidden [^] | ||||||||||||||||||
Steps To Reproduce | Not easy to reproduce locally, consistently occurs in [1] ie [2]: 1. Using Oracle: install.source 2. update database -> [java] Checking if database structure was modified locally. [java] Database has local changes. Update.database not done. [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:163) [1] https://ci.openbravo.com/view/retail/job/ret-higvol-oracle [^] [2] https://ci.openbravo.com/view/retail/job/ret-higvol-oracle/684/console [^] | ||||||||||||||||||
Proposed Solution | Exclude virtual columns from CRC. This can be done using the hidden_column property form user_tab_cols
| ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | db_modified-issue.diff (6,362) 2017-03-28 09:51 https://issues.openbravo.com/file_download.php?file_id=10610&type=bug | ||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2017-03-28 09:50 | alostale | New Issue | |||||||||||||||||
2017-03-28 09:50 | alostale | Assigned To | => alostale | ||||||||||||||||
2017-03-28 09:50 | alostale | Modules | => Core | ||||||||||||||||
2017-03-28 09:50 | alostale | Triggers an Emergency Pack | => No | ||||||||||||||||
2017-03-28 09:51 | alostale | File Added: db_modified-issue.diff | |||||||||||||||||
2017-03-28 09:52 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14895#r14895 | ||||||||||||||||
2017-03-28 09:53 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14896#r14896 | ||||||||||||||||
2017-03-28 09:56 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14897#r14897 | ||||||||||||||||
2017-03-28 09:57 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14898#r14898 | ||||||||||||||||
2017-03-28 10:00 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14899#r14899 | ||||||||||||||||
2017-03-28 10:02 | alostale | Description Updated | bug_revision_view_page.php?rev_id=14900#r14900 | ||||||||||||||||
2017-03-28 10:03 | alostale | Proposed Solution updated | |||||||||||||||||
2017-03-28 10:11 | alostale | Proposed Solution updated | |||||||||||||||||
2017-03-28 10:18 | alostale | Proposed Solution updated | |||||||||||||||||
2017-03-28 10:19 | alostale | Relationship added | related to 0034115 | ||||||||||||||||
2017-03-28 10:24 | alostale | Relationship added | related to 0035629 | ||||||||||||||||
2017-03-28 10:30 | alostale | Status | new => acknowledged | ||||||||||||||||
2017-03-28 10:42 | alostale | Proposed Solution updated | |||||||||||||||||
2017-03-28 10:51 | alostale | Proposed Solution updated | |||||||||||||||||
2017-03-28 10:58 | alostale | Review Assigned To | => caristu | ||||||||||||||||
2017-03-28 11:09 | hgbot | Checkin | |||||||||||||||||
2017-03-28 11:09 | hgbot | Note Added: 0095599 | |||||||||||||||||
2017-03-28 11:09 | hgbot | Status | acknowledged => resolved | ||||||||||||||||
2017-03-28 11:09 | hgbot | Resolution | open => fixed | ||||||||||||||||
2017-03-28 11:09 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/ca589943eb25c8b1a6eb8a0aaf10c13463970632 [^] | ||||||||||||||||
2017-03-28 16:57 | hudsonbot | Checkin | |||||||||||||||||
2017-03-28 16:57 | hudsonbot | Note Added: 0095611 | |||||||||||||||||
2017-03-29 09:27 | Sandrahuguet | Note Added: 0095627 | |||||||||||||||||
2017-03-31 09:04 | caristu | Note Added: 0095744 | |||||||||||||||||
2017-03-31 09:04 | caristu | Status | resolved => closed | ||||||||||||||||
2017-03-31 09:04 | caristu | Fixed in Version | => 3.0PR17Q2 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|