Issue Details (XML | Word | Printable)

Key: CORE-4571
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 3
Operations

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

Can't select from table with ICU column when database (.FDB) is created on LINUX with icu 4.2.1 and then copied to WINDOWS

Created: 07/Oct/14 06:00 PM   Updated: 21/Dec/15 07:39 PM
Component/s: None
Affects Version/s: 3.0 Alpha 2
Fix Version/s: 3.0 Beta 2

QA Status: Done successfully
Test Specifics: Platform (Windows/Linux) specific


 Description  « Hide
On Linux, empty database:

create collation nums_coll for utf8 from unicode case insensitive 'NUMERIC-SORT=1';
commit;
create domain dm_nums as varchar(20) character set utf8 collate nums_coll;
commit;
create table wares(
   id bigint generated by default as identity constraint pk_wares primary key using index pk_wares
   ,numb dm_nums
   ,constraint wares_numb_unq unique(numb) using index wares_numb_unq
);
commit;
exit;

Then make copy .FDB (not .FBK) to Windows machine and run there ISQL with attach to this database - no problem, it is opened OK.
Then: select * from wares;

Result:

SQL> select * from wares;
Statement failed, SQLSTATE = 22021
COLLATION NUMS_COLL for CHARACTER SET UTF8 is not installed

PS.

On linux:

1) $ rpm -qa | grep icu
icu4j-eclipse-4.2.1-5.el6.x86_64
libicu-4.2.1-9.1.el6_2.x86_64

2) ISQL Version: LI-T3.0.0.31353 Firebird 3.0 Alpha 2
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.31353 Firebird 3.0 Alpha 2"
Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.31353 Firebird 3.0 Alpha 2/tcp (oel64)/P13"
Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.31353 Firebird 3.0 Alpha 2/tcp (oel64)/P13"
on disk structure version 12.0

On windows:

1) ICU is supplied in FB snaphot, 5.2
2) ISQL Version: WI-T3.0.0.31353 Firebird 3.0 Alpha 2
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-T3.0.0.31353 Firebird 3.0 Alpha 2"
Firebird/Windows/Intel/i386 (remote server), version "WI-T3.0.0.31353 Firebird 3.0 Alpha 2/tcp (IT_test)/P13"
Firebird/Windows/Intel/i386 (remote interface), version "WI-T3.0.0.31353 Firebird 3.0 Alpha 2/tcp (IT_test)/P13"
on disk structure version 12.0



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dimitry Sibiryakov added a comment - 07/Oct/14 06:14 PM
As designed. Between servers with different versions of ICU database can be transferred only by backup-restore.

Adriano dos Santos Fernandes added a comment - 07/Oct/14 06:23 PM
Pavel, can you backup and restore (both!) the Linux-created fdb in Windows?

Pavel Zotov added a comment - 07/Oct/14 06:40 PM
Adriano,

yes, no problem with that:

C:\>del C:\1INSTALL\FB30SNAP\tmpicu.fdb.tmp 2>nul

C:\>C:\1INSTALL\FB30SNAP\gbak.exe -b C:\1INSTALL\FBTEST\tmpicu.fdb C:\1INSTALL\FBTEST\tmpicu.fbk.tmp
--- no output ---

C:\>C:\1INSTALL\FB30SNAP\gbak.exe -c C:\1INSTALL\FBTEST\tmpicu.fbk.tmp C:\1INSTALL\FB30SNAP\tmpicu.fdb.tmp
--- no output ---

Alexander Peshkov made changes - 10/Oct/14 12:07 PM
Field Original Value New Value
Assignee Alexander Peshkov [ alexpeshkoff ]
Alexander Peshkov added a comment - 10/Oct/14 12:09 PM
Want to make sure - if you do not have constraint wares_numb_unq will it be possible to transfer database file between different ICU versions?

Pavel Zotov added a comment - 10/Oct/14 12:52 PM
> if you do not have constraint wares_numb_unq will it be possible to transfer database file between different ICU versions?

Seems than NOT.

This is new case of DDL on source (linux) host:

create collation nums_coll for utf8 from unicode;
commit;
create domain dm_nums as varchar(20) character set utf8 collate nums_coll;
commit;
create table wares(
   id bigint
   ,numb dm_nums
);
commit;

Running this on linux I get:
SQL> show table wares;
ID BIGINT Nullable
NUMB (DM_NUMS) VARCHAR(20) CHARACTER SET UTF8 Nullable
                                 COLLATE NUMS_COLL
SQL> show domain dm_nums;
DM_NUMS VARCHAR(20) CHARACTER SET UTF8 Nullable
                                 COLLATE NUMS_COLL
SQL> show collation nums_coll;
NUMS_COLL, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, 'COLL-VERSION=49.192.5.41'

SQL> exit;

The pack database in .rar, copy this to Windows host, unpack and trying to attach and query table wares:

C:\1INSTALL\FB30SNAP>C:\1INSTALL\FB30SNAP\isql.exe localhost/3333:C:\1INSTALL\FBTEST\tmpicu.fdb
Database: localhost/3333:C:\1INSTALL\FBTEST\tmpicu.fdb
SQL> show table;
       WARES
SQL> select * from wares;
Statement failed, SQLSTATE = 22021
COLLATION NUMS_COLL for CHARACTER SET UTF8 is not installed

The same error.

Dmitry Yemanov made changes - 09/Nov/14 11:11 AM
Regression 3.0 Alpha 2 [ 10560 ]
Alexander Peshkov added a comment - 16/Dec/14 02:42 PM
Except mostly recommended for such cases method (install required ICU version) added switch '-icu' to gfix (and appropriate DPB tag, and appropriate services support) updating ICU-dependent collations and rebuilding dependent indices.

Alexander Peshkov made changes - 16/Dec/14 02:42 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0 Beta 2 [ 10586 ]
Resolution Fixed [ 1 ]
Pavel Zotov made changes - 02/Jun/15 05:11 AM
Status Resolved [ 5 ] Resolved [ 5 ]
Test Details Need original .fdb (which can not be attached on windows host due to ICU problems) for every new test launch because `gfix -icu` will fix problem and this .fdb will be changed.
It would be nice if fbt_run could understand something like this:
 'database': 'Unzip',
 'zip_file': 'core4571.fdb.zip'
-- where "core4571.fdb.zip" is archive of original database file (not .fbk!) which has troubles.
QA Status Deferred
Pavel Cisar made changes - 23/Sep/15 11:30 AM
Status Resolved [ 5 ] Closed [ 6 ]
Pavel Zotov made changes - 21/Dec/15 07:39 PM
Status Closed [ 6 ] Closed [ 6 ]
Test Specifics [Platform (Windows/Linux) specific]
Test Details Need original .fdb (which can not be attached on windows host due to ICU problems) for every new test launch because `gfix -icu` will fix problem and this .fdb will be changed.
It would be nice if fbt_run could understand something like this:
 'database': 'Unzip',
 'zip_file': 'core4571.fdb.zip'
-- where "core4571.fdb.zip" is archive of original database file (not .fbk!) which has troubles.
QA Status Deferred Done successfully