Project

General

Profile

Bug #10308

DYNAMIC TEMP-TABLE issue when using READ-XML before TEMP-TABLE-PREPARE

Added by Teodor Gorghe about 1 year ago. Updated 12 months ago.

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

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
production:
No
env_name:
topics:

Related issues

Related to Base Language - Bug #10203: XMLs cannot be imported into a dataset without a schema present Closed
Related to Database - Bug #9763: xml-node-name buffer option Test

History

#1 Updated by Teodor Gorghe about 1 year ago

When READ-XML is used on a dynamic TEMP-TABLE before TEMP-TABLE-PREPARE, a NullPointerException is thrown.


The code above is a simplified version of OEUNIT.Data.DataProvider:fromXMLFile.
Error shown: TEMP-TABLE must be PREPARED before referencing NAME/DEFAULT-BUFFER-HANDLE etc. (9040).
Please note that this works on 4GL, but only when the XML file can be found.

#3 Updated by Teodor Gorghe about 1 year ago

  • Related to Bug #10203: XMLs cannot be imported into a dataset without a schema present added

#4 Updated by Teodor Gorghe 12 months ago

  • Related to Bug #9763: xml-node-name buffer option added

#5 Updated by Teodor Gorghe 12 months ago

  • % Done changed from 0 to 100
  • Assignee set to Teodor Gorghe
  • Status changed from New to WIP

Committed revision 16066 on task branch 10308a:
- Changed READ-XML XmlImport.importTable to use TempTable instead of Buffer.
- Added an option to override XmlNodeName when using BUFFER:READ-XML.

#6 Updated by Teodor Gorghe 12 months ago

  • Status changed from WIP to Review
  • reviewer Constantin Asofiei added

#7 Updated by Constantin Asofiei 12 months ago

  • Status changed from Review to WIP

Teodor, I don't think this approach is good - we know that READ-XML uses the buffer's (default or explicit) options, and not the temp-table.

#8 Updated by Teodor Gorghe 12 months ago

Constantin Asofiei wrote:

Teodor, I don't think this approach is good - we know that READ-XML uses the buffer's (default or explicit) options, and not the temp-table.

What do you mean on this? I have analyzed the following cases:
- When BUFFER:READ-XML is called, the getXmlNodeName() is always not null, because of the getter implementation (also see #9763-40).
- When TEMP-TABLE:READ-XML is called and called before TEMP-TABLE-PREPARE, the override parameter is null and _isPrepared false. The TEMP-TABLE:XML-NODE-NAME is used because there is no default buffer.

I have also analyzed the changes from #9763 and I have noticed that the buffer parameter is only used for getXmlNodeName on importTable method and not anywhere else.
I think do you mean about the case when TEMP-TABLE was prepared and the default buffer XML-NODE-NAME was changed. I am looking on this right now.

#9 Updated by Constantin Asofiei 12 months ago

  • Status changed from WIP to Internal Test

Teodor, I understand now your changes. Please go ahead with testing.

#10 Updated by Alexandru Lungu 12 months ago

  • Status changed from Internal Test to Merge Pending

Please merge 10308a to trunk after 9055a.

#11 Updated by Teodor Gorghe 12 months ago

  • Status changed from Merge Pending to Test

Branch 10308a was merged to trunk rev 16095 and archived.

Also available in: Atom PDF