Code

Fix some broken logging.
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 10 Mar 2009 01:08:45 +0000 (01:08 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 10 Mar 2009 01:08:45 +0000 (01:08 +0000)
Remove (broken and incorrect) optimisation added to set_inner multilink handling.

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4177 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/backends/back_mysql.py
roundup/backends/rdbms_common.py

index b83db400468147f6830cc2b64302ea128c71a99c..c707c2cc1f913ffab98a962faea2ad93d13b4ee0 100644 (file)
@@ -66,10 +66,10 @@ def db_nuke(config):
             # stupid MySQL bug requires us to drop all the tables first
             for table in tables:
                 command = 'DROP TABLE `%s`'%table[0]
-                self.log_debug(command)
+                logging.debug(command)
                 cursor.execute(command)
             command = "DROP DATABASE %s"%config.RDBMS_NAME
-            self.log_info(command)
+            logging.info(command)
             cursor.execute(command)
             conn.commit()
         conn.close()
@@ -83,7 +83,7 @@ def db_create(config):
     conn = MySQLdb.connect(**kwargs)
     cursor = conn.cursor()
     command = "CREATE DATABASE %s"%config.RDBMS_NAME
-    self.log_info(command)
+    logging.info(command)
     cursor.execute(command)
     conn.commit()
     conn.close()
index 31aa0ac0e4e69795740e228cdc7dcc0555ee0e37..26f78b61f6450afa6271cfc3a710e652dd3d14b1 100644 (file)
@@ -1740,12 +1740,6 @@ class Class(hyperdb.Class):
 
                 # handle additions
                 for id in value:
-                    # If this node is in the cache, then we do not need to go to
-                    # the database.  (We don't consider this an LRU hit, though.)
-                    if self.cache.has_key((classname, nodeid)):
-                        # Return 1, not True, to match the type of the result of
-                        # the SQL operation below.
-                        return 1
                     if not self.db.getclass(link_class).hasnode(id):
                         raise IndexError, '%s has no node %s'%(link_class, id)
                     if id in l: