Skip to content

Commit

Permalink
Fix long standing bug in powa_qualstats_aggregate_constvalues_current.
Browse files Browse the repository at this point in the history
Arrays of qual_values where interverting nbfiltered and execution_count.  This
was however harmless as powa-web has the exact same bug.  Both will be fixed as
of 4.0.0.
  • Loading branch information
rjuju committed Dec 30, 2019
1 parent 7211ad0 commit d908e40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions powa--4.0.0beta1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,7 @@ FROM groups,
LATERAL (
SELECT array_agg(constvalues) as mu
FROM (
SELECT (constvalues, occurences, nbfiltered, execution_count)::qual_values as constvalues
SELECT (constvalues, occurences, execution_count, nbfiltered)::qual_values AS constvalues
FROM consts
WHERE consts.qualid = groups.qualid AND consts.queryid = groups.queryid
AND consts.dbid = groups.dbid AND consts.userid = groups.userid
Expand All @@ -3189,7 +3189,7 @@ LATERAL (
LATERAL (
SELECT array_agg(constvalues) as mf
FROM (
SELECT (constvalues, occurences, nbfiltered, execution_count)::qual_values as constvalues
SELECT (constvalues, occurences, execution_count, nbfiltered)::qual_values AS constvalues
FROM consts
WHERE consts.qualid = groups.qualid AND consts.queryid = groups.queryid
AND consts.dbid = groups.dbid AND consts.userid = groups.userid
Expand All @@ -3200,7 +3200,7 @@ LATERAL (
LATERAL (
SELECT array_agg(constvalues) as lf
FROM (
SELECT (constvalues, occurences, nbfiltered, execution_count)::qual_values as constvalues
SELECT (constvalues, occurences, execution_count, nbfiltered)::qual_values AS constvalues
FROM consts
WHERE consts.qualid = groups.qualid AND consts.queryid = groups.queryid
AND consts.dbid = groups.dbid AND consts.userid = groups.userid
Expand All @@ -3211,7 +3211,7 @@ LATERAL (
LATERAL (
SELECT array_agg(constvalues) as me
FROM (
SELECT (constvalues, occurences, nbfiltered, execution_count)::qual_values as constvalues
SELECT (constvalues, occurences, execution_count, nbfiltered)::qual_values AS constvalues
FROM consts
WHERE consts.qualid = groups.qualid AND consts.queryid = groups.queryid
AND consts.dbid = groups.dbid AND consts.userid = groups.userid
Expand Down

0 comments on commit d908e40

Please sign in to comment.