Skip to content

Commit

Permalink
Backport fix bug CORE-4225 : Server crashes when attempting to trace …
Browse files Browse the repository at this point in the history
…activity on database having a db-level trigger
  • Loading branch information
hvlad committed Sep 18, 2013
1 parent fa00f70 commit 8c3c0ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/jrd/trace/TraceObjects.cpp
Expand Up @@ -451,6 +451,9 @@ const char* TraceTriggerImpl::getTriggerName()

const char* TraceTriggerImpl::getRelationName()
{
if (m_which == trg_all)
return NULL;

const jrd_rel* rel = m_trig->req_rpb->rpb_relation;
return rel ? rel->rel_name.c_str() : NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/ntrace/TracePluginImpl.cpp
Expand Up @@ -1898,7 +1898,7 @@ void TracePluginImpl::log_event_trigger_execute(TraceDatabaseConnection* connect
if (trgname.empty())
trgname = "<unknown>";

if (trigger->getRelationName())
if ((trigger->getWhich() != trg_all) && trigger->getRelationName())
{
string relation;
relation.printf(" FOR %s", trigger->getRelationName());
Expand Down

0 comments on commit 8c3c0ba

Please sign in to comment.