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

Report information
The Basics
Id:
120222
Status:
open
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Important
Broken in:
0.082840
Fixed in:
(no value)



Subject: DBIx::Class::Storage::DBI::Sybase::ASE::update/_update_blobs bug
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()
On Mon Feb 13 08:00:31 2017, ZHENYZ wrote:
Show quoted text
> 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
Hi! Thank you for the report, and apologies for getting back to you so late. Your analysis is spot-on. Do you still have access to a Sybase ASE system where we could test a fix / test-suite addition? Thanks in advance!
Sorry I just saw this now. Yes I still have access to Sybase ASE. Let me know if there's something I can test. Thanks! On Fri Nov 08 06:03:49 2019, RIBASUSHI wrote:
Show quoted text
> On Mon Feb 13 08:00:31 2017, ZHENYZ wrote:
> > 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
> > > Hi! > > Thank you for the report, and apologies for getting back to you so > late. Your analysis is spot-on. Do you still have access to a Sybase > ASE system where we could test a fix / test-suite addition? > > Thanks in advance!
On Tue Jun 09 15:46:43 2020, ZHENYZ wrote:
Show quoted text
> Sorry I just saw this now. Yes I still have access to Sybase ASE. Let > me know if there's something I can test. Thanks! >
I should have something to test in the coming days. In the meantime: can you please get the latest DBIC ( `cpanm --look DBIx::Class` ), and make sure you are able to get t/inflate/datetime_sybase.t and t/746sybase.t to work against your RDBMS. Thanks!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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