[Kamailio-Devel] [ openser-Patches-2139104 ] Fetch support db_unixodbc

SourceForge.net noreply at sourceforge.net
Wed Oct 1 01:03:18 CEST 2008


Patches item #2139104, was opened at 2008-10-01 01:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2139104&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: None
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jerome Martin (tramjoe)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fetch support db_unixodbc

Initial Comment:
This patch implements fetch support for db_unixodbc.
It currently works for me with very large dialog tables (> 50 000 dialogs). Patch is against 1.4 rev 4989. 

Oh, BTW the tracker group 1.4.x does not exist for patches. Please add it :-)

I do not consider this patch production ready yet, but submit it for review regarding the following:

It seems that fetch support in db_mysql and db_postgresql supports the assumption in dialog module, and I guess other modules, that the row count is known before copying every row. This can NOT be assumed with db_unixodbc, for various reasons :

- unixodbc library has an SQLRowCount function that :
  . works with select only if the backend supports it. i.e. the TDS backend (MS-SQL) does NOT.
  . returns the row count for select only after fetching all rows

So the way my implementation works is by allowing an extra fetch call when there are no more rows to fetch and exit with success from that. It does work with dialog, but I have NOT tested this with other modules. Also, there might be implications here that I do not currently see, please comment.

Also, I'd appreciate if someone takes a look at malloc/free operations, I think I might have something leaking a bit currently.


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

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



More information about the Devel mailing list