incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1071871 - /incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Date Fri, 18 Feb 2011 03:10:53 GMT
Author: kwright
Date: Fri Feb 18 03:10:52 2011
New Revision: 1071871

URL: http://svn.apache.org/viewvc?rev=1071871&view=rev
Log:
Revise carrydown queries to be less problematic for Derby.

Modified:
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1071871&r1=1071870&r2=1071871&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Fri Feb 18 03:10:52 2011
@@ -2584,12 +2584,10 @@ public class JobManager implements IJobM
   {
     // The query here mirrors the carrydown.restoreRecords() delete query!  However, it also
fetches enough information to build a DocumentDescription
     // object for return, and so a join is necessary against the jobqueue table.
-    //???
     String query = "SELECT t0."+jobQueue.idField+",t0."+jobQueue.docHashField+",t0."+jobQueue.docIDField+"
FROM "+
       jobQueue.getTableName()+" t0 WHERE EXISTS(SELECT 'x' FROM "+carryDown.getTableName()+
       " t1 WHERE t1."+carryDown.parentIDHashField+" IN ("+queryPart+") AND t1."+carryDown.childIDHashField+"=t0."+jobQueue.docHashField+
-      " AND t0."+jobQueue.jobIDField+"=? AND t1."+carryDown.jobIDField+"=?)";
-    list.add(jobID);
+      " AND t0."+jobQueue.jobIDField+"=t1."+carryDown.jobIDField+") AND t0."+jobQueue.jobIDField+"=?";
     list.add(jobID);
     IResultSet set = database.performQuery(query,list,null,null);
     int i = 0;
@@ -4052,10 +4050,9 @@ public class JobManager implements IJobM
     String query = "SELECT t0."+jobQueue.idField+",t0."+jobQueue.docHashField+",t0."+jobQueue.docIDField+"
FROM "+
       jobQueue.getTableName()+" t0 WHERE EXISTS(SELECT 'x' FROM "+carryDown.getTableName()+
       " t1 WHERE "+carryDown.parentIDHashField+" IN ("+queryPart+") AND t1."+carryDown.childIDHashField+"=t0."+jobQueue.docHashField+
-      " AND t0."+jobQueue.jobIDField+"=? AND t1."+jobQueue.jobIDField+"=? AND t1."+carryDown.newField+"=?)";
-    list.add(jobID);
-    list.add(jobID);
+      " AND t0."+jobQueue.jobIDField+"=t1."+jobQueue.jobIDField+" AND t1."+carryDown.newField+"=?)
AND t0."+jobQueue.jobIDField+"=?";
     list.add(carryDown.statusToString(carryDown.ISNEW_BASE));
+    list.add(jobID);
 
     IResultSet set = database.performQuery(query,list,null,null);
     int i = 0;



Mime
View raw message