FB 3.0 crashes when trying to RE_create two tables and define master-detail
link between them using text fields with different character sets
---------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-5680
URL: http://tracker.firebirdsql.org/browse/CORE-5680
Project: Firebird Core
Issue Type: Bug
Components: Charsets/Collation, Engine
Affects Versions: 4.0 Alpha 1, 3.0.2, 2.5.7
Reporter: Pavel Zotov
Create following script:
==================
shell del C:\MIX\firebird\QA\fbt-repo\tmp\c2284.fdb 2>nul;
create database 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\c2284.fdb' user
'SYSDBA' password 'masterkey';
recreate table test_cs__detail(x int);
recreate table test_cs__master(x int);
commit;
set autoddl off;
recreate table test_cs__master (
str_pk varchar(32) character set UTF8 not null, --------------------- [ 1 ]
primary key (str_pk) using index test_s_master_pk
);
recreate table test_cs__detail (
str_pk varchar(32) character set WIN1251 not null, ------------------ [ 2 ]
foreign key (str_pk) references test_cs__master (str_pk)
);
set echo on;
commit;
rollback;
Console output:
=============
ISQL Version: WI-V3.0.3.32854 Firebird 3.0
Server version:
WI-V3.0.3.32854 Firebird 3.0
WI-V3.0.3.32854 Firebird 3.0/tcp (csprog)/P15:C
WI-V3.0.3.32854 Firebird 3.0/tcp (csprog)/P15:C
commit;
Statement failed, SQLSTATE = 08001
I/O error during "WriteFile" operation for file
"C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB"
-Error while trying to write to file
-invalid descriptor // in national codepage
After line 19 in file crash-on-pk-fk-with-diff-cset.sql
rollback;
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (can't continue after bugcheck)
After line 21 in file crash-on-pk-fk-with-diff-cset.sql
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (can't continue after bugcheck)
After line 21 in file crash-on-pk-fk-with-diff-cset.sql
===
Note:
1. Both tables have to be created BEFORE 'recreate table' statement, i.e. they
must already exist;
2. Charsets in PK and FK fields differ.
PS.
I thought that this bug is related to CORE-5677 or CORE-2284, but after
discussion with Vlal it was decided to create new ticket.
The same result on WI-V2.5.8.27083 and WI-T4.0.0.832 -- i.e. this bug is old
enough.
firebird.log
=========
CSPROG Thu Dec 14 20:49:31 2017
Database: C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB
internal Firebird consistency check (partner index description not
found (175), file: idx.cpp line: 209)
CSPROG Thu Dec 14 20:49:31 2017
I/O error during "WriteFile" operation for file
"C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB"
Error while trying to write to file
Неверный дескриптор.
CSPROG Thu Dec 14 20:49:31 2017
Database: C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB
I/O error during "WriteFile" operation for file
"C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB"
Error while trying to write to file
Неверный дескриптор.
CSPROG Thu Dec 14 20:49:31 2017
Database: C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB
I/O error during "WriteFile" operation for file
"C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\C2284.FDB"
Error while trying to write to file
Неверный дескриптор.
CSPROG Thu Dec 14 20:49:31 2017
INET/inet_error: read errno = 10054, server host = localhost, address =
127.0.0.1/3400
CSPROG Thu Dec 14 20:49:31 2017
REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.
send_packet/send
CSPROG Thu Dec 14 20:49:31 2017
setsockopt: error setting IPV6_V6ONLY to 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel