9 years ago\Q-uote column/alias names in regexes in _resolve_aliastypes_from_select_args topic/quote-escape
Dagfinn Ilmari Mannsåker [Sat, 26 Jul 2014 21:31:42 +0000]
\Q-uote column/alias names in regexes in _resolve_aliastypes_from_select_args

Column names can contain regex metacharacters (which includes #, with
/x), so wrap them in \Q and \E to avoid syntax errors.

9 years agoTest escaping quote characters in identifiers
Dagfinn Ilmari Mannsåker [Mon, 14 Jul 2014 20:59:55 +0000]
Test escaping quote characters in identifiers

This requires SQLA master (46be431) and SQLT people/ilmari/quoting-fixes

Also add accessor for the new SQLA escape_char attribute.

9 years agoRe-fix relcond resolver: revert 5592d633 (in turn partial revert of 03f6d1f7)
Peter Rabbitson [Mon, 21 Jul 2014 16:45:06 +0000]
Re-fix relcond resolver: revert 5592d633 (in turn partial revert of 03f6d1f7)

I had the right hunch during 03f6d1f7 but could not substantiate it: the
issue is that the custom coderef expects objects or nothing. Yet here and
there internals pass around bare hashes of data (or sometimes even undef).

Asking users to complicate their coderefs further is just not an option -
it is mindbending enough as it is. So the only way to go forward is indeed
to create "synthetic result objects" and pass them down the stack. This time
however there is a twist - after the overhaul in 4006691d we now *can*
indeed construct such objects on top of the bare DBIx::Class::Core - in
other words mission fucking accomplished.

This commit *may* need to be reverted in case it turns out that 4006691d is
a no-go (check the test change to t/inflate/datetime_oracle.t in 12b348d9
for an example of what was taken for granted wrt direct $class-> calls)
If this is the case - not all is lost. We should be able to use a hidden
class with an actual source instance that we would ammend on the fly... But
let's hope we will never get to this bridge :(

9 years agoAvoid ResultSourceProxy calls whenever possible
Peter Rabbitson [Mon, 21 Jul 2014 10:41:46 +0000]
Avoid ResultSourceProxy calls whenever possible

Along with efficiency gains this commit makes a very subtle but crucially
important change: From here now on when we operate on an instance, we are
guaranteed to query this instance's result source. The previous codepaths
would nearly randomly switch between the current rsrc instance and the one
registered with the corresponding result class.

This will allow for proper synthetic result instance construction further on

9 years agoRebase Oracle datetime inflation test on top of DBICTest::Schema::Event
Peter Rabbitson [Mon, 21 Jul 2014 21:45:50 +0000]
Rebase Oracle datetime inflation test on top of DBICTest::Schema::Event

The butchering of Track made sense in 2007, not so much today

The test seems to behave identically, hope I didn't fuck up anything...
https://travis-ci.org/dbsrgits/dbix-class/builds/30513847#L398

9 years agoReplace many closure-based proxy methods with static qsubs
Peter Rabbitson [Fri, 18 Jul 2014 16:26:57 +0000]
Replace many closure-based proxy methods with static qsubs

Not only does this buy a quantum of performance, but it greatly enhances
readability of these methods on deparse

Deliberately not converting the ManyToMany helper - this code needs a
thorough regut :(

9 years agoReformat add_relationship_accessor for future edit
Peter Rabbitson [Sun, 20 Jul 2014 11:47:09 +0000]
Reformat add_relationship_accessor for future edit

No functional changes, read diff under -w

9 years agoStandardize the Moo import block, move quote_sub/qsub into ::_Util
Peter Rabbitson [Fri, 18 Jul 2014 16:21:20 +0000]
Standardize the Moo import block, move quote_sub/qsub into ::_Util

This way we will have less boilerplate in subsequent commits where we
will use quote_sub standalone

Add yet another test to make absolutely sure quote_sub won't leak any of the
strictures insanity

9 years agoReplace B::perlstring with our own implmentation thereof
Peter Rabbitson [Mon, 21 Jul 2014 07:57:24 +0000]
Replace B::perlstring with our own implmentation thereof

Haarg++ for pointing this out

9 years agoAdd internal assertion guard for some indirect calls (for now only create/new)
Peter Rabbitson [Fri, 18 Jul 2014 16:11:15 +0000]
Add internal assertion guard for some indirect calls (for now only create/new)

Modeled on the idea of a9da9b6a, this one blows up when a public proxy
is called insted of the equivalent public chan of methods

This particular set of changes to create() and new() is solely an
optimisation (unlike a subsequent commit to ::ResultSourceProxy)

9 years agoGreatly improve diagnostic messages of _resolve_relationship_condition
Peter Rabbitson [Sun, 20 Jul 2014 12:07:28 +0000]
Greatly improve diagnostic messages of _resolve_relationship_condition

9 years agoRemove duplicate arg-check in create(), adjust exception text
Peter Rabbitson [Fri, 18 Jul 2014 09:49:49 +0000]
Remove duplicate arg-check in create(), adjust exception text

9 years agoSimplify no wantarray assert (a9da9b6a) - fish out args from caller
Peter Rabbitson [Fri, 18 Jul 2014 08:42:58 +0000]
Simplify no wantarray assert (a9da9b6a) - fish out args from caller

9 years agois_X_value functions introduced in 3705e3b28 migrated to SQLA with fixups
Peter Rabbitson [Thu, 17 Jul 2014 09:20:30 +0000]
is_X_value functions introduced in 3705e3b28 migrated to SQLA with fixups

9 years agoBetter, consistent handling of -literal/-value in the cond collapser
Peter Rabbitson [Thu, 17 Jul 2014 07:05:19 +0000]
Better, consistent handling of -literal/-value in the cond collapser

9 years ago(travis) Temporary hard-spec of the SQLA dep, lockstep release
Peter Rabbitson [Thu, 17 Jul 2014 12:53:42 +0000]
(travis) Temporary hard-spec of the SQLA dep, lockstep release

9 years agoMove the "special loading" check to DBICTest::Util
Peter Rabbitson [Thu, 17 Jul 2014 12:22:24 +0000]
Move the "special loading" check to DBICTest::Util

No functional changes

9 years agoSkip the namespace tests on plain install
Peter Rabbitson [Thu, 17 Jul 2014 12:37:12 +0000]
Skip the namespace tests on plain install

Protect users from future spurious changes in uncleaned imports

9 years ago(travis) T::B 1.005 is superseded by 1.300 - remove handholding
Peter Rabbitson [Thu, 17 Jul 2014 13:12:52 +0000]
(travis) T::B 1.005 is superseded by 1.300 - remove handholding

9 years agoAdd one extra is_exception check (missed a spot during 841efcb3f)
Peter Rabbitson [Tue, 15 Jul 2014 01:48:40 +0000]
Add one extra is_exception check (missed a spot during 841efcb3f)

In addition tweak the message so that carp_unique can in fact catch it
properly, and test that the proper amount of warnings is in fact emitted

9 years agoConsolidate bits and pieces under ::_Util::refdesc
Peter Rabbitson [Tue, 15 Jul 2014 00:36:44 +0000]
Consolidate bits and pieces under ::_Util::refdesc

No functional changes

9 years agoRemove double has_column check in new=>store_column
Peter Rabbitson [Tue, 15 Jul 2014 05:14:31 +0000]
Remove double has_column check in new=>store_column

Standardize exception texts across ::Row

9 years agoAnother heavy refactor of the rel resolver prototype (sequel to 03f6d1f7)
Peter Rabbitson [Sat, 12 Jul 2014 15:32:52 +0000]
Another heavy refactor of the rel resolver prototype (sequel to 03f6d1f7)

Change the return value of _resolve_relationship_condition to a 3-value
hash, with a lot of the safety logic consolidated within that method. The
best way to gauge the significance of the changes is to look at the diff
of lib/DBIx/Class/Relationship/Base.pm

Also stop returning the "noncondition-columns" in the _resolve_condition
compa-shim. The information was only used by the code removed from
::Relationship::Base, and is rather new with no evidence of use within
CPAN/DarkPAN. It can be easily added back if necessary.

9 years agoMove a CDBI escape to the CDBI class hierarchy
Peter Rabbitson [Sat, 12 Jul 2014 11:52:45 +0000]
Move a CDBI escape to the CDBI class hierarchy

9 years agoRefactor ::DBIHacks::_extract_fixed_condition_columns (sequel to 8d005ad9)
Peter Rabbitson [Sat, 12 Jul 2014 10:32:20 +0000]
Refactor ::DBIHacks::_extract_fixed_condition_columns (sequel to 8d005ad9)

Instead of just returning an array of column names, switch to a hashref that
can double as an inferred-value bag. As a bonus deduplicates and folds-in
another codepath from ::ResultSet::_merge_with_rscond

In the process fixup _collapse_cond to be even more robust in some arrayref
corner-cases. Now it is guaranteed to return a hashref at all times

9 years agoSwitch UNRESOLVABLE_CONDITION to an _Util constant
Peter Rabbitson [Sat, 12 Jul 2014 09:51:00 +0000]
Switch UNRESOLVABLE_CONDITION to an _Util constant

9 years agoOlder perls get confused by this construct - rewrap
Peter Rabbitson [Tue, 8 Jul 2014 05:42:06 +0000]
Older perls get confused by this construct - rewrap

9 years agoRevert optimistic and sloppy changes from 3705e3b2 - DBI does not always DTRT
Peter Rabbitson [Tue, 8 Jul 2014 04:58:03 +0000]
Revert optimistic and sloppy changes from 3705e3b2 - DBI does not always DTRT

In addition I rebroke the issue from RT#79576, ffs man pay attention

<ribasushi> general question - does DBI guarantee that objects with stringification overload will get their stringification called
<ribasushi> or is this up to the DBD (and thus will vary)
<mje> ribasushi, I had an issue in DBD::ODBC ages ago with this - looking for it now
<mje>  rt 78838 - bind_param does not correctly stringify blessed objects when connected to MS SQL Server, magic was not being applied in DBD::ODBC case
<mje> so I think the answer to your question is DBI does not but DBDs should if they are written correctly
<ribasushi> I wonder why DBI does not
<timbunce_> ribasushi: no explicit ‘guarantee’ but I think any place it doesn’t is probably a bug.
<ribasushi> timbunce_: given mje had to do magic in his DBD, I suspect DBI has a "hole" somewhere then no?
<ribasushi> basically I was looking into removing the explicit stringifications in DBIC, hence the question
<ribasushi> if there is consensus that DBI ought to do it all on its own, we could test for it, fix it up, and then I disable the checks when I detect a sufficiently advanced DBI.pm
<timbunce> yes, ribasushi: “… we could test for it, fix it up, and then I disable the checks when I detect a sufficiently advanced DBI.pm or something”
<timbunce> :)
<ribasushi> nod ;)

9 years agoInitial (now passing) tests prompting the order_by analyzer revamp 302d35f8
Brendan Byrd [Wed, 12 Feb 2014 14:32:45 +0000]
Initial (now passing) tests prompting the order_by analyzer revamp 302d35f8

9 years agoTeach order_by stability analyzer about search_related
Peter Rabbitson [Tue, 8 Jul 2014 04:09:40 +0000]
Teach order_by stability analyzer about search_related

There is more stuff we can do here as noted in the FIXME added to the very
end of _extract_colinfo_of_stable_main_source_order_by_portion. But for the
time being this will do (also see the subsequent tests for extra insanity we
could and should add)

Tests come in the next commit

9 years agoPass the main rsrc in attrs, instead of trying to fish it out later
Peter Rabbitson [Tue, 8 Jul 2014 04:18:15 +0000]
Pass the main rsrc in attrs, instead of trying to fish it out later

9 years agoClearer name of method/variables before refactoring
Peter Rabbitson [Tue, 8 Jul 2014 00:30:52 +0000]
Clearer name of method/variables before refactoring

9 years agoSwitch DBIC::Storage::Statistics to Moo (for trial purposes)
Peter Rabbitson [Tue, 8 Jul 2014 00:05:04 +0000]
Switch DBIC::Storage::Statistics to Moo (for trial purposes)

This is a component which has some subclassing in the wild, use it as a
canary to highlight any remaining issues Moo might have within DBIC

9 years agoBreak out the test tracer into a standalone file
Peter Rabbitson [Tue, 8 Jul 2014 00:46:14 +0000]
Break out the test tracer into a standalone file

9 years agoIFF debug goes to STDERR by default - silence possible wide-char warnings
Peter Rabbitson [Mon, 7 Jul 2014 22:57:20 +0000]
IFF debug goes to STDERR by default - silence possible wide-char warnings

9 years agoStop permanently enabling autoflush on the debug filehandle
Peter Rabbitson [Mon, 7 Jul 2014 22:45:32 +0000]
Stop permanently enabling autoflush on the debug filehandle

9 years agoExpand closed STDERR test, check actual exception
Peter Rabbitson [Mon, 7 Jul 2014 22:34:24 +0000]
Expand closed STDERR test, check actual exception

9 years agoBetter (and much more precise) explanation of Moose/Moo subclassing
skaufman [Sun, 29 Jun 2014 02:33:27 +0000]
Better (and much more precise) explanation of Moose/Moo subclassing

9 years agoBetter example/documentation of custom resultset classes
skaufman [Sun, 29 Jun 2014 02:33:27 +0000]
Better example/documentation of custom resultset classes

9 years agoChange tab space (4 => 2), no further changes
skaufman [Sun, 29 Jun 2014 02:33:27 +0000]
Change tab space (4 => 2), no further changes

9 years agoMove the Subclassing POD under Examples
Peter Rabbitson [Tue, 1 Jul 2014 09:00:57 +0000]
Move the Subclassing POD under Examples

9 years agonamespace::autoclean is a really stupid idea - purge with fire
Peter Rabbitson [Tue, 1 Jul 2014 08:45:02 +0000]
namespace::autoclean is a really stupid idea - purge with fire

9 years agoForgotten reenable of syntax test to guard for 37af2968e
Peter Rabbitson [Sat, 28 Jun 2014 10:23:52 +0000]
Forgotten reenable of syntax test to guard for 37af2968e

9 years agoAdd an explicit webchat link, change IRC to x_IRC
Peter Rabbitson [Tue, 1 Jul 2014 09:33:14 +0000]
Add an explicit webchat link, change IRC to x_IRC

This should work around the issue of 'preferred company/startup' raised in
https://github.com/CPAN-API/metacpan-web/issues/1235#issuecomment-47610925

9 years agoImproved docs for ResultSet columns attribute on how to retrieve related columns
Alexander Hartmaier [Thu, 8 Aug 2013 08:07:51 +0000]
Improved docs for ResultSet columns attribute on how to retrieve related columns

9 years agoMore coherent +(columns/select/as) quoting notices and descriptions
Alexander Hartmaier [Thu, 18 Jul 2013 16:31:46 +0000]
More coherent +(columns/select/as) quoting notices and descriptions

9 years agoPopulate caches for related result sets even if they're empty
Dagfinn Ilmari Mannsåker [Fri, 28 Mar 2014 16:48:17 +0000]
Populate caches for related result sets even if they're empty

This avoids unnecessary database hits when accessing prefetched related
resultsets with no rows.

9 years agoAdd a self-explanatory *compile-time* $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS}
Peter Rabbitson [Tue, 17 Jun 2014 10:41:06 +0000]
Add a self-explanatory *compile-time* $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS}

The idea is to be able to catch tests that rely on a particular order of
the results of ->all. ->next is untouched as injecting extra \'RANDOM'
order clauses is too heavy-handed for a test environment (and besides, having
->all and ->next return stuff in differing order is just as good of a
monkey-wrench)

9 years agoMinor optimization of codepath (no func changes)
Peter Rabbitson [Mon, 16 Jun 2014 14:37:27 +0000]
Minor optimization of codepath (no func changes)

9 years agoFix ::Ordered in combination with delete_all
Peter Rabbitson [Mon, 16 Jun 2014 14:15:44 +0000]
Fix ::Ordered in combination with delete_all

See pod-changes for description of the solution. I cringe but... oh well

9 years ago(travis) Announce what we set during POISON_ENV
Peter Rabbitson [Mon, 16 Jun 2014 12:28:25 +0000]
(travis) Announce what we set during POISON_ENV

9 years agoRemove vestigial test envvar
Peter Rabbitson [Mon, 16 Jun 2014 12:21:59 +0000]
Remove vestigial test envvar

9 years agoMore fallout of the _resolve_cond refactor 03f6d1f7
Peter Rabbitson [Fri, 13 Jun 2014 14:37:31 +0000]
More fallout of the _resolve_cond refactor 03f6d1f7

I had in the back of my mind "one can't just create random objects" but
figured it may work anyway - WROOOOOOOONG. Instead pass through the hash
as before, will need to rethink that part before settling on an API for
resolve_relationship_condition. FML

9 years agoFix test tripping on external warnings
Peter Rabbitson [Thu, 12 Jun 2014 04:53:38 +0000]
Fix test tripping on external warnings

9 years agoEven more robust _resolve_condition shim - guess rel_name when needed
Peter Rabbitson [Thu, 12 Jun 2014 04:54:12 +0000]
Even more robust _resolve_condition shim - guess rel_name when needed

9 years agoreplace all remaining uses of self_rowobj with self_resultobj in pod, test schemas
Karen Etheridge [Wed, 11 Jun 2014 19:46:25 +0000]
replace all remaining uses of self_rowobj with self_resultobj in pod, test schemas

9 years agoAdd (now passing) tests for set_from_related() via 'foreign_resultobj'
Gerda Shank [Mon, 10 Feb 2014 19:22:06 +0000]
Add (now passing) tests for set_from_related() via 'foreign_resultobj'

9 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

9 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

9 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

9 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

9 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

9 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...

9 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

9 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

9 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...

9 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

9 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

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

9 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()

9 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

9 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

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

9 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

9 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

9 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++

9 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

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

9 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

9 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()

9 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

9 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)

9 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

9 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

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

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

9 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

9 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

9 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

9 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)

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

9 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' }

9 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)

9 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++

9 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

9 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)

9 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.

9 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

9 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)

9 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)