Issue Details (XML | Word | Printable)

Key: CORE-5220
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

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

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

Created: 29/Apr/16 02:54 PM   Updated: 30/Apr/16 08:06 AM
Component/s: Charsets/Collation, ISQL
Affects Version/s: 2.5.5, 4.0 Initial, 3.0.0
Fix Version/s: 3.0.1, 4.0 Alpha 1

QA Status: Done successfully


 Description  « Hide
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.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.