[Kamailio-Devel] [ openser-Bugs-2111861 ] MySQL module wrong conversion of DECIMAL (dataloss!)

SourceForge.net noreply at sourceforge.net
Mon Sep 15 12:33:04 CEST 2008


Bugs item #2111861, was opened at 2008-09-15 09:13
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2111861&group_id=139143

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: modules
Group: ver 1.4.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Hermann (axlh)
>Assigned to: Henning Westerholt (henningw)
Summary: MySQL module wrong conversion of DECIMAL (dataloss!)

Initial Comment:
Somewhere between 1.2.x and 1.4, the MySQL module started converting DECIMAL values to type DB_INT, resulting in the loss of all decimals. The only candidate Kamailio DB-type is DB_STR. Patch attached.

----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2008-09-15 10:33

Message:
DB_STRING is fine, i was just confused. :-) Commited to trunk, i'll take
care of backporting. If we want to use DECIMAL as part of our internal DB
schemes, we should perhaps introduce some decimal type in the API too.

----------------------------------------------------------------------

Comment By: Alex Hermann (axlh)
Date: 2008-09-15 09:43

Message:
The MySQL module seems to use only DB_STRING, so I used that.

I meant to say that of the available DB_* representations in Kamailio a
'string' type is the only correct one (it keeps the full precision). I
don't have a preference nor the knowledge if it should be DB_STR or
DB_STRING.


----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-09-15 09:30

Message:
Hi Alex,

thank you for the report and the patch. This was introduced in 1.2, bug
#1614386, rev1414. You mentioned that the correct type in kamailio is
'DB_STR', but in the patch you use 'DB_STRING'?

Cheers,

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2111861&group_id=139143



More information about the Devel mailing list