diff --git a/src/jrd/DatabaseSnapshot.cpp b/src/jrd/DatabaseSnapshot.cpp index c3bf0ac199..ec88240f54 100644 --- a/src/jrd/DatabaseSnapshot.cpp +++ b/src/jrd/DatabaseSnapshot.cpp @@ -951,6 +951,7 @@ void DatabaseSnapshot::putDatabase(const Database* database, // SQL dialect temp = (database->dbb_flags & DBB_DB_SQL_dialect_3) ? 3 : 1; writer.insertInt(f_mon_db_dialect, temp); + // shutdown mode if (database->dbb_ast_flags & DBB_shutdown_full) temp = shut_mode_full; @@ -961,6 +962,7 @@ void DatabaseSnapshot::putDatabase(const Database* database, else temp = shut_mode_online; writer.insertInt(f_mon_db_shut_mode, temp); + // sweep interval writer.insertInt(f_mon_db_sweep_int, database->dbb_sweep_interval); // read only flag @@ -978,6 +980,7 @@ void DatabaseSnapshot::putDatabase(const Database* database, sizeof(ISC_TIMESTAMP)); // database size writer.insertBigInt(f_mon_db_pages, PageSpace::actAlloc(database)); + // database state thread_db* tdbb = JRD_get_thread_data(); database->dbb_backup_manager->lock_shared_database(tdbb, true); @@ -997,6 +1000,7 @@ void DatabaseSnapshot::putDatabase(const Database* database, } database->dbb_backup_manager->unlock_shared_database(tdbb); writer.insertInt(f_mon_db_backup_state, temp); + // statistics writer.insertBigInt(f_mon_db_stat_id, getGlobalId(stat_id)); putStatistics(&database->dbb_stats, writer, stat_id); @@ -1177,7 +1181,7 @@ void DatabaseSnapshot::putCall(const jrd_req* request, // call id writer.insertBigInt(f_mon_call_id, getGlobalId(request->req_id)); // statement id - const SINT64 stmt_id = ((SINT64)getpid() << BITS_PER_LONG) + statement->req_id; + const SINT64 stmt_id = ((SINT64) getpid() << BITS_PER_LONG) + statement->req_id; writer.insertBigInt(f_mon_call_stmt_id, stmt_id); // caller id if (statement == request->req_caller) { diff --git a/src/jrd/DatabaseSnapshot.h b/src/jrd/DatabaseSnapshot.h index 842276f7f1..aafe23ed5c 100644 --- a/src/jrd/DatabaseSnapshot.h +++ b/src/jrd/DatabaseSnapshot.h @@ -117,7 +117,7 @@ private: static SINT64 getGlobalId(int value) { - return ((SINT64)pid << BITS_PER_LONG) + value; + return ((SINT64) pid << BITS_PER_LONG) + value; } static void putDatabase(const Database*, Firebird::ClumpletWriter&, int); diff --git a/src/jrd/event.cpp b/src/jrd/event.cpp index f0bc3e141b..6e0e01147d 100644 --- a/src/jrd/event.cpp +++ b/src/jrd/event.cpp @@ -852,7 +852,7 @@ static void delete_session(SLONG session_id) SES session = (SES) SRQ_ABS_PTR(session_id); #ifdef MULTI_THREAD - // if session currently delivered events delay its deletion until deliver ends + // if session currently delivered events, delay its deletion until deliver ends if (session->ses_flags & SES_delivering) { session->ses_flags |= SES_purge; diff --git a/src/remote/interface.cpp b/src/remote/interface.cpp index 6e299ae4bd..5c0ba4624a 100644 --- a/src/remote/interface.cpp +++ b/src/remote/interface.cpp @@ -5794,7 +5794,8 @@ static RVNT find_event( rem_port* port, SLONG id) if (!(port->port_flags & PORT_disconnect)) { - for (RVNT event = rdb->rdb_events; event; event = event->rvnt_next) { + for (RVNT event = rdb->rdb_events; event; event = event->rvnt_next) + { if (event->rvnt_id == id) return event; }