Project

General

Profile

Bug #8554

resolving temp-tables in a class hierarchy

Added by Constantin Asofiei 30 days ago. Updated 22 days ago.

Status:
Test
Priority:
High
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

History

#1 Updated by Constantin Asofiei 30 days ago

There are some problems when resolving temp-tables in a hierarchy.
  • oo.Test1:
    class oo.Test1:
        def private temp-table tt1 before-table btt1 field fa as int.
    
        method public void m1().
           def var ht as handle.
           def var hb as handle.
           def var hf as handle.
    
           create temp-table ht.
           ht:create-like("tt1").
           ht:temp-table-prepare("tt2").
           hb = ht:default-buffer-handle.
           hf = hb:buffer-field("fa") no-error.
           message hf:name error-status:error error-status:get-message(1).
        end.
    end.
    
    
  • oo.Test2
    class oo.Test2
    inherits oo.Test1:
        def private temp-table tt1 before-table btt1  field f1 as int.
    
        constructor public Test2().
           m1().
    
           def var hb4 as handle.
           def var hf as handle.
           hb4 = temp-table tt1:before-table.
           hf = hb4:default-buffer-handle:buffer-field("f1") no-error.
           message hf:name error-status:error error-status:get-message(1).
        end.
    end.
    
  • testrun.p
    def var l as oo.Test2.
    l = new oo.Test2().
    
The issues are:
  • temp-tables during the constructor are registered with BufferManager using without the defining type. This creates collisions - the DMO definition has the type where is defined, but is not being used to register the 'pending temp-table' with BufferManager
  • AbstractTempTable.computeTableType does not consider the defining type of the temp-table - it will use just the before-table's name, and look into BufferManager. This can end up with the wrong before-table instance being resolved.

These problems were found in the #8363 app.

#2 Updated by Constantin Asofiei 29 days ago

DATASET:CREATE-LIKE("<dataset-name>") needs to be checked, too.

#4 Updated by Constantin Asofiei 26 days ago

  • % Done changed from 0 to 80
  • Status changed from New to WIP
  • Assignee set to Constantin Asofiei

Created task branch 8554a from trunk rev 15119.

15120 and 15121 has a rough fix for this - need to validate it.

#5 Updated by Constantin Asofiei 26 days ago

  • Status changed from WIP to Review
  • % Done changed from 80 to 100

15122 fixes some issues, javadocs and some errors which must not set ERROR-STATUS:ERROR. This can be reviewed.

I'm placing this in ETF testing.

#6 Updated by Constantin Asofiei 25 days ago

Ovidiu, please review this, I'll get ETF testing tomorrow and if is OK, I'd like to merge this tomorrow.

#7 Updated by Ovidiu Maxiniuc 25 days ago

Review of 8554a, r15120-15122.

I am OK with the code. I'm sorry I made a mess with condition codes which do and do not generate errors. I hope there are no others.
Is it possible to reduce the visibility of g/setDefiningType() for datasets only to package or protected?

#8 Updated by Constantin Asofiei 24 days ago

  • Status changed from Review to Merge Pending

Ovidiu, I've fixed the visibility in rev 15127 (after rebase).

ETF testing passed. It can be merged to trunk.

#9 Updated by Greg Shah 24 days ago

You can merge to trunk now.

Hynek: 8152a can merge after 8554a.

#10 Updated by Constantin Asofiei 24 days ago

Branch 8554a was merged into trunk as rev. 15125 and archived.

#11 Updated by Greg Shah 22 days ago

  • Status changed from Merge Pending to Test

Also available in: Atom PDF