[freetds] bulk library in ct-lib
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Mon May 17 11:32:27 EDT 2004
> Hi all,
> I've just submitted my patch to ct-library for the "bulk library"
> Mostly, its a stand-alone change, but I've changed the
> TDSCOLUMN structure,
> column_timestamp - a bit indicating if the column is a SQL
> 2000 timestamp
> bcp_column_data - a pointer to a little structure which will hold (if
> required) the data intended for bcp-ing into this column.
Onestly I would expect a join of the two structures... however I don't
know bulk that much...
There are also some bad warnings:
blk.c: In function `blk_bind':
blk.c:100: warning: overflow in implicit constant conversion
blk.c:101: warning: overflow in implicit constant conversion
blk.c:113: warning: implicit declaration of function `_ctclient_msg'
blk.c:123: warning: overflow in implicit constant conversion
blk.c:124: warning: overflow in implicit constant conversion
dblib.c: In function `dbnullbind':
dblib.c:2125: warning: assignment from incompatible pointer type
dblib.c: In function `dbanullbind':
dblib.c:2182: warning: assignment from incompatible pointer type
Mm... I detected also some problems declaring some missed functions...
you called _ctclientmsg in blk.c with less parameters...
> The ct-library bilk copy functions have a number of technical
> over its db-library counterpart.
> 1) They build a whole row of bcp data before sending anything
> down the wire.
> This is stored in TDSRESULTINFO->current_row, which is
> right-sized on
> 2) less memory allocation/deallocation
> 3) We can handle identity columns, and choose through the API
> whether we
> want to load data into them or leave them to the server to derive
> 4) we can handle SQL 2000 timestamp columns, leaving the
> server to derive
> new values for these when we bcp data into a table that contains them.
> All of these advantages will be transferred into the
> db-library code in due
> course, when I will create some underlying common code for them.
> Thanks in advance to whoever applies my patch !
> best wishes,
Not at all!
More information about the FreeTDS