Subversion Repositories DevTools

Rev

Rev 4543 | Rev 6887 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4543 Rev 4544
Line 156... Line 156...
156
        #   Extract status and any error information
156
        #   Extract status and any error information
157
        #
157
        #
158
        my $fh = $self->{FH_READ};
158
        my $fh = $self->{FH_READ};
159
        while ( <$fh> )
159
        while ( <$fh> )
160
        {
160
        {
161
            chomp;
161
            $_ =~ s~\s+$~~;
162
            print "[DBI] Connect: $_\n" if $verbose;
162
            print "[DBI] Connect: $_\n" if $verbose;
163
 
163
 
164
            if ( m/^ConnectionOpened:/ )
164
            if ( m/^ConnectionOpened:/ )
165
            {
165
            {
166
                $self->{ERROR} = 0;
166
                $self->{ERROR} = 0;
167
                $errstr = "OK";
167
                $errstr = "OK";
168
                last;
168
                last;
169
            }
169
            }
170
 
170
 
171
            if ( m/^Error:(.*)/ )
171
            if ( m/^Error:(.*?)\s*$/ )
172
            {
172
            {
173
                $errstr = $1;
173
                $errstr = $1;
174
            }
174
            }
175
 
175
 
-
 
176
            if ( m/^Status:ConnectionClosed$/ )
-
 
177
            {
-
 
178
                $self->{PID} = 0;
-
 
179
            }
176
        }
180
        }
177
    }
181
    }
178
 
182
 
179
    #
183
    #
180
    #   Return class iff the connection has been established
184
    #   Return class iff the connection has been established
Line 404... Line 408...
404
        if ( m/^DataEnd:/ )
408
        if ( m/^DataEnd:/ )
405
        {
409
        {
406
            last;
410
            last;
407
        }
411
        }
408
        
412
        
409
        if ( m/^Warning:(.*)/ )
413
        if ( m/^Warning:(.*?)\s*$/ )
410
        {
414
        {
411
            $self->{ERROR} = 1;
415
            $self->{ERROR} = 1;
412
            $self->{ERRSTR} = $1;
416
            $self->{ERRSTR} = $1;
413
        }
417
        }
414
 
418
 
Line 432... Line 436...
432
{
436
{
433
    my $self = shift;
437
    my $self = shift;
434
    return $self->{ERRSTR};
438
    return $self->{ERRSTR};
435
}
439
}
436
 
440
 
437
 
-
 
438
 
-
 
439
#-------------------------------------------------------------------------------
441
#-------------------------------------------------------------------------------
440
# Function        : rows
442
# Function        : rows
441
#
443
#
442
# Description     : Return the number of rows extracted in the query
444
# Description     : Return the number of rows extracted in the query
443
#
445
#