Skip to Content.
Sympa Menu

freetds - RE: [freetds] bulk library in ct-lib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] bulk library in ct-lib
  • Date: Mon, 17 May 2004 17:32:27 +0200

>
> Hi all,
>
> I've just submitted my patch to ct-library for the "bulk library"
> components.
>
> Mostly, its a stand-alone change, but I've changed the
> TDSCOLUMN structure,
> adding
>
> column_timestamp - a bit indicating if the column is a SQL
> 2000 timestamp
> column.
> bcp_column_data - a pointer to a little structure which will hold (if
> required) the data intended for bcp-ing into this column.
>

Committed.
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
> advantages
> 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
> initialisation
>
> 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!

bye
freddy77




Archive powered by MHonArc 2.6.24.

Top of Page