File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,13 @@ class TraceDSQLPrepare
5555
5656 m_start_clock = fb_utils::query_performance_counter ();
5757
58- static constexpr std::string_view empty_string = " <empty statement>" ;
59- if (m_string == nullptr || (m_string_len == 0 && (m_string_len = fb_strlen (m_string)) == 0 ))
58+ if (m_string == nullptr )
59+ traceEmptyStatement ();
60+ else if (m_string_len == 0 )
6061 {
61- m_string = empty_string.data ();
62- m_string_len = empty_string.length ();
62+ m_string_len = fb_strlen (m_string);
63+ if (m_string_len == 0 )
64+ traceEmptyStatement ();
6365 }
6466 }
6567
@@ -105,6 +107,13 @@ class TraceDSQLPrepare
105107 }
106108
107109private:
110+ void traceEmptyStatement ()
111+ {
112+ static constexpr std::string_view empty_string = " <empty statement>" ;
113+ m_string = empty_string.data ();
114+ m_string_len = empty_string.length ();
115+ }
116+
108117 bool m_need_trace;
109118 Attachment* m_attachment;
110119 jrd_tra* const m_transaction;
You can’t perform that action at this time.
0 commit comments