8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00

Excess conversion of sql statement to UTF8 is removed from fbtrace (#101)

This commit is contained in:
Ilya Eremin 2017-07-25 12:36:22 +03:00 committed by Alexander Peshkov
parent e69e1bcff0
commit cdaab7f30a

View File

@ -1482,24 +1482,18 @@ void TracePluginImpl::register_sql_statement(ITraceSQLStatement* statement)
if (!sql_length)
return;
if (config.include_filter.hasData() || config.exclude_filter.hasData())
if (config.include_filter.hasData())
{
const char* sqlUtf8 = statement->getTextUTF8();
FB_SIZE_T utf8_length = fb_strlen(sqlUtf8);
include_matcher->reset();
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_length);
need_statement = include_matcher->result();
}
if (need_statement && config.exclude_filter.hasData())
{
exclude_matcher->reset();
exclude_matcher->process((const UCHAR*) sqlUtf8, utf8_length);
need_statement = !exclude_matcher->result();
}
if (need_statement && config.exclude_filter.hasData())
{
exclude_matcher->reset();
exclude_matcher->process((const UCHAR*)sql, sql_length);
need_statement = !exclude_matcher->result();
}
if (need_statement)