diff options
author | mkanat%kerio.com <> | 2005-10-25 04:21:02 +0200 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-10-25 04:21:02 +0200 |
commit | 46aba0e761e99db24b5de10f13bbc108fdc982a4 (patch) | |
tree | 45bc61c7b95fc2d6753c7b6a2ffb3bb1d7ed2254 /Bugzilla/User.pm | |
parent | a637b882206ae3dc5fd6101da96bb6ee0ca53260 (diff) | |
download | bugzilla-46aba0e761e99db24b5de10f13bbc108fdc982a4.tar.gz bugzilla-46aba0e761e99db24b5de10f13bbc108fdc982a4.tar.xz |
Bug 313209: Oracle requires "CASE WHEN" around boolean expressions in the SELECT column list
Patch By Lance Larsh <lance.larsh@oracle.com> r=mkanat, a=justdave
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 9b99428a6..744dbd34a 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -25,6 +25,7 @@ # Shane H. W. Travis <travis@sedsystems.ca> # Max Kanat-Alexander <mkanat@bugzilla.org> # Gervase Markham <gerv@gerv.net> +# Lance Larsh <lance.larsh@oracle.com> ################################################################################ # Module Initialization @@ -509,7 +510,8 @@ sub can_enter_product { trick_taint($product_name); # Checks whether the user has access to the product. - my $has_access = $dbh->selectrow_array('SELECT group_id IS NULL + my $has_access = $dbh->selectrow_array('SELECT CASE WHEN group_id IS NULL + THEN 1 ELSE 0 END FROM products LEFT JOIN group_control_map ON group_control_map.product_id = products.id @@ -527,8 +529,10 @@ sub can_enter_product { # Checks whether the product is open for new bugs and # has at least one component and one version. my ($is_open, $has_version) = - $dbh->selectrow_array('SELECT CASE WHEN disallownew = 0 THEN 1 ELSE 0 END, - versions.value IS NOT NULL + $dbh->selectrow_array('SELECT CASE WHEN disallownew = 0 + THEN 1 ELSE 0 END, + CASE WHEN versions.value IS NOT NULL + THEN 1 ELSE 0 END FROM products INNER JOIN components ON components.product_id = products.id |