]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 309680: Use SQL "JOIN ... ON ..." syntax instead of "JOIN ... USING(...)"
authormkanat%kerio.com <>
Fri, 7 Oct 2005 01:43:43 +0000 (01:43 +0000)
committermkanat%kerio.com <>
Fri, 7 Oct 2005 01:43:43 +0000 (01:43 +0000)
Patch By Lance Larsh <lance.larsh@oracle.com> r=mkanat, a=justdave

Bugzilla/Bug.pm
checksetup.pl

index b9206b9a045bc3dc6771d56625db3d2f8c401969..e050d22116f3870ec777e097b4f3eb433ecc9b74 100755 (executable)
@@ -177,7 +177,7 @@ sub initBug  {
       $dbh->sql_date_format('deadline', '%Y-%m-%d') . "
     FROM bugs
        LEFT JOIN votes
-           USING (bug_id)
+              ON bugs.bug_id = votes.bug_id
       INNER JOIN components
               ON components.id = bugs.component_id
       INNER JOIN products
@@ -1011,7 +1011,7 @@ sub RemoveVotes {
                             "products.votesperuser, products.maxvotesperbug " .
                             "FROM profiles " . 
                             "LEFT JOIN votes ON profiles.userid = votes.who " .
-                            "LEFT JOIN bugs USING(bug_id) " .
+                            "LEFT JOIN bugs ON votes.bug_id = bugs.bug_id " .
                             "LEFT JOIN products ON products.id = bugs.product_id " .
                             "WHERE votes.bug_id = ? " . $whopart);
     $sth->execute($id);
index 3f4a68b782759a00a6741baf84e9ef3a977a5c24..225a3341e44c69aba3d399d7b428bceb3c281b5e 100755 (executable)
@@ -2445,7 +2445,7 @@ if (!($sth->fetchrow_arrayref()->[0])) {
     $sth = $dbh->prepare(
         "SELECT longdescs.bug_id, thetext " .
           "FROM longdescs " .
-     "LEFT JOIN bugs using(bug_id) " .
+     "LEFT JOIN bugs ON longdescs.bug_id = bugs.bug_id " .
          "WHERE (" . $dbh->sql_regexp("thetext",
                  "'[.*.]{3} This bug has been marked as a duplicate of [[:digit:]]+ [.*.]{3}'") . ") " .
            "AND (resolution = 'DUPLICATE') " .