Changeset 35417 for trunk/ippToPsps/jython/objectbatch.py
- Timestamp:
- Apr 19, 2013, 4:35:54 PM (13 years ago)
- Location:
- trunk/ippToPsps
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
jython/objectbatch.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130307/ippToPsps (added) merged: 35350,35352,35369,35402-35404,35413
- Property svn:mergeinfo changed
-
trunk/ippToPsps/jython/objectbatch.py
r35223 r35417 372 372 self.logger.infoPair("Forcing uniqueness on", "objID in Object table") 373 373 rowCountBefore = self.scratchDb.getRowCount("Object") 374 375 # XXX EAM : note that in mysql versions later than 5.1, this fails 376 # unless the following is called first: 377 # set session old_alter_table=1 378 # follow the command with 379 # set session old_alter_table=0 380 # OF COURSE, this fails for mysql version < 5.5... 381 if self.scratchDb.version > 5.1: 382 self.scratchDb.execute("set session old_alter_table=1") 383 374 384 self.scratchDb.execute("ALTER IGNORE TABLE Object ADD UNIQUE INDEX(objID)") 385 if self.scratchDb.version > 5.1: 386 self.scratchDb.execute("set session old_alter_table=0") 387 375 388 rowCountAfter = self.scratchDb.getRowCount("Object") 376 389 self.logger.infoPair("Number of duplicated objIDs removed", "%d out of %d" % ((rowCountBefore - rowCountAfter), rowCountBefore))
Note:
See TracChangeset
for help on using the changeset viewer.
