[ https://issues.apache.org/jira/browse/DERBY-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kathey Marsden updated DERBY-3125:
----------------------------------
Issue & fix info: [Repro attached]
Urgency: Normal
Bug behavior facts: [Deviation from standard]
Triaged for 10.5.2. Setting normal urgency.
> registerOutputParameter with a specified scale does not adjust the scale of the output
parameter
> ------------------------------------------------------------------------------------------------
>
> Key: DERBY-3125
> URL: https://issues.apache.org/jira/browse/DERBY-3125
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.4.1.3
> Reporter: Kathey Marsden
> Priority: Minor
>
> Running the following program with either embedded or client does not adjust the scale
of the output parameter.
> public class DecimalOutParam {
> public static void main(String[] args) throws Exception
> {
> //Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
> //Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/wombat;create=true");
> Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
> Connection conn = DriverManager.getConnection("jdbc:derby:wombat;create=true");
> Statement s = conn.createStatement();
> try
> {
> s.executeUpdate("DROP PROCEDURE DECPROC");
> }
> catch (SQLException se)
> {
>
> }
> s.executeUpdate("CREATE PROCEDURE DECPROC(OUT DECIMAL(10,2)) parameter style java language
java NO SQL external name 'DecimalOutParam.decProc'");
>
> CallableStatement cs = conn.prepareCall("CALL DECPROC(?)");
> cs.registerOutParameter(1,java.sql.Types.DECIMAL, 0);
> cs.executeUpdate();
> System.out.println(cs.getBigDecimal(1));
>
> }
> public static void decProc(BigDecimal [] outDec)
> {
> outDec[0] = new BigDecimal("123.45");
> }
> }
> C:/kmarsden/repro/DERBY-2073] java DecimalOutParam
> 23.45
> Should be
> 23
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|