From 667b32ea6affb41bf37cfa2c25ea34a93a6e8993 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Thu, 3 Dec 2009 17:58:04 +0000 Subject: [PATCH] Fixed CORE-2785 - Transliteration error with COMMENT statement --- src/jrd/filters.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/jrd/filters.cpp b/src/jrd/filters.cpp index faf36fc031..3ddb65cdb8 100644 --- a/src/jrd/filters.cpp +++ b/src/jrd/filters.cpp @@ -793,6 +793,7 @@ ISC_STATUS filter_transliterate_text(USHORT action, BlobControl* control) { USHORT len = control->ctl_buffer_length; Firebird::HalfStaticArray buffer; + bool first = true; BYTE* p; while (len || aux->ctlaux_buffer1_unused) @@ -838,7 +839,16 @@ ISC_STATUS filter_transliterate_text(USHORT action, BlobControl* control) } if (len > 0 && err_position == 0) - return isc_transliteration_failed; + { + if (first) + return isc_transliteration_failed; + else + { + // That bytes should be written in the next put or rejected in + // close - CORE-2785. + break; + } + } /* hand the text off to the next stage of the filter */ @@ -862,6 +872,7 @@ ISC_STATUS filter_transliterate_text(USHORT action, BlobControl* control) control->ctl_number_segments++; len = 0; + first = false; } return FB_SUCCESS;