Affects: 5.0.1


weidox opened SPR-16182 and commented

Noticed in 4.3.3 while analyzing, see the same in fresh code I found in Github so I guess it will be 5.0.1 or newer. It is possible to refer parameters by name in CallableStatement and SQL driver is supposed to determine column number by itself, however SqlOutParameters are extracted by definition order in Java code which may not match what is in the stored procedure.

In short, it breaks a bit of default JDBC functionality. Technically this is caused in that extractOutputParameters() is calling cs.getObject(int) instead of cs.getObject(String) (plus one more case with SqlReturnType).

Comment From: jhoeller

  • Related: #9084

Comment From: jhoeller

Closing this old ticket along #30207 and #9084 since we have no plans to move away from indexed parameters there.