mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 20:43:04 +01:00
Improvement CORE-3008 : Add attachment's CHARACTER SET name into corresponding trace records
This commit is contained in:
parent
d01b2580ae
commit
18ed4f65c8
@ -507,6 +507,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* getRoleName() { return m_options->dpb_role_name.c_str(); }
|
virtual const char* getRoleName() { return m_options->dpb_role_name.c_str(); }
|
||||||
|
virtual const char* getCharSet() { return m_options->dpb_lc_ctype.c_str(); }
|
||||||
virtual const char* getRemoteProtocol() { return m_options->dpb_network_protocol.c_str(); }
|
virtual const char* getRemoteProtocol() { return m_options->dpb_network_protocol.c_str(); }
|
||||||
virtual const char* getRemoteAddress() { return m_options->dpb_remote_address.c_str(); }
|
virtual const char* getRemoteAddress() { return m_options->dpb_remote_address.c_str(); }
|
||||||
virtual int getRemoteProcessID() { return m_options->dpb_remote_pid; }
|
virtual int getRemoteProcessID() { return m_options->dpb_remote_pid; }
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
virtual int getProcessID() = 0;
|
virtual int getProcessID() = 0;
|
||||||
virtual const char* getUserName() = 0;
|
virtual const char* getUserName() = 0;
|
||||||
virtual const char* getRoleName() = 0;
|
virtual const char* getRoleName() = 0;
|
||||||
|
virtual const char* getCharSet() = 0;
|
||||||
virtual const char* getRemoteProtocol() = 0;
|
virtual const char* getRemoteProtocol() = 0;
|
||||||
virtual const char* getRemoteAddress() = 0;
|
virtual const char* getRemoteAddress() = 0;
|
||||||
virtual int getRemoteProcessID() = 0;
|
virtual int getRemoteProcessID() = 0;
|
||||||
|
@ -88,6 +88,12 @@ const char* TraceConnectionImpl::getRoleName()
|
|||||||
return user ? user->usr_sql_role_name.c_str() : NULL;
|
return user ? user->usr_sql_role_name.c_str() : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* TraceConnectionImpl::getCharSet()
|
||||||
|
{
|
||||||
|
CharSet *cs = INTL_charset_lookup(JRD_get_thread_data(), m_att->att_charset);
|
||||||
|
return cs ? cs->getName() : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
const char* TraceConnectionImpl::getRemoteProtocol()
|
const char* TraceConnectionImpl::getRemoteProtocol()
|
||||||
{
|
{
|
||||||
return m_att->att_network_protocol.c_str();
|
return m_att->att_network_protocol.c_str();
|
||||||
|
@ -59,6 +59,7 @@ public:
|
|||||||
virtual const char* getDatabaseName();
|
virtual const char* getDatabaseName();
|
||||||
virtual const char* getUserName();
|
virtual const char* getUserName();
|
||||||
virtual const char* getRoleName();
|
virtual const char* getRoleName();
|
||||||
|
virtual const char* getCharSet();
|
||||||
virtual const char* getRemoteProtocol();
|
virtual const char* getRemoteProtocol();
|
||||||
virtual const char* getRemoteAddress();
|
virtual const char* getRemoteAddress();
|
||||||
virtual int getRemoteProcessID();
|
virtual int getRemoteProcessID();
|
||||||
|
@ -948,6 +948,10 @@ void TracePluginImpl::register_connection(TraceConnection* connection)
|
|||||||
conn_data.description->append(", <unknown_user>");
|
conn_data.description->append(", <unknown_user>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* charSet = connection->getCharSet();
|
||||||
|
tmp.printf(", %s", charSet && *charSet ? charSet : "NONE");
|
||||||
|
conn_data.description->append(tmp);
|
||||||
|
|
||||||
const char* remProto = connection->getRemoteProtocol();
|
const char* remProto = connection->getRemoteProtocol();
|
||||||
const char* remAddr = connection->getRemoteAddress();
|
const char* remAddr = connection->getRemoteAddress();
|
||||||
if (remProto && *remProto)
|
if (remProto && *remProto)
|
||||||
|
Loading…
Reference in New Issue
Block a user