10 years agoAdd foreign_resultobj to the customrel signature
Peter Rabbitson [Wed, 11 Jun 2014 14:32:59 +0000]
Add foreign_resultobj to the customrel signature

Tests in next commit

10 years agoPedantry - settle on rel_name vs relname, consistency throughout
Peter Rabbitson [Wed, 11 Jun 2014 14:09:22 +0000]
Pedantry - settle on rel_name vs relname, consistency throughout

Only outlier is relname_to_table_alias, which should have never existed
in the first place. Punting deprecation/etc cycle until future Oracle
work... sigh

10 years agoRename (with a silent compat shim) couple of badly named customcond args
Peter Rabbitson [Wed, 11 Jun 2014 13:22:31 +0000]
Rename (with a silent compat shim) couple of badly named customcond args

foreign_relname makes absolutely no sense - it *is* a relationship after all,
of course it has a name. Now renamed to rel_name to be consistent with
the relationship condition resolver

self_rowobj uses the old rowobj nomenclature - switch to self_resultobj

10 years agoCentralize custom rel args check, be more thorough
Peter Rabbitson [Wed, 11 Jun 2014 13:51:30 +0000]
Centralize custom rel args check, be more thorough

10 years agoAdjust error messages - joinfrees can be returned from noncode rels
Peter Rabbitson [Wed, 11 Jun 2014 11:15:02 +0000]
Adjust error messages - joinfrees can be returned from noncode rels

10 years agoFirst step to add some sanity to _resolve_condition
Peter Rabbitson [Wed, 11 Jun 2014 10:05:13 +0000]
First step to add some sanity to _resolve_condition

The original problem starts here:
 <mst> oh, yeah, I just used to check ref and randomly swap things
 <mst> it worked for enough years :)
 <ribasushi> I will be forwarding you my psychiatrist bill

READ DIFF AT YOUR OWN RISK

Over the years _resolve_condition has accumulated 3 (or 4, or 5, depends
how you look at it) distinct call-modes. None having anything to do with
another. Also it is a hot method, holding crucial functionality, which
of course means that currently at least 3 projects on CPAN are using it,
despite the private attribute. Which in turn means couple more orders of
magnitude of users on the DarkPAN. Thus just killing this method
outright *without a replacement* is not an option.

A from-scratch replacement in the face of only one person currently
*barely* understanding this codepath is a scary proposition.

Instead create an elaborate (and scarily complete) shim to proxy to a
new method holding all the logic (with the idea of making it an official
API in the coming commits).

There are no changes to any other codepaths, as this is how we ensure that
the shim is sane, and works. Next step is to erradicate all cases of the old
call in the current codebase (while leaving the sub/shim intact)/

Now let's see if we can fix CampusExplorer's bugs first...

10 years agoFix incorrect handling of custom relationship conditions containing literals
Peter Rabbitson [Tue, 10 Jun 2014 11:54:32 +0000]
Fix incorrect handling of custom relationship conditions containing literals

10 years agoRevert heading change from 06752a03d, centralize the URL spec
Peter Rabbitson [Fri, 6 Jun 2014 16:38:52 +0000]
Revert heading change from 06752a03d, centralize the URL spec

There were several broken links referring to the old way of doing
things, and help/support sounds better anyway. Reverting with added
comments and whatnot

10 years agoFix grave resultset-level delete/update bug
Peter Rabbitson [Wed, 4 Jun 2014 23:44:37 +0000]
Fix grave resultset-level delete/update bug

In case of a read-modify cycle (usually due to multicolumn PK, without
multicolumn IN support) DBIC would end up with a null condition and nuke
the entire underlying table from orbit

I have no words towards my younger self...

10 years agoDo not skip running from_storage filter when a NULL is returned
Peter Rabbitson [Wed, 4 Jun 2014 23:10:50 +0000]
Do not skip running from_storage filter when a NULL is returned

10 years agoUse a nullable column for the ::FC test
Peter Rabbitson [Wed, 4 Jun 2014 23:05:31 +0000]
Use a nullable column for the ::FC test

This is just a retarget, no test was actually modified

10 years agoTeach FC about literals
Peter Rabbitson [Wed, 4 Jun 2014 12:53:48 +0000]
Teach FC about literals

10 years agoA number of equivalent-logic ::FC refactors
Peter Rabbitson [Wed, 4 Jun 2014 11:55:30 +0000]
A number of equivalent-logic ::FC refactors

Stop invoking a comparison on the unfiltered values - delegate it properly
to set_column()

10 years agoReorganize IC column setters
Peter Rabbitson [Wed, 4 Jun 2014 11:28:42 +0000]
Reorganize IC column setters

Should again result in no functional changes

10 years agoRename some variables and reformat the FC/IC codepaths for clarity
Peter Rabbitson [Mon, 2 Jun 2014 12:05:45 +0000]
Rename some variables and reformat the FC/IC codepaths for clarity

Zero functional changes

10 years agoClarify FC/IC conflict exception
Peter Rabbitson [Mon, 2 Jun 2014 10:20:45 +0000]
Clarify FC/IC conflict exception

10 years agoCall mro reinit in tests only on 5.8
Peter Rabbitson [Sat, 31 May 2014 09:34:29 +0000]
Call mro reinit in tests only on 5.8

10 years agoFix incorrect handling of stringifiable objects in cond collapser
Peter Rabbitson [Wed, 4 Jun 2014 00:17:20 +0000]
Fix incorrect handling of stringifiable objects in cond collapser

Thinko introduced in the recent 8d005ad9

10 years agoConsolidate handling of "is this a literal" and "is this a value"
Peter Rabbitson [Wed, 4 Jun 2014 03:30:26 +0000]
Consolidate handling of "is this a literal" and "is this a value"

In the process fix inability of IC to deal with \[], and simplify
the overal codepath bind value passing codepath

Aside from the bugfixes there should be no functional changes

Work inspired by a report and preliminary patch from dim0xff++

10 years agoUse the correct $PROGRAM_NAME for the initial dbicadmin POD gneration
Peter Rabbitson [Tue, 27 May 2014 23:21:13 +0000]
Use the correct $PROGRAM_NAME for the initial dbicadmin POD gneration

10 years agospelling fix
Karen Etheridge [Tue, 27 May 2014 23:09:20 +0000]
spelling fix

10 years agoRetire DBIC/SqlMakerTest.pm now that SQLA::Test provides the same function
Peter Rabbitson [Mon, 26 May 2014 11:47:52 +0000]
Retire DBIC/SqlMakerTest.pm now that SQLA::Test provides the same function

10 years agoSwitch most remaining debug-hooks to $dbictest_schema->is_executed_querycount()
Peter Rabbitson [Wed, 28 May 2014 03:04:27 +0000]
Switch most remaining debug-hooks to $dbictest_schema->is_executed_querycount()

10 years agoRetire DBIC::DebugObj, replace with $dbictest_schema->is_executed_sql_bind()
Peter Rabbitson [Tue, 27 May 2014 17:17:26 +0000]
Retire DBIC::DebugObj, replace with $dbictest_schema->is_executed_sql_bind()

This cuts down on a lot of the silliness with debugcb/debugobj, and makes
for more precise tests as a whole. Went through great pains to not disturb
any existing tests, fingercross this is indeed the case

Read under -w for sanity

10 years agoExcise live test left over after ac0c082542
Peter Rabbitson [Tue, 27 May 2014 16:58:12 +0000]
Excise live test left over after ac0c082542

No access to a live test system currently, and likely the test is incorrect
anyway (no mention of significant parenthesis)

10 years agoConsolidate pg/mysql and standalone SQLite savepoint tests to run on all 3
Peter Rabbitson [Tue, 27 May 2014 06:29:46 +0000]
Consolidate pg/mysql and standalone SQLite savepoint tests to run on all 3

A larger consolidation will take place later with T::WV, but all in due time

10 years agoFix multiple savepointing transactions on DBD::SQLite
Peter Rabbitson [Tue, 27 May 2014 11:15:45 +0000]
Fix multiple savepointing transactions on DBD::SQLite

Problem was missed during review of 86a51471ce (how the fuck did I let this
abomination through anyway), and not encountered due to insufficient testing.
The naive statement parser in DBD::SQLite when running against older libsqlite
mistakenly treats ROLLBACK TRANSACTION TO... as an actual TXN rollback, and
as a result desyncs the internal AutoCommit flag state [1]
Fix by simply using the shorter (still valid) syntax [2], and by removing the
sloppy workaround hiding the actual problem.

[1] https://github.com/DBD-SQLite/DBD-SQLite/blob/1.42/dbdimp.c#L824:L852
[2] http://www.sqlite.org/lang_savepoint.html

10 years agoFix erroneous todoification in sqlite test
Peter Rabbitson [Tue, 27 May 2014 11:34:31 +0000]
Fix erroneous todoification in sqlite test

10 years agoLess warning noise from sqlite test
Peter Rabbitson [Tue, 27 May 2014 08:22:29 +0000]
Less warning noise from sqlite test

10 years agoMove the DSN-lock machinery from 8d6b1478d into DBICTest::BaseSchema
Peter Rabbitson [Tue, 27 May 2014 08:09:43 +0000]
Move the DSN-lock machinery from 8d6b1478d into DBICTest::BaseSchema

This is just a c/p job, expecting zero functional changes

The t/admin/02ddl.t are cosmetic changes fixing a nested &cref leak never
before encountered on <= 5.8.7

10 years agoConsolidate lib-wide frameskip, adjust the ::RunMode loading order
Peter Rabbitson [Tue, 27 May 2014 08:05:08 +0000]
Consolidate lib-wide frameskip, adjust the ::RunMode loading order

10 years agoReaching for IO::File here makes no sense
Peter Rabbitson [Tue, 27 May 2014 05:53:38 +0000]
Reaching for IO::File here makes no sense

10 years agoThis test was essentially c/p-ed in 2cc3a7be3, consolidate
Peter Rabbitson [Tue, 27 May 2014 05:50:48 +0000]
This test was essentially c/p-ed in 2cc3a7be3, consolidate

The overriding difference is the new-connection == new-storage == new-sqla
Add an explicit codepath to test that, but overall there is plenty of
other places that verify this behavior to death

Examine under -w -C -M to make sense out of the consolidation (minimal
changes were attempted)

10 years agoImprove complex order+prefetch exception message
Peter Rabbitson [Sun, 25 May 2014 09:52:13 +0000]
Improve complex order+prefetch exception message

10 years agoUpdated discard_changes docs regarding { force_pool => 'master' }
Naveed Massjouni [Fri, 9 May 2014 18:51:26 +0000]
Updated discard_changes docs regarding { force_pool => 'master' }

10 years agoThe initial (now passing) test for RT#93244 (fixed in 8d005ad9)
Alexander Hartmaier [Wed, 5 Mar 2014 17:43:48 +0000]
The initial (now passing) test for RT#93244 (fixed in 8d005ad9)

10 years agoMassively refactor and sanify condition collapsing
Peter Rabbitson [Sat, 17 May 2014 09:39:49 +0000]
Massively refactor and sanify condition collapsing

Wow... what a ride. This commit adds a faithful reimplementation of the
SQLA descend algorithm, but instead of SQL produces a reduced HASH that
nevertheless corresponds to the original query 1:1 (or so I *really* hope)

This is another one of these "I can try it with DQ but I don't even have
tests" stories, so once again opted to implement things the "dumb" way.

The benefits are quite substantial:
- Better deduplication of WHERE condition
- Consolidated functions - the vaguely similar logic in the current version
  of _collapse_cond replaces almost the entirety of:
    ::DBIHacks::_extract_fixed_condition_columns
    ::ResultSet::_collapse_cond
    ::ResultSet::_stack_cond
- Extra fixes for create/populate inheritance corner cases
- More predictable SQL condition generation order (which incidentally may
  prove problematic down the road with broken tests, but oh well, we'll
  burn when we get there)
- Ton of extra tests and corner cases

We even managed to fulfill a longstanding TODO, even though it is a *lucky*
side-effect and not a real fix. Making a note to address this later... sigh.

This work started from d8b7d9f58..337f3ee80, which while taking the right
direction had too many loose ends. ilmari++

10 years agoRemove dead code missed by cleanup b72339859
Peter Rabbitson [Thu, 22 May 2014 12:34:11 +0000]
Remove dead code missed by cleanup b72339859

10 years agoAdd test ensuring we do not lose binds on esoteric RSC+distinct
Peter Rabbitson [Fri, 16 May 2014 09:31:21 +0000]
Add test ensuring we do not lose binds on esoteric RSC+distinct

Test inspired by auditing cc2b92553 (a precursor of ad1d374e60)

10 years agoRefactor _recurse_fields to return the bind values
Dagfinn Ilmari Mannsåker [Sat, 12 Apr 2014 17:29:47 +0000]
Refactor _recurse_fields to return the bind values

Only ->select actually wants it in $self->{select_bind}, the others
either don't care or want them somewhere else.

10 years agoFix multi-value literal populate not working with simplified bind spec
Peter Rabbitson [Thu, 22 May 2014 11:37:08 +0000]
Fix multi-value literal populate not working with simplified bind spec

This arcane use-case got missed when 1b5ddf23 was integrated

10 years agoFix bogus reference to related class (introduced way back in 97c96475)
Peter Rabbitson [Wed, 21 May 2014 07:57:50 +0000]
Fix bogus reference to related class (introduced way back in 97c96475)

10 years agoRemove forgotten part of a48693f4 (incompletely reverted by e327f126)
Peter Rabbitson [Tue, 20 May 2014 14:16:40 +0000]
Remove forgotten part of a48693f4 (incompletely reverted by e327f126)

10 years ago$pedantry =~ s/columns/column/
Mintywalker [Sat, 12 Apr 2014 17:13:10 +0000]
$pedantry =~ s/columns/column/

10 years agoProperly detect and test mysql v3 default JOIN behavior
Peter Rabbitson [Thu, 10 Apr 2014 22:43:35 +0000]
Properly detect and test mysql v3 default JOIN behavior

While investigating how to rewrite the rather useless 39712b481, it became
clear that not only can the test be performed offline, but that there is
already a pseudo-test due to sqlite's version of 3.x.y being mistaken for
MySQL 3

Properly fix the test to check behavior on both versions 3 and 4, and in the
process fix a potential bug of a stale sqlmaker when a reconnect cycle takes
place against a *different* physical rdbms (which btw makes me realize another
problem with trying to do mixed-environment replication... sigh)

10 years agoClarify that sql_maker is just a getter at this point
Peter Rabbitson [Thu, 10 Apr 2014 22:38:10 +0000]
Clarify that sql_maker is just a getter at this point

10 years agoMinimal optimization of the new+prefetch codepath (no func. changes)
Peter Rabbitson [Tue, 11 Mar 2014 06:39:56 +0000]
Minimal optimization of the new+prefetch codepath (no func. changes)

10 years agoFix missing true return lost during e5a62c46f
Peter Rabbitson [Sat, 12 Apr 2014 04:36:01 +0000]
Fix missing true return lost during e5a62c46f

This never resulted in a serious problem because it was papered over by a
bug in Class::C3::Componentised. Addressing it at the source requires a bit
extra coding, hence no new CC3C release yet.

10 years agoAdd explicit AS keyword to RowNum (Oracle) limit dialect
Peter Rabbitson [Thu, 10 Apr 2014 11:10:55 +0000]
Add explicit AS keyword to RowNum (Oracle) limit dialect

This should have no effect on the actual query, only done to bring in line
with the generalized DQ engine

10 years agoAdd extra fetch_first test for right-side-only order
Peter Rabbitson [Thu, 10 Apr 2014 11:00:55 +0000]
Add extra fetch_first test for right-side-only order

10 years agoAdd progress meter to travis builds
Peter Rabbitson [Wed, 26 Mar 2014 07:11:43 +0000]
Add progress meter to travis builds

10 years agoRefactor the double-testing-install attempt under travis
Peter Rabbitson [Fri, 11 Apr 2014 08:47:59 +0000]
Refactor the double-testing-install attempt under travis

Should be no functional changes, just shuffling to get everything
to run under run_or_err

10 years agoReduce Travis' stamina
Peter Rabbitson [Thu, 10 Apr 2014 11:28:16 +0000]
Reduce Travis' stamina

http://blog.travis-ci.com/2013-11-27-fast-finishing-builds/

10 years agoCommemorate the first DBIx::Class hackathon and beef up the contributor list :)
Peter Rabbitson [Sat, 12 Apr 2014 21:00:00 +0000]
Commemorate the first DBIx::Class hackathon and beef up the contributor list :)

The event was a blast. A lot of very useful work was done and at least
one very thorny problem got resolved once and for all. For more info
check out the accounts of some of the participants at
http://dbix-class.org/hackathon01-20140412

Sincere thanks go to all who attended:

Aaron "arc' Crane
Andrew Mehta
Colin "bfwg" Newell
Dagfinn Ilmari MannsÃ¥ker
Duncan Garland
Ian "idn" Norton
James "theorbtwo" Mastros
Jose Luis "pplu" Martinez
Jess "castaway" Robinson
Mark "mdk" Keating
Murray "minty" Walker
Oriol "uree" Soriano
Peter "ribasushi" Rabbitson
Stephen Peters
Tom "TBSliver" Bloor

As well as to the event sponsors who made this all possible:

Eligo   http://eligo.co.uk/
Ctrl-o  http://ctrlo.com/
EPO     http://enlightenedperl.org/

See you all next time!

10 years agofixed example in the DBIx::Class::Storage::DBI::Replicated synopsis
Naveed Massjouni [Tue, 11 Mar 2014 01:43:08 +0000]
fixed example in the DBIx::Class::Storage::DBI::Replicated synopsis

The example in the synopsis does not work. It should be
{ balancer_type => '::Random' } instead of { balancer => '::Random' }

10 years agoFix pesky on_connect_* race condition abraxxa++ ilmari++
Peter Rabbitson [Tue, 4 Mar 2014 08:39:49 +0000]
Fix pesky on_connect_* race condition abraxxa++ ilmari++

A race condition existed between storage accessor setters and the
determine_driver routines, triggering a connection before the set-cycle
is finished

10 years agoFixes Pod typo.
Olaf Alders [Thu, 13 Feb 2014 21:47:22 +0000]
Fixes Pod typo.

10 years agoRemoved useless line of code in many_to_many
Sean Zellmer [Thu, 20 Feb 2014 21:54:33 +0000]
Removed useless line of code in many_to_many

10 years agotypos
Alexandr Ciornii [Wed, 5 Mar 2014 20:48:55 +0000]
typos

10 years agoShuffle prefetch torture test (no func. changes)
Peter Rabbitson [Wed, 12 Feb 2014 14:48:42 +0000]
Shuffle prefetch torture test (no func. changes)

10 years agoPATH may be unset entirely
Peter Rabbitson [Mon, 10 Feb 2014 12:29:45 +0000]
PATH may be unset entirely

Tested with
~$ bash -c 'perl=$(which perl); unset PATH;  $perl t/54taint.t'

10 years agoFix travis prereq extractor (not sure how this ever worked...)
Peter Rabbitson [Mon, 10 Feb 2014 08:48:11 +0000]
Fix travis prereq extractor (not sure how this ever worked...)

10 years agoRemove vestigial unused @INC munge found after a8de639b
Peter Rabbitson [Mon, 10 Feb 2014 07:58:39 +0000]
Remove vestigial unused @INC munge found after a8de639b

10 years agoHarden t/54taint.t against possible future changes in -T
Peter Rabbitson [Mon, 10 Feb 2014 07:18:46 +0000]
Harden t/54taint.t against possible future changes in -T

10 years agoMake sure the taint test does some DB-level ops
Peter Rabbitson [Sat, 8 Feb 2014 09:48:12 +0000]
Make sure the taint test does some DB-level ops

10 years agoReally fix @INC munging of the taint test
Graham Knop [Sat, 8 Feb 2014 09:34:52 +0000]
Really fix @INC munging of the taint test

Now runs even with a plain `perl t/54taint.t`

10 years agoApparently this is more stable historically... boggle
Peter Rabbitson [Fri, 7 Feb 2014 04:39:41 +0000]
Apparently this is more stable historically... boggle

10 years agoDuh, this will always be true
Peter Rabbitson [Tue, 4 Feb 2014 07:25:24 +0000]
Duh, this will always be true

10 years agoShipping the CI stuff to CPAN makes no sense
Peter Rabbitson [Fri, 31 Jan 2014 06:11:44 +0000]
Shipping the CI stuff to CPAN makes no sense

10 years agoRelease v0.08270
Peter Rabbitson [Fri, 31 Jan 2014 05:49:31 +0000]
Release v0.08270

10 years agoRT#87124 fixed, workaround no longer necessary
Peter Rabbitson [Fri, 31 Jan 2014 04:29:02 +0000]
RT#87124 fixed, workaround no longer necessary

10 years agoAdd Firebird over ODBC TravisCI testing
Peter Rabbitson [Thu, 30 Jan 2014 05:04:05 +0000]
Add Firebird over ODBC TravisCI testing

10 years agoGive Firebird (and Interbase) a common sqlt_type
Peter Rabbitson [Fri, 31 Jan 2014 03:38:14 +0000]
Give Firebird (and Interbase) a common sqlt_type

Even though the parser/producer pair do not yet exist in SQLT, we also use this
value as the basis for the lockfile on parallel tests, hence it is important

10 years agoFix datetimes in ODBC/Firebird (merge identical code left after a870aa85e)
Peter Rabbitson [Thu, 30 Jan 2014 12:00:41 +0000]
Fix datetimes in ODBC/Firebird (merge identical code left after a870aa85e)

10 years agoRudimentary DBI/DBD MDV
Peter Rabbitson [Wed, 29 Jan 2014 10:27:59 +0000]
Rudimentary DBI/DBD MDV

10 years agoClarify parallel_installdeps design comment
Peter Rabbitson [Wed, 29 Jan 2014 13:43:55 +0000]
Clarify parallel_installdeps design comment

10 years agoThe trace formatter seems to register intermittent leaks - skip on 5.18 for now
Peter Rabbitson [Wed, 29 Jan 2014 13:25:12 +0000]
The trace formatter seems to register intermittent leaks - skip on 5.18 for now

10 years agoFix undefined order sensitive test (no idea how it went undetected)
Peter Rabbitson [Wed, 29 Jan 2014 12:47:08 +0000]
Fix undefined order sensitive test (no idea how it went undetected)

10 years agoInts bound as DBI::SQL_BIGINT on SQLite < 1.37 do not work in functions
Peter Rabbitson [Wed, 29 Jan 2014 10:39:06 +0000]
Ints bound as DBI::SQL_BIGINT on SQLite < 1.37 do not work in functions

For all the meticulous testing of 04ab4eb1, 1363f0f5 and f3b1224b I
failed to notice that functions no longer work when they encounter
numbers bound as bigint (may as well have not bound them at all).
Happened due to shortsighted testing methodology as described in the
commit msg of f3b1224b, a rudimentary MDV will be introduced in a later
commit to ensure this doesn't happen anymore.

Fix this by explicitly requirung DBD::SQLite 1.37 for bigint operations.

Examine patch under -w

10 years agoRelease v0.08260
Peter Rabbitson [Tue, 28 Jan 2014 18:49:22 +0000]
Release v0.08260

10 years agoWe still intermittently grab a "leaked" SQLT quoter, skip explicitly
Peter Rabbitson [Tue, 28 Jan 2014 18:42:37 +0000]
We still intermittently grab a "leaked" SQLT quoter, skip explicitly

Will figure this out after 0.08260

10 years agoFactor out the symtable walker, no functional changes but much reshuffling
Peter Rabbitson [Mon, 27 Jan 2014 17:54:30 +0000]
Factor out the symtable walker, no functional changes but much reshuffling

10 years agoOne extra cleanup pass before asserting weakregistry is empty
Peter Rabbitson [Sat, 25 Jan 2014 07:06:39 +0000]
One extra cleanup pass before asserting weakregistry is empty

10 years agoMake 54taint.t actually test the DBIx::Class in lib (originally 689e22d1)
Matt S Trout [Thu, 28 Nov 2013 20:24:40 +0000]
Make 54taint.t actually test the DBIx::Class in lib (originally 689e22d1)

10 years agoSkip annoyingly failing test on broken base.pm
Peter Rabbitson [Mon, 27 Jan 2014 11:50:49 +0000]
Skip annoyingly failing test on broken base.pm

Was broken in 5.19.7, fixed in 5.19.8

10 years agoYet another attempt to solve the mystery-win32-failure cpantesters report
Peter Rabbitson [Sat, 25 Jan 2014 05:18:18 +0000]
Yet another attempt to solve the mystery-win32-failure cpantesters report

While fa19e5d6 was a nice idea, its test was flawed. As seen in the fresh fail
http://www.cpantesters.org/cpan/report/137dfaf3-7bbc-1014-aec2-3d202b825c07
the writability test passed with flying colors, but the lock didn't open right
after that. The only explanation at this point is that the FS underlying this
particular dir can not create filenames starting with a dot <facepalm />
Alternatively it may have to do with the umask(0) call, but this seems even
more insane.

Thus (as unlikely as it seems) the culprit seems to be the name. Hopefully
changing it will be the end of this and we will smoke happily ever after...

10 years agoRewrite writiability test to be clearer and with less warnings
Peter Rabbitson [Sat, 25 Jan 2014 05:06:47 +0000]
Rewrite writiability test to be clearer and with less warnings

10 years agoSkip thread tests under Devel::Cover
Peter Rabbitson [Sat, 25 Jan 2014 09:23:06 +0000]
Skip thread tests under Devel::Cover

10 years agoCounter the strictures bullshit with localised bullshit
Peter Rabbitson [Fri, 24 Jan 2014 07:14:37 +0000]
Counter the strictures bullshit with localised bullshit

10 years agoAugment the logic from aca094b4d, add deprecation to settle the distinct drama
Peter Rabbitson [Fri, 24 Jan 2014 05:26:43 +0000]
Augment the logic from aca094b4d, add deprecation to settle the distinct drama

Details in attached IRC log

magnet#dbic-cabal_20131108.log
====
[19:01:38] <mst> using aggregates and distinct seems like it should be an error
[19:02:12] <mst> since it makes no sense to ask for "GROUP BY everything we select" and then select aggregates AFAICS
[19:03:20] <mst> so, yes, what we did before was ... wtf
[19:04:44] <ribasushi> mst: the point is *sometimes* a select in a group-by may make sense is my gut feeling, I basically wanted to "send the nonsense" along, and have the rdbms be the judge
[19:05:52] <mst> well ... what we did before was definitely completely wrong
[19:06:09] <mst> what we're doing now ... I don't want to release it without thinking it through some more, but it's certainly less wrong
[19:07:40] <mst> but I mean ... I dunno, I think group_over_selection makes sense for subquery wrapping
[19:08:04] <mst> but in the case of 'distinct => 1' I think "can't do that with an aggregate in select, pass a real group by you fucking pansy" would be pretty good too
[19:08:14] <mst> since I'm really not convinced it ever can make sense
[19:08:27] <ribasushi> mst: and I am not convinced it never makes sense
[19:08:36] <ribasushi> mst: so bubbling it up doesn't seem like a loss
[19:09:09] <mst> hmmm
[19:09:44] <ribasushi> mst: also I do not want to *entirely* discourage mysql/sqlite-centric grouppage - if a person wants to do that, they should be able to
[19:09:56] <ribasushi> hence why the explicit \'' rule
[19:10:03] <ribasushi> (that is back from 2009-ish actually)
[19:10:05] <mst> actually, looking at this
[19:10:23] <mst> the sql looks like what the user asked for
[19:10:38] <ribasushi> how so?
[19:10:59] <ribasushi> distinct is "final selection grouper" not "first selection"
[19:11:00] <mst> well, they created a resultset of
[19:11:04] <ribasushi> i.e. it is inherently lazy
[19:11:29] <ribasushi> right, it does not take effect on the current selection, didn't from before I took over
[19:11:53] <mst> SELECT year, COUNT(me.cdid) AS cnt ....
[19:11:57] <mst> and then grabbed the 'cnt' column
[19:13:06] <mst> ribasushi: ResultSet originally (0.05000) did '$attrs->{group_by} ||= $attrs->{select} if delete $attrs->{distinct};' in new()
[19:13:15] <mst> so, yes, it takes effect on the current selection
[19:13:36] <mst> so sql is correct according to the original behaviour as implemented
[19:13:36] <ribasushi> mst: but it did this in *_resolve_attrs*
[19:13:55] <ribasushi> which is after the selection is modified by RSETColumn
[19:14:15] <ribasushi> or to put it diff. - RSetColumn does not do a subquery, just like a ->search doesn't
[19:14:30] <mst> it didn't originally, it did it immediately you supplied the distinct attribute to a search
[19:14:40] <mst> anything else is a bug; fix that and we don't need this crap
[19:14:52] <ribasushi> well - when I came around it was lazified via the late resolver
[19:15:08] <ribasushi> and I had bugs reported when that behavior changed later on when I was doin prefetches
[19:15:17] <ribasushi> so this is crap in production for years
[19:15:41] <ribasushi> mst: https://github.com/dbsrgits/dbix-class/blob/master/t/search/distinct.t behaviors on non-aggregates
[19:15:55] <ribasushi> it accreted stuff obviously, the ages of tests are different
[19:17:01] <ribasushi> mst: basically this boils to "is distinct => 1 lazy or eager" and I am afraid this ship sailed around 0.07
[19:17:17] <ribasushi> "fixing" it will serve nothing but bring breakage
[19:17:48] <mst> yeah, it looks like it got broken when _resolved_attrs was factored out of new()
[19:17:53] <ribasushi> nod
[19:18:28] <ribasushi> so - if we assume "distinct is lazy" - you see why I would go the way I did with the latest fix
[19:19:22] <mst> ribasushi: distinct is lazy works fine, you just have to disallow aggregates in the select list in that case
[19:19:30] <mst> and make them do an explicit group_by for that
[19:20:31] <ribasushi> mst: aggregates via the {} syntax have been supported correctly forever - that is distinct knows to ignore them
[19:20:45] <ribasushi> mst: this test is more or less "aggregate in literal" (due to being an alias)
[19:20:47] <mst> even as far as 08000 it was straight up
[19:20:51] <ribasushi> so I can't disallow it
[19:20:56] <ribasushi> because it is... a literal
[19:20:59] <mst> $attrs->{group_by} ||= $attrs->{select} if delete $attrs->{distinct};
[19:21:11] <mst> so if we started allowing them via the {} syntax that wasn't me
[19:21:17] <ribasushi> mst: I came around 0.08010 ;)
[19:22:01] <mst> ribasushi: $attrs->{group_by} ||= $attrs->{select} if delete $attrs->{distinct};
[19:22:07] <mst> ribasushi: in 08011 which is the first release you did
[19:22:34] <ribasushi> mst: it is very possibkle that I broke it when I wasn't knowing wtf is on
[19:22:46] <mst> I think you made lazy distinct work "better"
[19:22:51] <mst> when it shouldn't've been lazy
[19:22:59] <ribasushi> mst: in any case - it's old shit, so even if I am responsible it still boils to "people depend on that"
[19:23:13] <ribasushi> mst: nod, may very well be my rookie mistake ;)
[19:23:15] <mst> sure. at this point it's "I fucked it up, then you made it worse, we'll have to deprecate it"
[19:23:19] <mst> most likely
[19:23:34] <mst> and the only question is damage control so we don't break current usages while isolating the code
[19:24:48] <ribasushi> deprecating it - I wouldn't go that far, I use distinct a lot myself because it does the group construction for me without me thinking
[19:25:01] <ribasushi> juggling selection/ordering is hard enough ;)

10 years agoCheck that the just-built-distdir is configure-able in usermode
Peter Rabbitson [Fri, 24 Jan 2014 04:55:24 +0000]
Check that the just-built-distdir is configure-able in usermode

10 years agoShuffle author-side M::I stuff out of the way
Peter Rabbitson [Fri, 24 Jan 2014 04:44:49 +0000]
Shuffle author-side M::I stuff out of the way

Zero functional changes

10 years agoLogically separate statements mangled in 3054407e9
Peter Rabbitson [Fri, 24 Jan 2014 04:38:23 +0000]
Logically separate statements mangled in 3054407e9

10 years agoExplicitly declare static config
Peter Rabbitson [Fri, 24 Jan 2014 04:36:29 +0000]
Explicitly declare static config

10 years agoSQLite is not a build_requires dep anymore (trap-the-sigsegv days are gone)
Peter Rabbitson [Fri, 24 Jan 2014 04:30:48 +0000]
SQLite is not a build_requires dep anymore (trap-the-sigsegv days are gone)

10 years agoRemove silly double-entry from test_requires
Peter Rabbitson [Fri, 24 Jan 2014 04:27:21 +0000]
Remove silly double-entry from test_requires

10 years agoAdjust todo escape, use travis-provided 5.8 for one of the poisontests
Peter Rabbitson [Thu, 23 Jan 2014 15:37:01 +0000]
Adjust todo escape, use travis-provided 5.8 for one of the poisontests

10 years agoClarify is_exception(undef) behavior missed in 841efcb3
Peter Rabbitson [Thu, 23 Jan 2014 14:52:21 +0000]
Clarify is_exception(undef) behavior missed in 841efcb3

10 years agoHave tests recover gracefully when File::Spec->tmpdir gives us lemons
Peter Rabbitson [Thu, 23 Jan 2014 13:34:23 +0000]
Have tests recover gracefully when File::Spec->tmpdir gives us lemons

Once and for all solves http://www.cpantesters.org/cpan/report/36d4436d-7888-1014-a278-e5322b825c07

10 years agoMove hrefaddr to DBIC::_Util, give most functions a prototype
Peter Rabbitson [Thu, 23 Jan 2014 10:03:10 +0000]
Move hrefaddr to DBIC::_Util, give most functions a prototype

This way we can safely do e.g. ( hrefaddr $foo, $unrelated_bar )