Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 120222
Status: new
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: ZHENYZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.082840
Fixed in: (no value)



Subject: DBIx::Class::Storage::DBI::Sybase::ASE::update/_update_blobs bug
Download (untitled) / with headers
text/plain 1.4k
On updating a Sybase ASE blob column, I get error message like below, DBIx::Class::Row::update(): Can't update XXX=HASH(0x50912a8): row not found at xxx I did some investigation and I think it's a bug in DBIx::Class::Storage::DBI::Sybase::ASE. The "row not found" error message comes from https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Row.pm#L558. There it checks the return value of storage class's update() method, that is called several lines above, at https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Row.pm#L552 And for DBIx::Class::Storage::DBI::Sybase::ASE, its update() method processes the blob columns in a different way from the non-blob columns. In my case where I update just a single blob column, it would get out of update() from https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm#L490, where $rv is obtained from _update_blobs() at https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm#L472 And if we look at _update_blobs() https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm#L747, we see it does not have an explicit return. This would cause $rv in DBIx::Class::Storage::DBI::Sybase::ASE::update() and $rows in DBIx::Class::Row::update() to be a false value. IMHO the fix can be return @pks_to_update from DBIx::Class::Storage::DBI::Sybase::ASE::_update_blobs()


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.