diff --git a/src/jrd/trace/TraceDSQLHelpers.h b/src/jrd/trace/TraceDSQLHelpers.h index 2a6ef13d05d..e42a9f1226f 100644 --- a/src/jrd/trace/TraceDSQLHelpers.h +++ b/src/jrd/trace/TraceDSQLHelpers.h @@ -54,11 +54,13 @@ class TraceDSQLPrepare m_start_clock = fb_utils::query_performance_counter(); static const char empty_string[] = ""; - if (!m_string_len || !string) + if (!string) { m_string = empty_string; m_string_len = 0; } + else if (m_string_len == 0) + m_string_len = fb_strlen(m_string); } ~TraceDSQLPrepare() diff --git a/src/utilities/ntrace/TracePluginImpl.cpp b/src/utilities/ntrace/TracePluginImpl.cpp index 4d491ec6a0d..a962af94748 100644 --- a/src/utilities/ntrace/TracePluginImpl.cpp +++ b/src/utilities/ntrace/TracePluginImpl.cpp @@ -525,6 +525,8 @@ void TracePluginImpl::logRecordStmt(const char* action, ITraceDatabaseConnection if (reg) { + fb_assert(false); + string temp; temp.printf(NEWLINE "Statement %" SQUADFORMAT", :" NEWLINE, stmt_id); record.insert(0, temp);