[MojoMojo] Re: Postgresql problem with GROUP BY clauses
mschumann
mojomojo at hidden-primary.net
Tue Jan 11 20:52:43 GMT 2011
Hi,
when the test script t/schema_DBIC_Page.t is tried, it throws the exception
mentioned in my first post. Unfortunately is has to be patched to not
destroy the database:
--- t/schema_DBIC_Page.t.orig 2011-01-02 07:53:55.529421000 +0100
+++ t/schema_DBIC_Page.t 2011-01-11 21:15:08.166922962 +0100
@@ -16,7 +16,8 @@
use lib 't/lib';
use MojoMojoTestSchema;
-my $schema = MojoMojoTestSchema->init_schema(populate => 1);
+#my $schema = MojoMojoTestSchema->init_schema(populate => 1);
+my $schema = MojoMojoTestSchema->get_schema;
my ($root_path_pages, $root_proto_pages) =
$schema->resultset('Page')->path_pages('/');
my $root_path_pages_count = @$root_path_pages;
Then I get the result:
t/schema_DBIC_Page.t .. 1/11
...
# Failed test 'Got 1 tagged descendant.'
# at t/schema_DBIC_Page.t line 62.
# got: '2'
# expected: '1'
DBIx::Class::ResultSet::search(): DBI Exception: DBD::Pg::st execute failed:
column "content.created" must appear in the GROUP BY clause or be used in an
aggregate function
LINE 1: ...epth, me.lft, me.rgt, me.content_version ORDER BY content.cr...
^ [for
Statement "SELECT me.id, me.version, me.parent, me.name, me.name_orig,
me.depth, me.lft, me.rgt, me.content_version FROM page as me, page as
ancestor, tag, content WHERE ( ( ( me.id =ancestor.id OR ( me.lft >
ancestor.lft AND me.rgt < ancestor.rgt ) ) AND ancestor.id = ? AND
content.page =me.id AND content.version =me.content_version AND me.id
=tag.page AND tag = ? ) ) GROUP BY me.id, me.version, me.parent, me.name,
me.name_orig, me.depth, me.lft, me.rgt, me.content_version ORDER BY
content.created DESC" with ParamValues: 1='1', 2='test'] at
.../libmojomojo-perl-devel/lib/MojoMojo/Schema/Result/Page.pm line 219
# Looks like you planned 11 tests but ran 10.
# Looks like you failed 3 tests of 10 run.
# Looks like your test exited with 255 just after 10.
t/schema_DBIC_Page.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/11 subtests
Test Summary Report
-------------------
t/schema_DBIC_Page.t (Wstat: 65280 Tests: 10 Failed: 3)
Failed tests: 4-5, 9
Non-zero exit status: 255
Parse errors: Bad plan. You planned 11 tests but ran 10.
Files=1, Tests=10, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.54 cusr 0.03
csys = 0.59 CPU)
Result: FAIL
I keep on tracking down this issue...
--
View this message in context: http://mojomojo.2358427.n2.nabble.com/Postgresql-problem-with-GROUP-BY-clauses-tp5908804p5912401.html
Sent from the mojomojo mailing list archive at Nabble.com.
More information about the Mojomojo
mailing list