Issue Details (XML | Word | Printable)

Key: CORE-1063
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Andrew
Votes: 0
Watchers: 0

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

Server hangs eating CPU and performs huge I/O copying different codepage fields

Created: 21/Dec/06 08:00 AM   Updated: 04/Feb/16 05:31 PM
Component/s: Engine
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1, 2.1 Alpha 1

File Attachments: 1. Zip Archive (37 kB)

Environment: Windows XP SP2. A64X2 4200+, 1Gb RAM, 160Gb SATA drive
Issue Links:

QA Status: Done successfully

 Description  « Hide
Restore the small database from attached backup and run the following script on it:

alter table cms_wiki
add u_name varchar(100) character set UTF8,
add u_title varchar(100) character set UTF8,
add u_description blob sub_type 1 character set UTF8,
add u_text blob sub_type 1 character set UTF8;


update cms_wiki set
u_name = name, u_title = title, u_text = text, u_description = description;

drop index uq_cms_wiki;

alter table cms_wiki drop name, drop description, drop text, drop title;


alter table cms_wiki
alter u_name to name,
alter u_title to title,
alter u_description to description,
alter u_text to text;



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andrew added a comment - 21/Dec/06 08:04 AM
This is a database backup. Restore it before performing tests.

Vlad Khorsun added a comment - 21/Dec/06 01:21 PM
I reproduced it and can confirm.
FB 2.1 returns transliteration error (instead of endless loop) but this is also bug.
I see several bugs in the code unfortunately :

  filter_transliterate_text in filters.cpp can't deal with blob segments more than 16K-1 bytes
  16K segment expanded twice upto 64K (win1251 -> UTF16, UTF16 -> UTF8 in your case)
  we have a lot of USHORT variables there
  when we assign value of 65536 into USHORT variable we have truncation
  copy_blob in blb.cpp don't expect segment of length 0 and run into endless loop storing empty blob pages on each iteration

very sad :(

Vlad Khorsun added a comment - 25/Dec/06 05:36 AM
Fix committed into 2.0.1 tree

Philippe Makowski added a comment - 07/Mar/07 07:34 AM
Q/A test ok

Pavel Cisar added a comment - 26/Apr/07 11:41 AM
Reopened to update ticket information.