Subject | Firebird enters infinite? loop executing this query. |
---|---|
Author | Andrew Guts |
Post date | 2006-12-18T14:37:05Z |
Hello Firebird Support,
I need to convert some of my database fields into UTF-8. So I wrote and
run operator by operator the script below:
--------------------------------------------------------
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; /* Here it hangs */
commit;
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;
CREATE UNIQUE INDEX UQ_CMS_WIKI ON CMS_WIKI (NAME, SITE_ID);
------------------------------------------------------
The database was created with CP1251. Its size is about 2 Mb. The table
to be updated is quite small - it contains only 52 records.
But when I run the update operator (see above) the server begins to
rumble by the HDD forever (I've tried to wait about 30 minutes).
Then I started the FileMon.exe by SysInternals and saw the running file
access log full of records like those:
14:25:13.218 fbserver.exe:1544 FASTIO_WRITE C:\idb\WRBD
FAILURE Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE C:\idb\WRBD
SUCCESS Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE* C:\idb\WRBD
SUCCESS Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 FASTIO_WRITE C:\idb\WRBD
FAILURE Offset: 3655426048 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE C:\idb\WRBD
SUCCESS Offset: 3655426048 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE* C:\idb\WRBD
SUCCESS Offset: 3655426048 Length: 8192
I had to kill both the client and the server to stop it. Then I've
checked the partition (no errors were found) and did backup/restore the
database (no errors). But second attempt was the same - it entered the
disk write loop again.
My OS is XP SP2, Firebird 2.0.0.12748-0 SS.
Running the similar scripts against other tables works well - it takes
hardly a few seconds.
What's wrong? Please clarify the situation.
Regards,
Andrew
I need to convert some of my database fields into UTF-8. So I wrote and
run operator by operator the script below:
--------------------------------------------------------
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; /* Here it hangs */
commit;
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;
CREATE UNIQUE INDEX UQ_CMS_WIKI ON CMS_WIKI (NAME, SITE_ID);
------------------------------------------------------
The database was created with CP1251. Its size is about 2 Mb. The table
to be updated is quite small - it contains only 52 records.
But when I run the update operator (see above) the server begins to
rumble by the HDD forever (I've tried to wait about 30 minutes).
Then I started the FileMon.exe by SysInternals and saw the running file
access log full of records like those:
14:25:13.218 fbserver.exe:1544 FASTIO_WRITE C:\idb\WRBD
FAILURE Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE C:\idb\WRBD
SUCCESS Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE* C:\idb\WRBD
SUCCESS Offset: 3655442432 Length: 8192
14:25:13.218 fbserver.exe:1544 FASTIO_WRITE C:\idb\WRBD
FAILURE Offset: 3655426048 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE C:\idb\WRBD
SUCCESS Offset: 3655426048 Length: 8192
14:25:13.218 fbserver.exe:1544 IRP_MJ_WRITE* C:\idb\WRBD
SUCCESS Offset: 3655426048 Length: 8192
I had to kill both the client and the server to stop it. Then I've
checked the partition (no errors were found) and did backup/restore the
database (no errors). But second attempt was the same - it entered the
disk write loop again.
My OS is XP SP2, Firebird 2.0.0.12748-0 SS.
Running the similar scripts against other tables works well - it takes
hardly a few seconds.
What's wrong? Please clarify the situation.
Regards,
Andrew