X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F745db2.t;h=c32352989429282a7fdd8948704d5c42a85cffe4;hb=64ae166780d0cb2b9577e506da9b9b240c146d20;hp=bd931d241b925bf36d7cfbf927f9ec3ca47e3ec4;hpb=835cdc8d730b128213ab8b10f6cf81326ebfc0e8;p=dbsrgits%2FDBIx-Class.git diff --git a/t/745db2.t b/t/745db2.t index bd931d2..c323529 100644 --- a/t/745db2.t +++ b/t/745db2.t @@ -66,6 +66,19 @@ my $lim = $ars->search( {}, is( $lim->count, 2, 'ROWS+OFFSET count ok' ); is( $lim->all, 2, 'Number of ->all objects matches count' ); +# Limit with select-lock +TODO: { + local $TODO = "Seems we can't SELECT ... FOR ... on subqueries"; + lives_ok { + $schema->txn_do (sub { + isa_ok ( + $schema->resultset('Artist')->find({artistid => 1}, {for => 'update', rows => 1}), + 'DBICTest::Schema::Artist', + ); + }); + } 'Limited FOR UPDATE select works'; +} + # test iterator $lim->reset; is( $lim->next->artistid, 101, "iterator->next ok" );