From: Alexander Hartmaier Date: Thu, 10 Jun 2010 12:14:39 +0000 (+0200) Subject: added test for limit queries failing on Oracle X-Git-Tag: v0.08123~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=bd691933d70d05a09c34dd7df75a14cee44cc3f4 added test for limit queries failing on Oracle --- diff --git a/t/73oracle.t b/t/73oracle.t index c13dfaa..62a0349 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -251,6 +251,18 @@ is( $it->next, undef, "next past end of resultset ok" ); is( scalar @results, 1, "Group by with limit OK" ); } +# test identifiers over the 30 char limit +{ + lives_ok { + my @results = $schema->resultset('CD')->search(undef, { + prefetch => 'very_long_artist_relationship', + rows => 3, + offset => 0, + })->all; + ok( scalar @results > 0, 'limit with long identifiers returned something'); + } 'limit with long identifiers executed successfully'; +} + # test with_deferred_fk_checks lives_ok { $schema->storage->with_deferred_fk_checks(sub { diff --git a/t/lib/DBICTest/Schema/CD.pm b/t/lib/DBICTest/Schema/CD.pm index fadd539..e0fa8fc 100644 --- a/t/lib/DBICTest/Schema/CD.pm +++ b/t/lib/DBICTest/Schema/CD.pm @@ -40,6 +40,9 @@ __PACKAGE__->add_unique_constraint([ qw/artist title/ ]); __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist', undef, { is_deferrable => 1, }); +__PACKAGE__->belongs_to( very_long_artist_relationship => 'DBICTest::Schema::Artist', 'artist', { + is_deferrable => 1, +}); # in case this is a single-cd it promotes a track from another cd __PACKAGE__->belongs_to( single_track => 'DBICTest::Schema::Track', 'single_track',