mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Misc
This commit is contained in:
parent
9cb2b2313c
commit
16bc18df54
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user