Bug 7679: Follow-up to fix group by hour
authorKatrin Fischer <katrin.fischer.83@web.de>
Wed, 26 Oct 2016 16:31:06 +0000 (18:31 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Oct 2016 11:56:51 +0000 (11:56 +0000)
Grouping by hour does not work with the collates.
This patch removes them after talking to Julian on IRC.

This partially reverts one of the earlier patches:
Bug 7679: Display all table headers (case and accent
 sensitive)

One could argue that this is more of a data problem,
than something we should fix/'hide' with code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

reports/issues_stats.pl

index 25d2278..5c7370e 100755 (executable)
@@ -338,7 +338,7 @@ sub calculate {
         $linefilter[0] =~ s/\*/%/g;
         $strsth .= " AND $line LIKE ? ";
     }
-    $strsth .= " group by $linefield collate utf8_bin order by $lineorder ";
+    $strsth .= " group by $linefield order by $lineorder ";
     $debug and warn $strsth;
     push @loopfilter, { crit => 'SQL =', sql => 1, filter => $strsth };
     my $sth = $dbh->prepare($strsth);
@@ -427,7 +427,7 @@ sub calculate {
         $strsth2 .= " AND $column LIKE ? " ;
     }
 
-    $strsth2 .= " group by $colfield collate utf8_bin order by $colorder ";
+    $strsth2 .= " group by $colfield order by $colorder ";
     $debug and warn $strsth2;
     push @loopfilter, { crit => 'SQL =', sql => 1, filter => $strsth2 };
     my $sth2 = $dbh->prepare($strsth2);
@@ -556,7 +556,6 @@ sub calculate {
     } else {
         $strcalc .= " $colfield ";
     }
-    $strcalc .= " collate utf8_bin ";
 
     $strcalc .= " ORDER BY ";
     if($line_attribute_type) {