PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: willettm at bolon dot uk dot ml dot com (Mike Willett LADS LDN X7563)
Subject: BCP.pm bug
Date: Aug 28 1998 4:29PM

Hi,

I've found a bug in BCP.pm (I think).

In a previous version of BCP.pm the run routine was

sub run {
    my $self = shift;

    if($self->{Global}->{DIRECTION} eq 'OUT') {
        $self->do_out(@_);
    } else {
        $self->do_in(@_);
    }
}

The return code was whatever do_in or do_out returns. However,
it now has been altered to do :-

sub run {
    my $self = shift;

    if($self->{Global}->{DIRECTION} eq 'OUT') {
        $self->do_out(@_);
    } else {
        $self->do_in(@_);
        my $log_file = $self->{Global}->{ERRORS} || 'bcp.err';
        if(-e $log_file && -z $log_file) {
            unlink($log_file);
        }
    }
}

Now the return code of do_in is lost. The fix looks faily obvious
and we will probably change the code locally.


Hope this helps.

Mike Willett