[Kamailio-Devel] [ openser-Patches-2101659 ] database support for bigint type

SourceForge.net noreply at sourceforge.net
Tue Sep 16 18:49:54 CEST 2008


Patches item #2101659, was opened at 2008-09-09 08:44
Message generated for change (Settings changed) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2101659&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: core
Group: ver devel
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Henning Westerholt (henningw)
Summary: database support for bigint type

Initial Comment:
The database system doesn't support the bigint type. When fetching a bigint, the database query fails with a conversion error. Currently, OpenSER only supports 32 bit integers.

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

>Comment By: Henning Westerholt (henningw)
Date: 2008-09-16 16:49

Message:
Hi, thanks for the test. I've commited this to trunk with some minor
adaptions because of mysql fixes.

Henning

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

Comment By: Nobody/Anonymous (nobody)
Date: 2008-09-15 09:41

Message:
I'm using the MySQL implementation.

I've tested the patch using OpenSER 1.3 (had to alter a few things to get
it compiling).

BIGINT queries work as you'd expect. I haven't tested inserts.

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

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

Message:
Hi,

good catch, this was obviously wrong, i've updated the patch. Please let
me know when you have done some tests, then i'll work further on the
integration of this into trunk.

Henning
File Added: bigint-core-sql.patch

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

Comment By: Nobody/Anonymous (nobody)
Date: 2008-09-10 15:07

Message:
Hi and thanks for adding the support. :)

I haven't done any testing yet, but having looked at the patch I'd say it
looks fine, but for one thing.. Shouldn't strtoll be used instead of
strtoull? strtoull converts to unsigned.

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

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-09-10 13:35

Message:
Just as note, not to forget, support for 64b int has to be verified with
PVs, specially with avps due to avp_db_query|load().

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

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

Message:
Ok, understand. I've attached a patch against trunk that implements bigint
support for the core and the mysql, postgres and unixodbc drivers. What
database do you use?

Would be great if you could test, and report the result. I tested that it
don't break anything obvious, but did not tested the BIGINT case that
much.

Henning
File Added: bigint-core-sql.patch

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

Comment By: Nobody/Anonymous (nobody)
Date: 2008-09-10 09:31

Message:
I'm using a custom module/table which uses bigint's to store PSTN numbers.
All numbers are guaranteed to have no prefixed zero(es). Regular int's have
insufficient decimal places to store PSTN numbers.

I need to perform queries on this table to check if a number is within a
registered range (begin <= number <= end), which is really fast when done
using indexed integer columns. The table contains a large number of ranges,
so queries must be fast.

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

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

Message:
Hi,

this is correct, at the moment BIGINTs are mapped to a normal integers.
I need to investigate, should be probably not that hard to add support for
this. Can i ask for an usecase for this? Do you simple query some other
databases that uses this type, or extended the provided tables?

Henning

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

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



More information about the Devel mailing list