Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL -X: double quotes are missed for COLLATE <C> of CREATE DOMAIN statement when <C> is from any non-ascii charset [CORE5220] #5500

Closed
firebird-automations opened this issue Apr 29, 2016 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Following script must be stored in Cyrillic charset (Win1251):

set bail on;
set echo on;

create collation "Цифры" for utf8 from unicode case insensitive 'NUMERIC\-SORT=1';
create collation "Спецы" for iso8859\_1 from es\_es\_ci\_ai 'SPECIALS\-FIRST=1';
commit;

create domain dm\_nums varchar\(50\) character set utf8 collate "Цифры";
create domain dm\_nams varchar\(50\) character set iso8859\_1 collate "Спецы";
commit;

===

Then open cmd.exe and do on empty database:

chcp 1251
C:\MIX\firebird\fb25\bin\isql -ch win1251 /:e25 -i c0986r5.sql -z 1>c0986r-25.log 2>&1
findstr /i /c:failed /c:exceed /c:encountered c0986r-25.log
C:\MIX\firebird\fb25\bin\isql -x /:e25 >c0986r-25-meta.sql

Now open file "c0986r-25-meta.sql" (where metadata was extracted).
It will be like this:

SET SQL DIALECT 3;

/* CREATE DATABASE '/:e25' PAGE_SIZE 4096 DEFAULT CHARACTER SET NONE */

/* Collations */
CREATE COLLATION "Спецы" FOR ISO8859_1 FROM EXTERNAL ('ES_ES_CI_AI') PAD SPACE CASE INSENSITIVE ACCENT INSENSITIVE 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1';
CREATE COLLATION "Цифры" FOR UTF8 FROM EXTERNAL ('UNICODE') PAD SPACE CASE INSENSITIVE 'NUMERIC-SORT=1';

/* Domain definitions */
CREATE DOMAIN DM_NAMS AS VARCHAR(50) CHARACTER SET ISO8859_1 COLLATE Спецы;
CREATE DOMAIN DM_NUMS AS VARCHAR(50) CHARACTER SET UTF8 COLLATE Цифры;

NOTE on tailing parts of 'CREATE DOMAIN' statements:

===
COLLATE Спецы;
COLLATE Цифры;

Non-ascii names should be enclosed in double quotes, otherwise this script will not be compiled.

Commits: 1f6e7e8 4958d2c d1d0cac c2c322a ff1222c FirebirdSQL/fbt-repository@5f0520b

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0.1 [ 10730 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment