Description
Submitted by: Johann Anhofer (jonjonas68)
If I create a database with default character set UTF8 and collation UNICODE_CI and then create a table with a varchar field, then the firebird engine crashes.
Steps to reproduce the crash:
Run two files with the isql utility:
isql -user SYSDBA -password masterkey -input create.sql
isql testme -user SYSDBA -password masterkey -input test.sql
The second call produces always a: Segmentation fault: 11, and an entry in the firebird.log file:
/Library/Frameworks/Firebird.framework/Resources/bin/fbguard: /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/firebird terminated abnormally (-1)
/Library/Frameworks/Firebird.framework/Resources/bin/fbguard: guardian starting /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/firebird
If I use the create statement without specifying the characterset/collation all goes well (create database 'testme' page_size=8192;)
If I enter the sql commands directly in isql then sometimes it doesn't crash, I cannot figure out on what the crash depends.
The user is within the firebird group and has read/write access to the database folder, which is owned by the firebird user.
If I use a TCP connection instead of a local connection, the engine crashes as well, but I get a different error message:
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
If I create the database on a Ubuntu 18.04 machine, backup it and restore it to the mac, I'm able to use the database with a local connection, but connecting to it with TCP crashes the engine.
(Restoring it with gbak crashes if I use a TCP connection).
File #1: create.sql:
set AUTODDL on;
set SQL DIALECT 3;
set NAMES UTF8;
create database 'testme' page_size=8192 default character set UTF8 collation UNICODE_CI;
File #2: test.sql
set AUTODDL on;
set SQL DIALECT 3;
set NAMES UTF8;
create domain TOKEN as varchar(50);
comment on domain TOKEN is 'An english language text token.';
create table TEXT_TOKENS (
TEXT_TOKEN TOKEN not null,
CONTEXT varchar(100)
);
alter table TEXT_TOKENS add constraint PK_TEXT_TOKENS primary key (TEXT_TOKEN);
comment on table TEXT_TOKENS is
'Contains english shortcuts for all database texts';
comment on column TEXT_TOKENS.TEXT_TOKEN is
'A shortcut for a english text';
comment on column TEXT_TOKENS.CONTEXT is
'Context where the text is used as information for the translator';