Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0005229
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminoralways2008-09-24 12:562009-04-21 11:06
ReporterDowidView Statuspublic 
Assigned ToDowid 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision9767
ProjectionnoneETAnoneTarget Version
OSWindowsDatabaseOracleJava version
OS VersionSP2Database versionXEAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0005229: Temporary tables T_Selection and T_Selection2 have been ported from v2.22 to 2.35 improperly

DescriptionTemporary tables T_Selection and T_Selection2 have been ported from v2.22 to 2.35 improperly. Temporary tables have been ported as regular tables.
Proposed Solutionmove T_Selection and T_Selection2 tables into the prescript.
TagsNo tags attached.
Attached Filespatch file icon postscript.patch [^] (54,973 bytes) 2008-10-28 16:05 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0005756 closedDowid Temporary tables T_Selection and T_Selection2 have been ported from v2.22 to 2.35 improperly 
depends on backport 0005757 closedDowid Temporary tables T_Selection and T_Selection2 have been ported from v2.22 to 2.35 improperly 
related to defect 0005215 closedDowid Verify Bom button works incorrectly 
related to defect 0006521 closedDowid Application Dictionary AD_Table contains records: C_Selection/C_Selection2 but these tables do not exist in the db 

-  Notes
(0009362)
Dowid (reporter)
2008-10-06 09:46

This bug leads these functions M_PRICELIST_CREATE(),M_PRODUCT_BOM_CHECK() to work incorrectly, if 2 users launch them simultaneously.
(0009802)
Dowid (reporter)
2008-10-28 16:05

2 Temporary tables (T_Selection, T_Selection2) are used by 2 functions (M_PRICELIST_CREATE(),M_PRODUCT_BOM_CHECK().

The DBSourceManager doesn't support the creation of TEMPORARY tables, however these tables can be created in the postscript. This would be fine, but Oracle and Postgre create TEMPORARY tables differently. Oracle creates the temporary tables during the creation of a "schema" and they exist in the schema with regular tables. Postgre on the other hand, creates these tables during the runtime. For these reasons we will have 2 function variants, one for postgre, and one for oracle.


The proposed solution for this bug.

1. Delete C_Selection.xml, C_Selection2.xml, M_PRICELIST_CREATE.xml and M_PRODUCT_BOM_CHECK.xml
2. Modify postscript-Oracle.sql, postscript-PostgreSql.sql by using patch.



Please Note:

1. I used prefix Temp_ for temporary tables

2. Postscript-PostgreSql.sql will be correct for postgre version 8.3. For version 8.2 and lower modifications are required. Every "select * from temp_table" will have to be replaced by "Execute 'Select * from Temp_table'".

3. There is another radical solution for this bug, however it requires to abandon the use of temporary tables. This solution would require to re-write the logic of functions that use temporary tables so that they do not use them.
(0009831)
Dowid (reporter)
2008-10-29 17:41
edited on: 2008-11-05 16:52

New improved solution for this bug.

1. Add C_CREATE_TEMPORAL_TABLES() function. This function should be empty for oracle and will create temporary tables for postgre
2. The same functions for postgre and Oracle (M_PRICELIST_CREATE(),M_PRODUCT_BOM_CHECK()) using C_CREATE_TEMPORAL_TABLES
3. modify (M_PRICELIST_CREATE(),M_PRODUCT_BOM_CHECK()) with EXECUTE for support Postgres 8.2
4. Add Creation Temporary tables into the prescript Oracle
5. Use the C_TEMP prefix for the functions and temporal tables
6. Add "C_CREATE_TEMPORARY_TABLES" into the OpenbravoExcludeFilter.getExcludedFunctions()
and add "C_TEMP_SELECTION", "C_TEMP_SELECTION" into the OpenbravoExcludeFilter.getExcludedTables()

(0010055)
svnbot (reporter)
2008-11-06 18:47

Repository: openbravo
Revision: 9767
Author: dowid
Date: 2008-11-06 18:47:27 +0100 (Thu, 06 Nov 2008)

Fixed bug 0005229: Temporary tables T_Selection and T_Selection2 have been ported from v2.22 to 2.35 improperly

---
U trunk/src-db/database/model/functions/M_PRICELIST_CREATE.xml
U trunk/src-db/database/model/functions/M_PRODUCT_BOM_CHECK.xml
U trunk/src-db/database/model/prescript-Oracle.sql
U trunk/src-db/database/model/prescript-PostgreSql.sql
D trunk/src-db/database/model/tables/C_SELECTION.xml
D trunk/src-db/database/model/tables/C_SELECTION2.xml
U trunk/src-db/src/com/openbravo/db/OpenbravoExcludeFilter.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=9767&sc=1 [^]

- Issue History
Date Modified Username Field Change
2008-09-24 12:56 Dowid New Issue
2008-09-24 12:58 Dowid Relationship added blocks 0005215
2008-09-26 10:07 Dowid Issue Monitored: Dowid
2008-10-06 09:46 Dowid Note Added: 0009362
2008-10-24 12:15 Dowid Relationship deleted blocks 0005215
2008-10-24 12:16 Dowid Relationship added related to 0005215
2008-10-28 16:05 Dowid Note Added: 0009802
2008-10-28 16:05 Dowid File Added: postscript.patch
2008-10-29 17:24 cromero Project @4@ => Openbravo ERP
2008-10-29 17:25 cromero Category => 00. Application dictionary
2008-10-29 17:41 Dowid Note Added: 0009831
2008-10-30 14:31 Dowid Status new => scheduled
2008-10-30 14:31 Dowid Assigned To => Dowid
2008-10-30 14:31 Dowid fix_in_branch => trunk
2008-11-04 16:06 Dowid Note Edited: 0009831
2008-11-05 16:52 Dowid Note Edited: 0009831
2008-11-06 18:47 svnbot Checkin
2008-11-06 18:47 svnbot Note Added: 0010055
2008-11-06 18:47 svnbot Status scheduled => resolved
2008-11-06 18:47 svnbot Resolution open => fixed
2008-11-06 18:47 svnbot svn_revision => 9767
2008-12-02 13:02 jaimetorre sf_bug_id 0 => 2377094
2009-01-10 18:09 rafaroda Relationship added related to 0006521
2009-04-21 11:06 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker