From: Peter Rabbitson Date: Tue, 11 Dec 2012 11:00:18 +0000 (+0100) Subject: Partial fix for the hash randomization issues in 5.17.6+ X-Git-Tag: v0.08205~70 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b563960fb2b331e072f58a135bb69e589f063fe9;p=dbsrgits%2FDBIx-Class.git Partial fix for the hash randomization issues in 5.17.6+ NOTE: this is *not* a complete fix. There are at least two other places which do not manifest themselves due to lack of tests. Work underway... --- diff --git a/Changes b/Changes index cf52651..fbae600 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,7 @@ Revision history for DBIx::Class - More robust behavior under heavily threaded environments - make sure we do not have refaddr reuse in the global storage registry - Fix failing test on 5.8 under Win32 (RT#81114) + - Fix hash-randomization test issues (RT#81638) 0.08204 2012-11-08 * New Features / Changes diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 70ff1fb..bc959d5 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -920,7 +920,7 @@ sub _build_unique_cond { and !$ENV{DBIC_NULLABLE_KEY_NOWARN} and - my @undefs = grep { ! defined $final_cond->{$_} } (keys %$final_cond) + my @undefs = sort grep { ! defined $final_cond->{$_} } (keys %$final_cond) ) { carp_unique ( sprintf ( "NULL/undef values supplied for requested unique constraint '%s' (NULL " @@ -3321,7 +3321,7 @@ sub _resolved_attrs { if (my $cols = delete $attrs->{columns}) { for my $c (ref $cols eq 'ARRAY' ? @$cols : $cols) { if (ref $c eq 'HASH') { - for my $as (keys %$c) { + for my $as (sort keys %$c) { push @sel, $c->{$as}; push @as, $as; }