Bugs item #1675795, was opened at 2007-03-07 14:40 Message generated for change (Comment added) made by nielsnes You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1675795&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SQL/JDBC Group: MonetDB5 5.0_beta1 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Anders Blaagaard (ablaagaard) >Assigned to: Niels Nes (nielsnes) Summary: Float to decimal conversion still broken in v5.0.0_beta1_2 Initial Comment: 0.684 -> 0.0684 in decimal(6,4) column % prepare, prepare, prepare # table_name % type, digits, scale # name % varchar, int, int # type % 0, 0, 0 # length [ "timestamp", 7, 0 ] [ "decimal", 6, 4 ] [ "decimal", 6, 4 ] RD 1173277696655: generating prompt TD 1173277696655: write final block: 60 bytes TX 1173277696655: sexec 1(timestamp '2007-03-07 15:28:16.577', 0.6841, 0.684); RD 1173277696671: final block: 5 bytes RD 1173277696671: read chunk: 5 bytes, left: 0 bytes RX 1173277696671: &2 1 sql>select * from xy; % xy, xy, xy # table_name % time, x, y # name % timestamp, decimal, decimal # type % 26, 8, 8 # length [ 2007-03-07 15:27:08.201000, 0.6841, 0.0684 ] ---------------------------------------------------------------------- >Comment By: Niels Nes (nielsnes) Date: 2007-03-31 14:06 Message: Logged In: YES user_id=43556 Originator: NO This was a bug in the upcasting code (atom_cast), ie not in the jdbc driver. I fixed it and added a test in src/test/BugTracker/Tests/prepare_decimal_float.SF-1675795.sql ---------------------------------------------------------------------- Comment By: Anders Blaagaard (ablaagaard) Date: 2007-03-07 16:45 Message: Logged In: YES user_id=752358 Originator: YES Sorry about the non-matching timestamps - the two parts must have been copied from different attempts - the problem is not the timestamp, but the last number: - what are you doing: Inserting number with 3 decimals (0.684) into decimal(6,4) column - how are you doing it: Using JDBC prepared statement with float value - what do you get: When I select, the decimal point has been moved, so the value is now 0.0684 - what do you expect to get: The original value (0.684) ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2007-03-07 15:05 Message: Logged In: YES user_id=963970 Originator: NO I don't understand what't the problem. The prepared/execute doesn't seem to match the data from the select, so what in particular is going wrong? - what are you doing - how are you doing it - what do you get - what do you expect to get ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1675795&group_id=56967 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
