- Timestamp:
- Apr 3, 2013, 12:52:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/ippToPsps/jython/objectbatch.py
r35223 r35352 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.
