ZIGLIO, Frediano, VF-IT | 2 Jul 09:19 2007

Big patch...

I'm just merging this big patch.

It improves token handling adding the concept of column label in
addition to column name. Cursors need to distinguish between the two
concepts. Assuming a query like "select x as y from mytable" x is the
column name while y is the column label. To complicate everything the
protocol does not always return both column name and column label.
Issuing a normal query like the above server usually return just the
column label while using cursors, "for browse" clause or recent Sybase
products server returns both. Also I start using DSTR structure in
TDSSOCKET instead of arrays. The reason is mainly cause the arrays was
quite large but not that sufficient... assuming different encoding for
instance would lead table_name to be quite big.. 4 (components) * 128
(maximun component length) * 4 (maximun byte per characters) plus some
additional bytes (dots and quotes) would lead to 2kb !!! Quite big for a
string that usually occupy just some tenth bytes... So at the end I used
DSTR for column_name, table_name and column_label (new). Also you will
note that in code now I use mostly column_label and not column_name (the
reason was explain some rows above). Perhaps some code needs to be
changed from column_label to column_name but currently the situation is
quite conservative.

If nobody complaints I'll merge this work in a couple of days...

freddy77

Attachment (vedi.diff.gz): application/x-gzip, 28 KiB
_______________________________________________
(Continue reading)

Thompson, Bill D (London | 2 Jul 12:24 2007
Picon

Re: freebcp failing to continue loading records afterduplicate encountere d

Hi,

you can use the -m flag to freebcp to specify a maximum number of errors
allowable before it gives up
the -e flag allows you to specify an errors file in which the errors are
listed.

HTH,

Bill

-----Original Message-----
From: freetds-bounces <at> lists.ibiblio.org
[mailto:freetds-bounces <at> lists.ibiblio.org] On Behalf Of
dnoble71 <at> juno.com
Sent: 30 June 2007 04:22
To: freetds <at> lists.ibiblio.org
Subject: [freetds] freebcp failing to continue loading records
afterduplicate encountere d

I am new to Linux and freetds.

We are working with Sybase 12.5.3 on an HP 9000 Server.

On a Linux box using freetds 0.64, we run the freebcp command to load
records into a Sybase table and as soon as it encounters a duplicate
key in the table freebcp stops loading records.

I have seen freebcp continue to load records after it encounters a
duplicate key error on another system. Is there a configuration setting
(Continue reading)

James K. Lowden | 2 Jul 14:08 2007

Re: Big patch...

ZIGLIO, Frediano, VF-IT wrote:
> 
> If nobody complaints I'll merge this work in a couple of days...

Hi Freddy, 

I have a few concerns about this patch.  

First, things are pretty stable and I'm thinking of making a release.  I'd
rather not make such fundamental changes at this point.  Could we agree on
a release schedule and postpone until we branch?  

Second, I know you love DSTR but I don't.  I think they're harder to debug
than ordinary char*.  I'm not that happy with using them in the TDS layer.

Third, I don't think we should change column_name to column_label
everywhere just because there are a few odd cases where the protocol
distinguishes.  Most of the time the label *is* the name for all intents
and purposes.  And, everyone knows what a column name is: it's the name of
the column.  Calling it a  "label" is nonstandard and somewhat confusing. 

I think it would be better to retain column_name for normal use, and have
a different name, say, underlying_name or table_column_name  to denote the
name of the table's column.   (Honestly, I doubt the value of knowing the
information in the first place....)

Kind regards, 

--jkl
(Continue reading)

ZIGLIO, Frediano, VF-IT | 2 Jul 15:04 2007

Re: Big patch...

> > 
> > If nobody complaints I'll merge this work in a couple of days...
> 
> Hi Freddy, 
> 
> I have a few concerns about this patch.  
> 
> First, things are pretty stable and I'm thinking of making a 
> release.  I'd
> rather not make such fundamental changes at this point.  
> Could we agree on
> a release schedule and postpone until we branch?  
> 

Yes, no problem

> Second, I know you love DSTR but I don't.  I think they're 
> harder to debug
> than ordinary char*.  I'm not that happy with using them in 
> the TDS layer.
>  
> 
> Third, I don't think we should change column_name to column_label
> everywhere just because there are a few odd cases where the protocol
> distinguishes.  Most of the time the label *is* the name for 
> all intents
> and purposes.  And, everyone knows what a column name is: 
> it's the name of
> the column.  Calling it a  "label" is nonstandard and 
> somewhat confusing. 
(Continue reading)

Adam Jones | 2 Jul 20:14 2007

FreeTDS On Win32

Has anyone successfully run FreeTDS on Win32?
Reid, Roger L. | 2 Jul 21:01 2007

Re: freebcp failing to continue loading records afterduplicate encountere d

There's actually good reason to simply fail at that point, but whether it's correct behavior depends on how your
table (or relation, or bag) is configured.

Run "sp_help [tablename]".  Output will probably be a lot simpler than this.  Notice under index
description, ind0 says "clustered, allow duplicate rows"  (Huh?  I know this table, what young
whippersnapper put "allow dups" in there? Anyway...

"allow duplicate rows" - means just that - this is a bag, not a relation, and it means something to us to have
two identical rows in here.  Do not page Codd and Date for support.

"ignore duplicate rows" or "ignore duplicate key" means - if someone tries to insert a row that already
exists, just report success (but 0 rows affected).   It's not an error.  The row belongs, it's already there,
we're not worried that the attempt means something's out of whack.

Otherwise, the default is that an attempt to insert a duplicate row (or a duplicate unique key) is an error. 
We don't expect it to happen, so the safest thing to do is stop processing.

I don't know your table.   If you have not set the table up to allow dups or to ignore dups, quitting is correct.

If you HAVE done so, and freebcp croaks on it anyway, then you have an issue with freebcp.  

In a perfect world of perfect relations and processes, you'd never allow or ignore dups.  In your case, it
sounds like you want to ignore dups - see "alter table" and "create index" in your Sybase docs.

 index_name           index_description
        index_keys

        index_max_rows_per_page index_fillfactor index_reservepagegap
        index_created
 -------------------- -------------------------------------------------------
(Continue reading)

Frank M. Kromann | 2 Jul 21:23 2007

Re: FreeTDS On Win32

The dblib portion of it works finw with PHP.

- Frank

> Has anyone successfully run FreeTDS on Win32?
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS <at> lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 
Adam Jones | 2 Jul 21:45 2007

Re: FreeTDS On Win32

Does it work with C++ and the mingw compiler?

-----Original Message-----
From: Frank M. Kromann [mailto:frank <at> kromann.info] 
Sent: Monday, July 02, 2007 3:23 PM
To: FreeTDS Development Group
Cc: Adam Jones
Subject: Re: [freetds] FreeTDS On Win32

The dblib portion of it works finw with PHP.

- Frank

> Has anyone successfully run FreeTDS on Win32?
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS <at> lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 
SourceForge.net | 3 Jul 02:36 2007
Picon
Picon

[ freetds-Patches-1746864 ] new -w option for bsqldb(1)

Patches item #1746864, was opened at 2007-07-03 00:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=1746864&group_id=33106

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: application
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Medi (montaseri)
Assigned to: Nobody/Anonymous (nobody)
Summary: new -w option for bsqldb(1)

Initial Comment:
I will write the description such that it could be copied right into the man pages, serving multiple purposes

Options

-w n   This option instructs bsqldb(1) to pause or wait
       for n seconds between each request (or GO). This
       option allows developers to send a batch of
       requests to a server but pause for each request,
       perhaps to monitor the wire protocol or examine
       ends of the communication.

(Continue reading)

dnoble71@juno.com | 3 Jul 03:26 2007
Picon

Re: freebcp failing to continue loading records afterduplica te encountere d

Bill:

Thanks for your help, the release I have installed does not support -e
-m or -i (I tested the options and they did not work). I think I will
try to install the latest stable release of freetds and see how that
works out.

Roger 

Thanks for your input, The table has a unique key and we do not want
duplicates keys, but the input file may contain records already loaded
and what the desired outcome we would like, if we encounter a duplicate
key is to report the error and continue with the next record in the
input file.

Thank you all for your help. I will let everyone know how this turns out.

Doug
_____________________________________________________________
Click here to find experienced pros to help with your home improvement project.
http://track.juno.com/s/lc?u=http://tagline.untd.us/fc/Ioyw6iifhPhO3WEVdRP51ZnNpisrfBy4tiqBWyFPYeywfAaHlE50db/

Gmane