Bug 1273832

Summary: Virtual procedure in generated dynamic VDB does not return result set
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Andrej Smigala <asmigala>
Component: ToolingAssignee: Barry LaFond <blafond>
Status: CLOSED NOTABUG QA Contact: Andrej Smigala <asmigala>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: vhalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 13:29:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Smigala 2015-10-21 11:03:02 UTC
When a VDB containing view model with a virtual procedure is exported as a dynamic VDB, the virtual procedure does not return any results. This is because the generated DDL does not contain the RETURNS clause.

Generated DDL:

CREATE VIRTUAL PROCEDURE testProc (p1 string(4000))
	AS
 BEGIN
	SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
END;



Expected DDL:

CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE ( xml_out xml)
	AS
 BEGIN
	SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
END;

Steps to Reproduce:
# import the attached project
# generate a dynamic VDB from DynamicProcedureVdb
# deploy and execute both VDBs
# run the following query against each VDB: {{exec testProc('x')}}

Comment 2 JBoss JIRA Server 2015-10-21 19:01:39 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2697 to Resolved

Comment 3 JBoss JIRA Server 2015-11-09 12:22:02 UTC
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2697 to Reopened

Comment 4 Barry LaFond 2015-12-07 13:29:10 UTC
Using only JIRA now.  Marking as closed

Comment 5 JBoss JIRA Server 2016-02-03 15:16:03 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2697 to Resolved

Comment 6 JBoss JIRA Server 2016-02-18 13:24:44 UTC
Matus Makovy <mmakovy> updated the status of jira TEIIDDES-2697 to Closed

Comment 7 JBoss JIRA Server 2016-03-01 14:46:57 UTC
Matus Makovy <mmakovy> updated the status of jira TEIIDDES-2697 to Reopened

Comment 8 JBoss JIRA Server 2016-03-01 16:29:58 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2697 to Resolved

Comment 9 JBoss JIRA Server 2016-07-21 09:59:00 UTC
Matej Kralik <mkralik> updated the status of jira TEIIDDES-2697 to Closed