It is a recursive attributes hash chain when call search on the same
resultset many times.
# invoked, and that's just bad...
###
+ # Small hack, remove potential infinity _sql_maker_select_args chain
+ # when call queries on the same resultset many times
+ delete $attrs->{_sqlmaker_select_args};
+
return ( 'select', @{ $orig_attrs->{_sqlmaker_select_args} = [
$ident, $select, $where, $attrs, @limit_args
]} );
--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
+
+BEGIN {
+ eval "use Test::LeakTrace";
+ plan 'skip_all' => 'Test::LeakTrace required for this tests' if $@;
+}
+
+my $schema = DBICTest->init_schema();
+
+plan tests => 1;
+
+my $artist_rs = $schema->resultset('Artist')->search({},{order_by=>'me.artistid'});
+no_leaks_ok {
+ my @artists = $artist_rs->all;
+};