--- chewbacca/YodaProfiler/src/R2-D2.cpp 2008/09/23 07:20:33 1.1.1.1 +++ chewbacca/YodaProfiler/src/R2-D2.cpp 2014/10/14 13:19:34 1.5 @@ -297,8 +297,9 @@ }; // myquery.str(""); - myquery << "SET time_zone='+0:00'"; - dbc->Query(myquery.str().c_str()); + myquery << "SET time_zone='+0:00';"; + delete dbc->Query(myquery.str().c_str()); + delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); // GL_ROOT *glroot = new GL_ROOT(); GL_RUN *glrun = new GL_RUN(); @@ -619,9 +620,9 @@ // if ( strcmp(l2filename.Data(),"") ){ // ---------------- - Bool_t found = false; + // Bool_t found = false; Int_t ID = 0; - Int_t ID_RAW = 0; + // Int_t ID_RAW = 0; // const char *rawpath = ""; const char *rawname = ""; @@ -639,7 +640,7 @@ if( Row == NULL ) break; for( t = 0; t < pResult->GetFieldCount(); t++){ if(t==0) ID = atoi(Row->GetField(t)); - if(t==1) ID_RAW = atoi(Row->GetField(t)); + // if(t==1) ID_RAW = atoi(Row->GetField(t)); }; }; delete pResult; @@ -656,7 +657,7 @@ for( r=0; r < pResult->GetRowCount(); r++){ Row = pResult->Next(); if( Row == NULL ) break; - found = true; + // found = true; if ( !r ) printf("\n File %s contains the following runs: \n\n",l2filename.Data()); printf(" %u ",(UInt_t)atoll(Row->GetField(0))); if ( r < (pResult->GetRowCount()-1) ){ @@ -964,7 +965,11 @@ // // Close the DB connection // - if ( dbc ) dbc->Close(); + if ( dbc ){ + dbc->Close(); + delete dbc; + dbc = 0; + } // if ( !neat ) printf("\n"); //