File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,14 @@ class TraceDSQLPrepare
5353
5454 m_start_clock = fb_utils::query_performance_counter ();
5555
56- if (m_string == nullptr || (m_string_len == 0 && (m_string_len = fb_strlen (m_string)) == 0 ))
57- {
58- static constexpr const char * empty_string = " <empty statement>" ;
59- static FB_SIZE_T empty_string_length = fb_strlen (empty_string);
60-
61- m_string = empty_string;
62- m_string_len = empty_string_length;
63- }
56+ if (m_string == nullptr )
57+ traceEmptyStatement ();
6458 else if (m_string_len == 0 )
59+ {
6560 m_string_len = fb_strlen (m_string);
61+ if (m_string_len == 0 )
62+ traceEmptyStatement ();
63+ }
6664 }
6765
6866 ~TraceDSQLPrepare ()
@@ -102,6 +100,15 @@ class TraceDSQLPrepare
102100 }
103101
104102private:
103+ void traceEmptyStatement ()
104+ {
105+ static constexpr const char * empty_string = " <empty statement>" ;
106+ static FB_SIZE_T empty_string_length = fb_strlen (empty_string);
107+
108+ m_string = empty_string;
109+ m_string_len = empty_string_length;
110+ }
111+
105112 bool m_need_trace;
106113 Attachment* m_attachment;
107114 jrd_tra* const m_transaction;
You can’t perform that action at this time.
0 commit comments