IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35022


Ignore:
Timestamp:
Jan 22, 2013, 12:46:56 PM (13 years ago)
Author:
eugene
Message:

fix mysql target

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c

    r34995 r35022  
    11# include "dvopsps.h"
    2 # define DEBUG 1
     2# define DEBUG 0
    33# define SQL_INSERT 1
    44// 1 = write data via sql insert values = (),
     
    6363  }
    6464  insert_detections_mysql_commit (&buffer, mysql);
    65   if (DEBUG) fprintf (stderr, "inserted %d rows\n", Ninsert);
     65  if (VERBOSE) fprintf (stderr, "inserted %d rows\n", Ninsert);
    6666  FreeIOBuffer (&buffer);
    6767
     
    7979
    8080# if (SQL_INSERT)
    81   PrintIOBuffer (buffer, "INSERT INTO dvoDetection (imageID, ippDetectID, detectID, ippObjID, objID, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n");
     81  PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (imageID, ippDetectID, detectID, ippObjID, objID, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n");
    8282# endif
    8383
     
    9797                                measure->detID,   // ippDetectID
    9898                                measure->extID,   // detectID
    99                                 ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID
     99                                ((uint64_t)average->catID * 1000000000) + (uint64_t)average->objID, // ippObjID
     100// NOTE: this is better, but the above is the current ippToPsps value
     101//                              ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID
    100102                                average->extID,   // objID
    101103                                measure->dbFlags,  // flags
     
    108110                                measure->dXccd * 0.01 * fabs(measure->pltscale), // estimate of raErr
    109111                                measure->dYccd * 0.01 * fabs(measure->pltscale) // estimate of decErr
     112// XXX fileID??
    110113# if (SQL_INSERT)
    111114                   );
     
    147150    }
    148151    char sql[256];
    149     snprintf (sql, 256, "load data infile '/tmp/dvopsps.dat' into table dvoDetection;");
     152    snprintf (sql, 256, "load data infile '/tmp/dvopsps.dat' into table dvoDetectionFull;");
    150153    int status = mysql_query(mysql, sql);
    151154# endif
Note: See TracChangeset for help on using the changeset viewer.