-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excess conversion of sql statement to UTF8 is removed from fbtrace (#103
- Loading branch information
1 parent
dd49fa6
commit ee9085a
Showing
1 changed file
with
10 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1516,24 +1516,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(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ilya071294
Author
Collaborator
|
||
FB_SIZE_T utf8_length = fb_strlen(sqlUtf8); | ||
|
||
if (config.include_filter.hasData()) | ||
{ | ||
include_matcher->reset(); | ||
include_matcher->process((const UCHAR*) sqlUtf8, utf8_length); | ||
need_statement = include_matcher->result(); | ||
} | ||
include_matcher->reset(); | ||
include_matcher->process((const UCHAR*)sql, sql_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) | ||
|
Old code was reading a single time getTextUTF8 (why excess?) but new code is never reading it, as in
sql
there is the value returned by getText (not getTextUTF8).