Issue Details (XML | Word | Printable)

Key: CORE-2785
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: GR
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

BLOB transliteration problem in a specific case

Created: 02/Dec/09 05:10 AM   Updated: 03/Dec/09 07:59 AM
Component/s: Charsets/Collation
Affects Version/s: 2.5 Beta 2, 2.1.3, 2.5 RC1
Fix Version/s: 2.5 RC2, 2.1.4, 3.0 Alpha 1

Time Tracking:
Not Specified

File Attachments: 1. File 2785.sql (0.5 kB)
2. File db.sql (2 kB)

Environment: Windows, IBExpert, Client CharSet UTF8
Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
Transliteration error occurs with statement

COMMENT ON table T IS
'параметры: количество
             если больше 0 подгоняет сумму товаров под данное значение пропорционально себестоимости
               если меньше 0, на выходе в GSUMMA будет себестоимость за 1 ед.
               если равно 0, делает только разложение на компоненты
  Результат';

--

This operation is not defined for system tables.
unsuccessful metadata update.
Create metadata BLOB failed.
Cannot transliterate character between character sets.

--

Reproduces with IBExpert. With ISQL - or hangs up, or gets error too:

Statement failed, SQLCODE = -607
unsuccessful metadata update
-Create metadata BLOB failed
-Cannot transliterate character between character sets

With CharSet WIN1251 works fine.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 02/Dec/09 09:03 AM
Cannot reproduce. Feel free to return with reproducible test case.

I guess you're using incorrect client charset, not matching the text encoding.

GR added a comment - 02/Dec/09 10:32 AM
>> Cannot reproduce. Feel free to return with reproducible test case.

Try to reproduce with attached file (scipt).

>> I guess you're using incorrect client charset, not matching the text encoding.

Everything is possible. But removing 1 space char query works correctly.

Dmitry Yemanov added a comment - 02/Dec/09 10:33 AM
I've attached a complete failing script (it's saved into UTF8 by the notepad). I can reproduce the issue using isql -i <db.sql>

Adriano dos Santos Fernandes added a comment - 02/Dec/09 11:07 AM
This is not direct related to COMMENT ON. It's a blob transliteration problem in a specific case.

Adriano dos Santos Fernandes added a comment - 03/Dec/09 07:59 AM
To make issue better documented, that is what happens.

When blob are transliterating, we consider that segments could have truncated text, in this case the truncated part is processed when the next segment is written.

But also, a transliteration may increase the string length, and if it is greated than 64K, it's written in chunks.

When the not-first chunk has truncated string, it has not being deferred to next segment and error incorrectly happens immediatelly.