"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/utilities/ntrace/TracePluginImpl.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

TracePluginImpl.cpp  (Firebird-3.0.2.32703-0.tar.bz2):TracePluginImpl.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 49 skipping to change at line 49
#include "../../common/dsc.h" #include "../../common/dsc.h"
#include "../../common/utils_proto.h" #include "../../common/utils_proto.h"
#include "../../common/UtilSvc.h" #include "../../common/UtilSvc.h"
#include "../../jrd/svc_undoc.h" #include "../../jrd/svc_undoc.h"
#include "../../jrd/constants.h" #include "../../jrd/constants.h"
#include "../../common/os/path_utils.h" #include "../../common/os/path_utils.h"
#include "../../jrd/inf_pub.h" #include "../../jrd/inf_pub.h"
#include "../../dsql/sqlda_pub.h" #include "../../dsql/sqlda_pub.h"
#include "../../common/classes/ImplementHelper.h" #include "../../common/classes/ImplementHelper.h"
#include "../../common/SimpleStatusVector.h" #include "../../common/SimpleStatusVector.h"
#include "../../jrd/status.h"
using namespace Firebird; using namespace Firebird;
using namespace Jrd; using namespace Jrd;
static const char* const DEFAULT_LOG_NAME = "default_trace.log"; static const char* const DEFAULT_LOG_NAME = "default_trace.log";
#ifdef WIN_NT #ifdef WIN_NT
#define NEWLINE "\r\n" #define NEWLINE "\r\n"
#else #else
#define NEWLINE "\n" #define NEWLINE "\n"
skipping to change at line 763 skipping to change at line 764
{ {
paramvalue = "<NULL>"; paramvalue = "<NULL>";
} }
else else
{ {
// Assign value // Assign value
switch (parameters->dsc_dtype) switch (parameters->dsc_dtype)
{ {
// Handle potentially long string values // Handle potentially long string values
case dtype_text: case dtype_text:
formatStringArgument(paramvalue, {
parameters->dsc_address, paramete FbLocalStatus status;
rs->dsc_length); const char* text = params->getTextUTF8(&s
tatus, i);
if (status->getState() & IStatus::STATE_E
RRORS)
{
formatStringArgument(paramvalue,
parameters->dsc_address,
parameters->dsc_length);
}
else
formatStringArgument(paramvalue,
(UCHAR*)text, strlen(text));
break; break;
}
case dtype_cstring: case dtype_cstring:
formatStringArgument(paramvalue, formatStringArgument(paramvalue,
parameters->dsc_address, parameters->dsc_address,
strlen(reinterpret_cast<const cha r*>(parameters->dsc_address))); strlen(reinterpret_cast<const cha r*>(parameters->dsc_address)));
break; break;
case dtype_varying: case dtype_varying:
formatStringArgument(paramvalue, {
parameters->dsc_address + 2, FbLocalStatus status;
*(USHORT*)parameters->dsc_address const char* text = params->getTextUTF8(&s
); tatus, i);
if (status->getState() & IStatus::STATE_E
RRORS)
{
formatStringArgument(paramvalue,
parameters->dsc_address +
2,
*(USHORT*)parameters->dsc
_address);
}
else
formatStringArgument(paramvalue,
(UCHAR*)text, strlen(text));
break; break;
}
// Handle quad // Handle quad
case dtype_quad: case dtype_quad:
case dtype_blob: case dtype_blob:
case dtype_array: case dtype_array:
case dtype_dbkey: case dtype_dbkey:
{ {
ISC_QUAD *quad = (ISC_QUAD*) parameters-> dsc_address; ISC_QUAD *quad = (ISC_QUAD*) parameters-> dsc_address;
paramvalue.printf("%08X%08X", quad->gds_q uad_high, quad->gds_quad_low); paramvalue.printf("%08X%08X", quad->gds_q uad_high, quad->gds_quad_low);
break; break;
skipping to change at line 952 skipping to change at line 975
case isc_info_svc_svr_offline: case isc_info_svc_svr_offline:
recv_query.printf(NEWLINE "\t\t set service offli ne"); recv_query.printf(NEWLINE "\t\t set service offli ne");
break; break;
case isc_info_svc_get_env: case isc_info_svc_get_env:
recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD"); recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD");
break; break;
case isc_info_svc_get_env_lock: case isc_info_svc_get_env_lock:
recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD_LCK"); recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD_LOCK");
break; break;
case isc_info_svc_get_env_msg: case isc_info_svc_get_env_msg:
recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD_MSG"); recv_query.printf(NEWLINE "\t\t retrieve the sett ing of $FIREBIRD_MSG");
break; break;
case isc_info_svc_dump_pool_info: case isc_info_svc_dump_pool_info:
recv_query.printf(NEWLINE "\t\t print memory coun ters"); recv_query.printf(NEWLINE "\t\t print memory coun ters");
break; break;
skipping to change at line 1456 skipping to change at line 1479
bool need_statement = true; bool need_statement = true;
const char* sql = statement->getText(); const char* sql = statement->getText();
if (!sql) if (!sql)
return; return;
size_t sql_length = strlen(sql); size_t sql_length = strlen(sql);
if (!sql_length) if (!sql_length)
return; return;
if (config.include_filter.hasData() || config.exclude_filter.hasData()) if (config.include_filter.hasData())
{ {
const char* sqlUtf8 = statement->getTextUTF8(); include_matcher->reset();
FB_SIZE_T utf8_length = fb_strlen(sqlUtf8); include_matcher->process((const UCHAR*)sql, sql_length);
need_statement = include_matcher->result();
if (config.include_filter.hasData()) }
{
include_matcher->reset();
include_matcher->process((const UCHAR*) sqlUtf8, utf8_len
gth);
need_statement = include_matcher->result();
}
if (need_statement && config.exclude_filter.hasData()) if (need_statement && config.exclude_filter.hasData())
{ {
exclude_matcher->reset(); exclude_matcher->reset();
exclude_matcher->process((const UCHAR*) sqlUtf8, utf8_len exclude_matcher->process((const UCHAR*)sql, sql_length);
gth); need_statement = !exclude_matcher->result();
need_statement = !exclude_matcher->result();
}
} }
if (need_statement) if (need_statement)
{ {
stmt_data.description = FB_NEW_POOL(*getDefaultMemoryPool()) stri ng(*getDefaultMemoryPool()); stmt_data.description = FB_NEW_POOL(*getDefaultMemoryPool()) stri ng(*getDefaultMemoryPool());
if (stmt_data.id) { if (stmt_data.id) {
stmt_data.description->printf(NEWLINE "Statement %d:", st mt_data.id); stmt_data.description->printf(NEWLINE "Statement %d:", st mt_data.id);
} }
 End of changes. 9 change blocks. 
26 lines changed or deleted 48 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)