From: Norbert Buchmuller Date: Sat, 20 Dec 2008 21:47:11 +0000 (+0000) Subject: Merge 'trunk' into 'sqla_1.50_compat' X-Git-Tag: v0.08240~189^2~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c4d239930f5d96be7ddccdb59ff07ff1bd43698d;p=dbsrgits%2FDBIx-Class.git Merge 'trunk' into 'sqla_1.50_compat' r5340@vger: mendel | 2008-12-20 22:01:53 +0100 r5134@vger (orig r5117): ribasushi | 2008-11-13 08:34:26 +0100 result_class goodies by Caelum: - result_class can now be specified as a search attribute, attaching it to the returned resultset - the specified class is now autoloaded via ensure_loaded() r5136@vger (orig r5119): ribasushi | 2008-11-13 19:34:29 +0100 resultset attribute from can now take a scalarref and use it verbatim r5145@vger (orig r5128): ribasushi | 2008-11-14 10:46:00 +0100 Document the new from usage r5152@vger (orig r5134): ribasushi | 2008-11-14 18:44:25 +0100 we use register_extra_source() now r5162@vger (orig r5140): castaway | 2008-11-15 22:08:30 +0100 Added failing create-multi test r5163@vger (orig r5141): ribasushi | 2008-11-16 10:53:07 +0100 whops r5166@vger (orig r5142): norbi | 2008-11-16 20:12:42 +0100 r5165@vger: mendel | 2008-11-16 20:11:42 +0100 * Merged in changes from 'resultsetcolumn_custom_columns' branch, r5179@vger (orig r5149): ribasushi | 2008-11-16 23:14:13 +0100 Revert castaway's test - mildly bogus r5180@vger (orig r5150): ribasushi | 2008-11-16 23:16:31 +0100 Add new test relationship - a track can have a relates single_cd r5181@vger (orig r5151): ribasushi | 2008-11-16 23:23:38 +0100 might_have test for castaway to break r5182@vger (orig r5152): ribasushi | 2008-11-17 01:33:51 +0100 rip away a horribly wrong create_via_update test (will pass when multicreate is merged) r5183@vger (orig r5153): ribasushi | 2008-11-17 02:00:28 +0100 One more (passing) multicreate test and a bit of cleanup r5184@vger (orig r5154): ribasushi | 2008-11-17 02:59:53 +0100 Two more sets of might_have - has_many relationships for extra tests r5185@vger (orig r5155): ribasushi | 2008-11-17 03:09:18 +0100 Two failing multicreate tests (the root cause of castaway's problem) r5186@vger (orig r5156): ribasushi | 2008-11-17 03:48:57 +0100 Silence cdbi tests like everything else r5187@vger (orig r5157): ribasushi | 2008-11-17 04:01:39 +0100 Failing tests by zby, showing that recursing insert() gets in the way of some exotic insert scenarious - waiting for mst to decide course of action r5188@vger (orig r5158): ribasushi | 2008-11-17 12:04:54 +0100 Extend might_have test with ideas from zby r5192@vger (orig r5161): ribasushi | 2008-11-20 11:25:32 +0100 Trunk passes tests again - todoify everything multicreate related to branch it out, as the task turned out to be more complex (no indentation to aid future merging) r5195@vger (orig r5164): ribasushi | 2008-11-20 12:01:14 +0100 CDBI-compat tests by Dave Horwoth: OK. I've attached a patch to t/cdbi-t/15-accessor.t that does several things: (1) Fixes the way the arguments are built so the sheep argument is correct in the tests. (2) Adds explicit tests for the number of sheep so we can be sure which database record is actually returned. (3) Adds tests for find_or_create() with modified accessor names. (4) Fixes the test for search() to report all errors I still don't fully understand what's going on in the output below but I think they are genuine test failures. I'd appreciate it if somebody else could run the tests to make sure the results are not some artefact of my test environment. I also attached a copy of the modified test script so you don't even have to apply the patch first :) I don't know what the DestroyWarning at the end is all about. r5196@vger (orig r5165): ribasushi | 2008-11-20 12:09:11 +0100 Minor doc patch by Caelum r5199@vger (orig r5168): castaway | 2008-11-20 14:49:39 +0100 Fix pod errors so that some storage subclasses show up in cpan properly r5291@vger (orig r5222): ash | 2008-12-03 18:23:00 +0100 Make the many-to-many warning use warnings::register; r5317@vger (orig r5239): jnapiorkowski | 2008-12-15 23:02:19 +0100 changes to replication so that if a replicant is offline when we do the initial connection (or if we need to globally reconnect later) the connection does not die. This is different from when a replicant is available just not listening, or if the replicant is too laggy. Thanks David Steinbrunner for the patch suggestions. r5323@vger (orig r5245): groditi | 2008-12-16 23:56:07 +0100 r24740@martha (orig r5230): groditi | 2008-12-09 20:28:10 -0500 fix for bug. all tests seem to pass, we still need a new test and more research r5324@vger (orig r5246): groditi | 2008-12-16 23:56:29 +0100 r24754@martha (orig r5241): groditi | 2008-12-16 16:27:06 -0500 Introduce 'any_null_means_no_value' option to eliminate wasteful queries. The option is off by default and must be explicitly turned on. Tests, + docs included r5325@vger (orig r5247): groditi | 2008-12-16 23:57:11 +0100 r24756@martha (orig r5243): groditi | 2008-12-16 17:42:10 -0500 rename option to undef_on_null_fk and make it default for belongs_to r5326@vger (orig r5248): groditi | 2008-12-16 23:57:34 +0100 r24757@martha (orig r5244): groditi | 2008-12-16 17:52:12 -0500 minor typo and style change r5328@vger (orig r5250): groditi | 2008-12-17 00:27:57 +0100 somehow i messed up the merge. this fixes it r5329@vger (orig r5251): ash | 2008-12-17 00:45:51 +0100 Try to fix test on 5.10 r5332@vger (orig r5254): ribasushi | 2008-12-18 12:28:38 +0100 Some cleanups to the m2m warnings test r5336@vger (orig r5258): jnapiorkowski | 2008-12-19 20:52:44 +0100 more noise debugging messages if debug is on, minor doc tweaks, changes so that the fake sqlite tests will work and laid the groundwork for replication without dbatabase native replication support. r5337@vger (orig r5259): jnapiorkowski | 2008-12-19 21:48:35 +0100 altered schema->populate so that it is a very thin wrapper on top of resultset->populate and changed resultset_populate so that is accepted both the arrayref of hashes and the arrayref of arrayref style of args. Documented this, updated the tests a bit to make sure it is all good. r5338@vger (orig r5260): ribasushi | 2008-12-19 22:09:17 +0100 Todoify cdbi failing tests, waiting for schwern --- c4d239930f5d96be7ddccdb59ff07ff1bd43698d diff --cc t/91debug.t index a9a1b73,e53a1d5..d940eaa --- a/t/91debug.t +++ b/t/91debug.t @@@ -55,19 -53,10 +55,19 @@@ open(STDERR, '>&STDERRCOPY') $schema->storage->debugcb( sub { $sql = $_[1] } ); my @cds = $schema->resultset('CD')->search( { artist => 1, cdid => { -between => [ 1, 3 ] }, } ); - like( - $sql, - qr/\QSELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? ): '1', '1', '3'\E/, - 'got correct SQL with all bind parameters' + is_same_sql_bind( + $sql, [], - "SELECT me.cdid, me.artist, me.title, me.year, me.genreid FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? ): '1', '1', '3'", [], ++ "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? ): '1', '1', '3'", [], + 'got correct SQL with all bind parameters (debugcb)' + ); + + $schema->storage->debugcb(undef); + $schema->storage->debugobj(DBIC::DebugObj->new(\$sql, \@bind)); + @cds = $schema->resultset('CD')->search( { artist => 1, cdid => { -between => [ 1, 3 ] }, } ); + is_same_sql_bind( + $sql, \@bind, - "SELECT me.cdid, me.artist, me.title, me.year, me.genreid FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? )", ["'1'", "'1'", "'3'"], ++ "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? )", ["'1'", "'1'", "'3'"], + 'got correct SQL with all bind parameters (debugobj)' ); } diff --cc t/99dbic_sqlt_parser.t index 1ad7832,bbac5e3..26d6b50 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@@ -8,8 -8,8 +8,8 @@@ use DBICTest BEGIN { eval "use DBD::mysql; use SQL::Translator 0.09;"; plan $@ - ? ( skip_all => 'needs SQL::Translator 0.09 for testing' ) + ? ( skip_all => 'needs DBD::mysql and SQL::Translator 0.09 for testing' ) - : ( tests => 102 ); + : ( tests => 114 ); } my $schema = DBICTest->init_schema();