Skip to Content.
Sympa Menu

freetds - Possible corruption

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mike Eales" <m.eales AT ims.telstra.com.au>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Possible corruption
  • Date: Tue, 29 Oct 2002 20:13:06 -0500


On a patched Solaris 8 (SPARC) server, running:
Perl 5.6.1 or 5.8.0
DBI 1.30 or 1.28 or 1.21
DBD-Sybase 0.95 or 0.94 communicating with a Sybase server.
(All version demonstrate the same symptoms)

Freetds 0.53 works fine with the above, 0.6 seems to have the following
problem:
If I do a select on a field (using $Sth->fetchrow_hashref()) and then use
this information in another query, the query fails.
The string seems to contain a non-printable character.

eg:

$Query = "select Serial, Identifier from alerts.status where Severity =
2;";
$Sth = $OsDbhRead->prepare($Query) || die "Unable to prepare
query.\n$DBI::errstr\n";
$Sth->execute || die "Unable to execute query\n$DBI::errstr\n";

while ($MyData = $Sth->fetchrow_hashref()) {

$Query = "update alerts.status set Flag = 3 where Identifier =
'$MyData->{Identifier}'";

print "$Query\n";

$OsDbhWrite->do($Query) || die "Unable to do Query.\n$DBI::errstr\n";

}

The above will not set the field "Flag" to 3 on any valid rows.
If I set manualy set Query it works, indicating that the return result
from the first query has a problem
eg Modifying the $Query var by replace Identifier =
'$MyData->{Identifier}' with
Identifier = 'ABC12345678'

If I use the printed query in both the code above, this also works wich
seems to me to indicate a non-printable character problem.

As mentioned 0.53 works as expected with the above code and the extact
same environment, but the new version 0.6 does not.

Thanks.
Mike.




Archive powered by MHonArc 2.6.24.

Top of Page