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

                 Key: CORE-5220
                 URL: http://tracker.firebirdsql.org/browse/CORE-5220
             Project: Firebird Core
          Issue Type: Bug
          Components: Charsets/Collation, ISQL
    Affects Versions: 3.0.0, 4.0 Initial, 2.5.5
            Reporter: 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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to