Issue Details (XML | Word | Printable)

Key: CORE-5448
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Zoran Vučenović
Votes: 0
Watchers: 1
Operations

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

FB3 - crash (consistency check) when creating view on table which has column with character set none, database default charset is utf8, and utf8 default collation is 'unicode'.

Created: 11/Jan/17 12:09 PM   Updated: 22/Jun/18 06:59 AM
Component/s: Engine
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2, 4.0 Alpha 1

File Attachments: None
Image Attachments:

1. isql-screenshot.png
(52 kB)
Environment: Linux mint 18.1, 64 bit, but tested also on Windows 7 32 bit, and it seems to be there too.

QA Status: Covered by another test(s)
Test Details:
See test for CORE-5846 (it was made on this ticket basis).


 Description  « Hide
Please do the following four steps in FB 3.0.1:

/* 1. Create new database and set utf8 to be the default char set (change db path to whatever you want, in my example "test1" is an alias defined in database.conf) */
create database 'inet://localhost/test1' default character set utf8;

/* 2. set default collation of utf8 to be unicode */
alter character set utf8 set default collation unicode;

/* 3. create table with a field which has character set none */
create table table1
(
  fld1 char(1) character set none
);

/* 4. Now, try to create view which reads this field */
create view view1
as
select fld1 from table1
;

After this, you get:

Statement failed, SQLSTATE = XX000
internal Firebird consistency check (pointer page lost from DPM_delete_relation (246), file: dpm.cpp line: 1159)

And database seems to be corrupted afterwards.

There is no such problem with FB 2.5. I am prepairing to migrate my databases to FB 3, but because of this bug, I'm still remaining on 2.5.6.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Zoran Vučenović added a comment - 11/Jan/17 12:22 PM
I'm attaching the screenshot.
Please, take a look.

Pavel Zotov added a comment - 11/Jan/17 07:16 PM
Confirmed on WI-T4.0.0.494\

SQL> create database 'localhost:C:\FBTESTING\qa\fbt-repo\tmp\c5448.fdb' default character set utf8;
SQL> alter character set utf8 set default collation unicode;
SQL> create table table1
CON> (
CON> fld1 char(1) character set none
CON> );
SQL> create view view1
CON> as
CON> select fld1 from table1
CON> ;
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (pointer page lost from DPM_delete_relation (246), file: dpm.cpp line: 1149)

Vlad Khorsun added a comment - 02/Feb/17 11:36 AM
The bugcheck reason is fixed (thus i consider this ticket as fixed) but there is another problem:

SQL> create view view1
CON> as
CON> select fld1 from table1;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-VIEW1
-Implementation of text subtype 512 not located.