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: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Bug in DBD::Sybase
Date: Oct 31 1997 11:08PM

I've just found a weird bug in DBD::Sybase 0.05 (but it's probably
also there in previous versions).

I was trying to port dbschema.pl from Sybase::DBlib to DBD::Sybase,
and everything was going fine, until I tried getting the
grant/revoke rows via sp_helprotect $objectName.

The following little script illustrates the problem:

#!/usr/local/bin/perl

use DBI;

$d = DBI->connect('dbi:Sybase:', 'sa', '');
#$d->do('use BugTrack');

$s = $d->prepare("sp_helprotect 'sysusers'");
$s->execute;
print $s->errstr, "\n";
exit(0);

Which produces the following output:

kiruna (2:55pm):21 > perl db.pl
Server message:
Message number: 267, Severity 16, State 1, Line 200
 Procedure 'sp_helprotect'
Message String: Object '#sysprotects2' cannot be found.

The same script written using the Sybase::CTlib module works fine.

I'll try to find some time to find what is causing this (it's very 
weird - it's like the temp table is dropped in the middle of the
execution of the stored proc)...

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler