[Digikam-devel] [Bug 162038] digikam hangs and eats CPU when changing files

Marcus Hardt marcus.hardt at iwr.fzk.de
Wed May 14 13:04:31 BST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=162038         




------- Additional Comments From marcus.hardt iwr fzk de  2008-05-14 14:04 -------
Hi Arnd,

Will check the fix you suggest. I've ran a couple of compilations and found 
that the CVS version as of
	2008-05-26-15:00:00 
works, while
	2008-05-26-16:00:00 
does not.

I have no deep understanding of sqlite, so I'd rather post the excerpt of the 
diff that IMO causes the trouble observed.

The Diff was created having the 15:00 version, diffing against 16:00. It can 
be reproduced using;

cvs up -D 2008/03/26\ 15:00:00
cvs diff -D 2008/03/26\ 16:00:00 -u

Index: src/where.c
===================================================================
RCS file: /sqlite/sqlite/src/where.c,v
retrieving revision 1.292
retrieving revision 1.291
diff -u -r1.292 -r1.291
--- src/where.c 26 Mar 2008 14:56:35 -0000      1.292
+++ src/where.c 25 Mar 2008 09:47:35 -0000      1.291
 @ -16,7 +16,7  @
 ** so is applicable.  Because this module is responsible for selecting
 ** indices, you might also think of this module as the "query optimizer".
 **
-** $Id: where.c,v 1.292 2008/03/26 14:56:35 drh Exp $
+** $Id: where.c,v 1.291 2008/03/25 09:47:35 danielk1977 Exp $
 */
 #include "sqliteInt.h"

 @ -743,10 +743,7  @
   }
   prereqAll = exprTableUsage(pMaskSet, pExpr);
   if( ExprHasProperty(pExpr, EP_FromJoin) ){
-    Bitmask x = getMask(pMaskSet, pExpr->iRightJoinTable);
-    prereqAll |= x;
-    pTerm->prereqRight |= x-1; /* ON clause terms may not be used with an 
index
-                               ** on left table of a LEFT JOIN.  Ticket #3015 
*/
+    prereqAll |= getMask(pMaskSet, pExpr->iRightJoinTable);
   }
   pTerm->prereqAll = prereqAll;
   pTerm->leftCursor = -1;
 @ -2046,36 +2043,14  @
     pWhere = 0;
   }

-  /* Assign a bit from the bitmask to every term in the FROM clause.
-  **
-  ** When assigning bitmask values to FROM clause cursors, it must be
-  ** the case that if X is the bitmask for the N-th FROM clause term then
-  ** the bitmask for all FROM clause terms to the left of the N-th term
-  ** is (X-1).   An expression from the ON clause of a LEFT JOIN can use
-  ** its Expr.iRightJoinTable value to find the bitmask of the right table
-  ** of the join.  Subtracting one from the right table bitmask gives a
-  ** bitmask for all tables to the left of the join.  Knowing the bitmask
-  ** for all tables to the left of a left join is important.  Ticket #3015.
-  */
-  for(i=0; i<pTabList->nSrc; i++){
-    createMask(&maskSet, pTabList->a[i].iCursor);
-  }
-#ifndef NDEBUG
-  {
-    Bitmask toTheLeft = 0;
-    for(i=0; i<pTabList->nSrc; i++){
-      Bitmask m = getMask(&maskSet, pTabList->a[i].iCursor);
-      assert( (m-1)==toTheLeft );
-      toTheLeft |= m;
-    }
-  }
-#endif
-
   /* Analyze all of the subexpressions.  Note that exprAnalyze() might
   ** add new virtual terms onto the end of the WHERE clause.  We do not
   ** want to analyze these virtual terms, so start analyzing at the end
   ** and work forward so that the added virtual terms are never processed.
   */
+  for(i=0; i<pTabList->nSrc; i++){
+    createMask(&maskSet, pTabList->a[i].iCursor);
+  }
   exprAnalyzeAll(pTabList, &wc);
   if( db->mallocFailed ){
     goto whereBeginNoMem;





	

[bugs.kde.org quoted mail]



More information about the Digikam-devel mailing list