From 0b15127aa54cd1cc3f51c757c306e7da46640be2 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 14 Aug 2013 10:25:14 -0400 Subject: [PATCH] Correctly mark nested INNER joins as such We've been adopting containing the JOINs flavor, and then attempting to use IS NOT NULL to restrict NULL-ness in the WHERE clause. This is almost right, but not quite, and was done in an attempt to match behavior with the expectations of users that are not SQL experts. However, right is better than "looks right most of the time", so we use the proper join type now. Signed-off-by: Mike Rylander Signed-off-by: Jason Boyer Conflicts [just whitespace style]: Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm --- Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm b/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm index b7d7177322..21ad928064 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm @@ -1213,7 +1213,7 @@ sub toSQL { my $_nullable_rel = $dir && $dir eq 'l' ? '_right_rel' : '_left_rel'; $self->{$_nullable_rel}->{_nullable} = $dir; - my $j = $dir ? ( $dir eq 'l' ? 'LEFT OUTER' : ( $dir eq 'r' ? 'RIGHT OUTER' : 'FULL OUTER' ) ) : 'INNER'; + my $j = 'INNER'; my $sql = "\n\t$j ". $self->SUPER::toSQL; -- 2.11.0