X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=p_s%2Fsetup_instruments%2Fsetup_instruments.go;fp=p_s%2Fsetup_instruments%2Fsetup_instruments.go;h=595e75af0ee2fea0a71fb823346c98440448009f;hb=d6ee7b071e88af51731e786b840e47840d100a77;hp=c92b6df9f2877806ddd4e0e92036f094281c9857;hpb=68d16c936752d5c43f330b981bbd4b215654d13b;p=pstop.git diff --git a/p_s/setup_instruments/setup_instruments.go b/p_s/setup_instruments/setup_instruments.go index c92b6df..595e75a 100644 --- a/p_s/setup_instruments/setup_instruments.go +++ b/p_s/setup_instruments/setup_instruments.go @@ -33,8 +33,6 @@ func (si *SetupInstruments) EnableMutexMonitoring(dbh *sql.DB) { rows, err := dbh.Query(sql) if err != nil { log.Fatal(err) - - } defer rows.Close() @@ -69,11 +67,14 @@ func (si *SetupInstruments) EnableMutexMonitoring(dbh *sql.DB) { log.Fatal(err) } break - } count++ } - lib.Logger.Println(count, "rows changed in p_s.setup_instruments") + if si.update_succeeded { + lib.Logger.Println(count, "rows changed in p_s.setup_instruments") + } else { + lib.Logger.Println( "Insufficient privileges to UPDATE setup_instruments: " . err.String() ) + } } // restore any changed rows back to their original state