From: Peter Rabbitson Date: Thu, 2 Jul 2009 05:43:30 +0000 (+0000) Subject: Merge 'trunk' into 'mssql_top_fixes' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c4de2c37d9577b3579fe6a1e621f95a36f50363;p=dbsrgits%2FDBIx-Class-Historic.git Merge 'trunk' into 'mssql_top_fixes' r6875@Thesaurus (orig r6874): ribasushi | 2009-06-30 12:39:06 +0200 Allow broken resultsource-class-derived objects to still work r6876@Thesaurus (orig r6875): ribasushi | 2009-06-30 12:40:46 +0200 clarify r6878@Thesaurus (orig r6877): ash | 2009-06-30 13:48:13 +0200 Update POD on Dynamic sub-classing r6883@Thesaurus (orig r6882): ribasushi | 2009-06-30 17:36:38 +0200 r6815@Thesaurus (orig r6814): ribasushi | 2009-06-28 10:32:42 +0200 Branch to explore double joins on search_related r6816@Thesaurus (orig r6815): ribasushi | 2009-06-28 10:34:16 +0200 Thetest case that started it all r6817@Thesaurus (orig r6816): ribasushi | 2009-06-28 10:35:11 +0200 The proposed fix (do not add an extra join if it is already present in the topmost join) r6818@Thesaurus (orig r6817): ribasushi | 2009-06-28 11:04:26 +0200 Minor omission r6819@Thesaurus (orig r6818): ribasushi | 2009-06-28 11:07:33 +0200 Adjust a couple of tests for new behavior (thus all of this might be backwards incompatible to the point of being useless): The counts in t/90join_torture.t are now 5*3, not 5*3*3, as a second join is not induced by search_related The raw sql scan in t/prefetch/standard.t is just silly, won't even try to understand it Just to maintain the TreeLike folding, I add a 3rd children join which was inserted by search_related before the code changes r6889@Thesaurus (orig r6888): ribasushi | 2009-06-30 19:36:11 +0200 Todoify test for now r6890@Thesaurus (orig r6889): ribasushi | 2009-06-30 19:37:05 +0200 Todoify test for now (2) r6892@Thesaurus (orig r6891): ribasushi | 2009-06-30 19:52:31 +0200 Todoify test for now (3) r6903@Thesaurus (orig r6902): ribasushi | 2009-07-01 08:46:12 +0200 Fixed deadlock test r6904@Thesaurus (orig r6903): ribasushi | 2009-07-01 12:22:00 +0200 Clarify exception text r6907@Thesaurus (orig r6906): ribasushi | 2009-07-01 13:23:46 +0200 r6821@Thesaurus (orig r6820): ribasushi | 2009-06-28 13:09:11 +0200 Branch for prefetch+group play r6823@Thesaurus (orig r6822): ribasushi | 2009-06-28 14:38:36 +0200 Normalize group_by r6824@Thesaurus (orig r6823): ribasushi | 2009-06-28 14:39:54 +0200 Proper prefetch+group test r6826@Thesaurus (orig r6825): ribasushi | 2009-06-28 14:42:48 +0200 Whoops r6828@Thesaurus (orig r6827): ribasushi | 2009-06-28 15:06:57 +0200 Lose the literal sql bits - castaway is right it's silly to support those r6833@Thesaurus (orig r6832): ribasushi | 2009-06-28 22:38:43 +0200 Rogue comments r6837@Thesaurus (orig r6836): ribasushi | 2009-06-29 09:44:25 +0200 A couple of test fixes r6838@Thesaurus (orig r6837): ribasushi | 2009-06-29 09:46:13 +0200 Support for -select/-as in SQLAHacks field selection r6839@Thesaurus (orig r6838): ribasushi | 2009-06-29 09:49:53 +0200 This is tested elsewhere r6840@Thesaurus (orig r6839): ribasushi | 2009-06-29 09:50:43 +0200 This is tested elsewhere (2) r6841@Thesaurus (orig r6840): ribasushi | 2009-06-29 10:07:09 +0200 Test cleanups r6842@Thesaurus (orig r6841): ribasushi | 2009-06-29 10:11:13 +0200 Most of the grouped prefetch solution r6843@Thesaurus (orig r6842): ribasushi | 2009-06-29 10:14:45 +0200 clearer r6845@Thesaurus (orig r6844): ribasushi | 2009-06-29 12:05:37 +0200 And score! (all works) r6882@Thesaurus (orig r6881): ribasushi | 2009-06-30 16:23:06 +0200 rs->get_column now properly recognizes prefetch and collapses if at all possible r6886@Thesaurus (orig r6885): ribasushi | 2009-06-30 17:39:58 +0200 Whoops r6910@Thesaurus (orig r6909): ribasushi | 2009-07-01 13:27:15 +0200 Optimize set_column on uninserted objects r6921@Thesaurus (orig r6920): caelum | 2009-07-01 17:40:32 +0200 r5859@hlagh (orig r6912): caelum | 2009-07-01 06:21:30 -0700 new connected() for dbd::sybase users r5860@hlagh (orig r6913): caelum | 2009-07-01 06:25:46 -0700 add a couple of dbd::sybase reconnection tests r5861@hlagh (orig r6914): caelum | 2009-07-01 06:35:07 -0700 better connection test r5862@hlagh (orig r6915): caelum | 2009-07-01 06:45:05 -0700 use dbh->do for connected instead of prepare_cached r5863@hlagh (orig r6916): ribasushi | 2009-07-01 06:55:21 -0700 Segfault r5864@hlagh (orig r6917): caelum | 2009-07-01 07:03:22 -0700 use ->do instead of ->prepare_cached in oracle's connected() too r5865@hlagh (orig r6918): caelum | 2009-07-01 08:20:52 -0700 fix segfault with old DBD::Sybase r5866@hlagh (orig r6919): caelum | 2009-07-01 08:39:18 -0700 move connection tests into _ping() r6924@Thesaurus (orig r6923): ijw | 2009-07-01 19:34:32 +0200 Added a test for a resultset to related-resultset join for 0 related records r6928@Thesaurus (orig r6927): ijw | 2009-07-01 20:04:16 +0200 Additional tests on prefetch - illustrates the bug with left-join has_many (NULL row returned) and the one that results from the trivial fix (prefetch gives no artist) --- 7c4de2c37d9577b3579fe6a1e621f95a36f50363 diff --cc lib/DBIx/Class/Storage/DBI.pm index 6a769a5,63d41e4..f1a977e --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@@ -1427,7 -1439,8 +1448,6 @@@ sub _select_args (qw/order_by group_by having _virtual_order_by/ ) }; - - $sql_maker->{for} = delete $attrs->{for}; - return ('select', $attrs->{bind}, $ident, $bind_attrs, $select, $where, $order, @limit); }