[ 
https://issues.apache.org/jira/browse/GROOVY-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King resolved GROOVY-7768.
-------------------------------
    Fix Version/s: 6.0.0-alpha-1
         Assignee: Paul King
       Resolution: Fixed

Could not reproduce on HSQLDB using portable \{call proc\(?)} syntax, added 
SqlCallTest.testCallWithAllRowsWithInputParamOnly as coverage. We typically 
wouldn't add a test for the non-portable {{sp_who ?}} shorthand (it depends on 
driver-specific parsing).

Note that if {{call(...)}} works but {{callWithAllRows(...)}} returns empty on 
the same SQL, the divergence is in {{{}callWithRows{}}}'s result-set iteration 
(the two routes share that method and differ only in the {{processResultsSets}} 
flag). One known weak spot: after {{execute()}} returns {{false}}, the code 
calls {{getMoreResults()}} exactly once, if the driver reports {{[UpdateCount, 
UpdateCount, ResultSet]}}, the ResultSet is missed. If you can provide a 
portable reproducer (or confirm the {{sp_who}} case still fails on a modern 
Microsoft JDBC driver), we can reopen.

> groovy.sql.Sql callWithAllRows returns blank result when passing params
> -----------------------------------------------------------------------
>
>                 Key: GROOVY-7768
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7768
>             Project: Groovy
>          Issue Type: Bug
>          Components: SQL processing
>    Affects Versions: 2.4.0
>            Reporter: Ryan Mills
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 6.0.0-alpha-1
>
>   Original Estimate: 5h
>  Remaining Estimate: 5h
>
> callWithAllRows works with regular sql, and an empty list.
> call works with a map or list
> Howver, callWithAllRows returns an empty list when using with params eg.)
> List list = new ArrayList();
> l.add("myid");
> sql.callWithAllRows("sp_who ?", list, {}); 
> result is []



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to