~ubuntu-branches/ubuntu/raring/firebird2.5/raring-proposed

« back to all changes in this revision

Viewing changes to src/jrd/trace/TraceObjects.cpp

  • Committer: Package Import Robot
  • Author(s): Damyan Ivanov
  • Date: 2012-05-12 15:30:11 UTC
  • mfrom: (15.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20120512153011-31u9cbv8p06yepwi
Tags: 2.5.2~svn+54476.ds4-1
* Snapshot from upstream's 2.5 branch, revision 54476
 + CORE-3841: Corrupted database after inserting rows
 + CORE-3844: Validation not detecting one specific case of index corruption
 + Fixed regression in the fix for CORE-3777
 + CORE-3814: SuperClassic server crashes when performing a database
   shutdown with forced writes off
 + CORE-3598: Tracing: add statistics of actions that were after transaction
   finish
 + Trace errors raised by failed ON TRANSACTION ROLLBACK and ON DISCONNECT
   triggers
 + CORE-3539: Tracing: add ability to log errors that occur in runtime
   (lock conflicts, PK/UK/FK violations etc.)

* drop transitional firebird2.5-dev package

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        return getpid();
72
72
}
73
73
 
 
74
ntrace_connection_kind_t TraceConnectionImpl::getKind()
 
75
{
 
76
        return connection_database;
 
77
}
 
78
 
74
79
const char* TraceConnectionImpl::getDatabaseName()
75
80
{
76
81
        return m_att->att_filename.c_str();
553
558
        return m_svc->getServiceName();
554
559
}
555
560
 
 
561
ntrace_connection_kind_t TraceServiceImpl::getKind()
 
562
{
 
563
        return connection_service;
 
564
}
 
565
 
556
566
int TraceServiceImpl::getProcessID()
557
567
{
558
568
        return getpid();
568
578
        return NULL;
569
579
}
570
580
 
 
581
const char* TraceServiceImpl::getCharSet()
 
582
{
 
583
        return NULL;
 
584
}
 
585
 
571
586
const char* TraceServiceImpl::getRemoteProtocol()
572
587
{
573
588
        return m_svc->getNetworkProtocol().c_str();
607
622
        }
608
623
}
609
624
 
610
 
SINT64 TraceRuntimeStats::m_dummy_counts[DBB_max_dbb_count] = {0};
 
625
SINT64 TraceRuntimeStats::m_dummy_counts[RuntimeStatistics::TOTAL_ITEMS] = {0};
 
626
 
 
627
 
 
628
/// TraceStatusVectorImpl
 
629
 
 
630
const char* TraceStatusVectorImpl::getText()
 
631
{
 
632
        if (m_error.isEmpty() && (hasError() || hasWarning()))
 
633
        {
 
634
                char buff[1024];
 
635
                const ISC_STATUS* p = m_status;
 
636
                const ISC_STATUS* end = m_status + ISC_STATUS_LENGTH;
 
637
 
 
638
                while (p < end - 1)
 
639
                {
 
640
                        if (p[0] == isc_arg_gds && p[1] == 0)
 
641
                        {
 
642
                                p += 2;
 
643
                                continue;
 
644
                        }
 
645
 
 
646
                        const ISC_STATUS code = *p ? p[1] : 0;
 
647
                        if (!fb_interpret(buff, sizeof(buff), &p))
 
648
                                break;
 
649
 
 
650
                        string s;
 
651
                        s.printf("%9lu : %s\n", code, buff);
 
652
                        m_error += s;
 
653
                }
 
654
        }
 
655
 
 
656
        return m_error.c_str();
 
657
}
611
658
 
612
659
} // namespace Jrd