- 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/stackbatch.py
r35222 r35352 543 543 # response = raw_input("updated dvo ") 544 544 545 # XXX EAM : note that in mysql versions later than 5.1, this fails 546 # unless the following is called first: 547 # set session old_alter_table=1 548 # follow the command with 549 # set session old_alter_table=0 550 # OF COURSE, this fails for mysql version < 5.5... 551 if self.scratchDb.version > 5.1: 552 self.scratchDb.execute("set session old_alter_table=1") 553 545 554 sql = "ALTER IGNORE TABLE StackDetection ADD PRIMARY KEY (objID)" 546 555 556 if self.scratchDb.version > 5.1: 557 self.scratchDb.execute("set session old_alter_table=0") 558 547 559 self.scratchDb.execute(sql) 548 560 # response = raw_input("add primary key? ") … … 806 818 ON (a.stackDetectID = b.detectID) where b.imageID = " + str(imageID) + \ 807 819 " INTO OUTFILE '" + dumpFile + "'" 808 print "sql: ", sql 809 self.scratchDb.execute(sql) 820 821 try: self.scratchDb.execute(sql) 822 except: 823 self.logger.info("failed to select data for stackDetectionCalib") 824 self.logger.infoPair("sql: ", sql) 825 raise 810 826 811 827 sql = "LOAD DATA INFILE '" + dumpFile + "' INTO TABLE " + tableName 812 print "sql: ", sql 813 self.scratchDb.execute(sql) 828 try: self.scratchDb.execute(sql) 829 except: 830 self.logger.info("failed to load data from infile for stackDetectionCalib") 831 self.logger.infoPair("sql: ", sql) 832 raise 814 833 815 834 ## XXX write this with the select/insert
Note:
See TracChangeset
for help on using the changeset viewer.
