Tracker: Bugs

5 Prepared statement problem - ID: 2831994
Last Update: Comment added ( stmane )

Hello,

we have a strange problem with MonetDB JDBC driver, when we use standard
statement to insert numeric data value all works. but with prepared
statement we got the problem with value 0 (null) for decimal and numeric
data type, so when we try to insert data with null in PreparedStatement we
got SQL exception. I attached file with sample source code which generates
such error.

Thanks


Gleb Lanbin ( glanbin ) - 2009-08-04 13:16

5

Closed

Fixed

Niels Nes

SQL/JDBC

MonetDB5 "stable"

Public


Comments ( 4 )

Date: 2009-08-11 12:18
Sender: stmaneProject AdminAccepting Donations

Fixed by Niels.
Closing.



Date: 2009-08-11 11:59
Sender: stmaneProject AdminAccepting Donations

The test (using mclient, not JDBC) seems to work fine:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/sql/.mTests103/GNU.64.64.d.1-Fedora10/src_test_BugTracker-2009/prepare_decimal_bug.SF-2831994.out.00.html

Could this one hence be closed?



Date: 2009-08-04 17:35
Sender: nielsnesProject AdminAccepting Donations

added test to BugTracker-2009/Tests/prepare_decimal_bug.SF-2831994.sql

0.0 got stripped to '.' having no digits. Asking for a decimal with length
0, automagically switches to maximum (19) digits length, which is larger as
5). So now we detect to low number of digits (<= 0) and set it to atleast
1.


Date: 2009-08-04 13:20
Sender: mr-meltdown

this is most probably a server-side exec problem


Attached File ( 1 )

Filename Description Download
modetb-decimal-0-problem.zip example of source code with problem Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2009-08-11 12:18 stmane
resolution_id None 2009-08-11 12:18 stmane
assigned_to mr-meltdown 2009-08-11 12:18 stmane
allow_comments 1 2009-08-11 12:18 stmane
close_date - 2009-08-11 12:18 stmane
File Added 337924: modetb-decimal-0-problem.zip 2009-08-04 13:16 glanbin