Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049801Openbravo ERPA. Platformpublic2022-07-14 09:502022-07-14 09:50
shuehner 
Triage Platform Base 
normalmajorhave not tried
newopen 
5
 
 
Core
No
0049801: Synchronize terminology fails on oracle only with mutating table (only in case of specific data)
CI noticed this problem in openbravo (backoffice) repo with commit 4171f42fde03bd1ae3bda82e12dc3cfec9a10df5

Cause seems to be developer missing to run synchronize terminology.
On postgres that caused dbinconsistency as expected.
On oracle it triggered the mutating table error

      [sql] 0,@ERROR=ORA-04091: table INT_DBCONS_ORACLE.AD_COLUMN is mutating, trigger/function may not see it
      [sql] ORA-06512: at "INT_DBCONS_ORACLE.AD_FIELD_MOD_TRG", line 101
      [sql] ORA-04088: error during execution of trigger 'INT_DBCONS_ORACLE.AD_FIELD_MOD_TRG'
      [sql] ORA-06512: at "INT_DBCONS_ORACLE.AD_COLUMN_TRG", line 44
      [sql] ORA-04088: error during execution of trigger 'INT_DBCONS_ORACLE.AD_COLUMN_TRG'

That problem disappeared with commit f950df1c9a2e19956a4675f40a23fe9855bd0269 which fixed the data issue.

As there seems to be a logic error triggered with specific data this bug is reported.
backoffice repo in commit 4171f42fde03bd1ae3bda82e12dc3cfec9a10df5
install.source on oracle
run synchronize terminology and look at errormsg of the ad_pinstance by
- INSERT INTO ad_pinstance(ad_pinstance_id, ad_process_id, record_id, updatedby) VALUES('FF2830FB4A534C949084B351DFD00000', '172', 'EBA9C22C0E6745D480EAB10600EAFBC5', 100)
- CALL ad_synchronize('FF2830FB4A534C949084B351DFD00000')
- SELECT result, errormsg AS message FROM ad_pinstance WHERE ad_pinstance_id = 'FF2830FB4A534C949084B351DFD00000'

Note:
changes in commit f950df1c9a2e19956a4675f40a23fe9855bd0269 make the problem go away so could help pinpoint the data causing this.
Notice the errormsg.
No tags attached.
Issue History
2022-07-14 09:50shuehnerNew Issue
2022-07-14 09:50shuehnerAssigned To => Triage Platform Base
2022-07-14 09:50shuehnerModules => Core
2022-07-14 09:50shuehnerTriggers an Emergency Pack => No

There are no notes attached to this issue.