FirebirdSQL / firebird

Firebird server, client and tools
https://firebirdsql.org
1.26k stars 217 forks source link

ISQL 'show exception' command can terminate subsequent output of executing script when non-ascii objects are created in database [CORE5221] #5501

Open firebird-automations opened 8 years ago

firebird-automations commented 8 years ago

Submitted by: @pavel-zotov

Attachments: isql_show_exception_terminates_subsequent_output.7z

Consider script "c0986r2.sql" from attached .7z (it was created with charset = Cyrillic, cp = 1251).

Unpack it and run (on new empty database):

C:\MIX\firebird\fb30\isql -ch win1251 /:e30 -i c0986r2.sql -z 1>c0986r-30.log 2>&1

NOTE that script "c0986r2.sql" finishes with thee lines:

. . . set echo on;

show collation;

show domain;

show exception;

show sequence;

show table;

show trigger;

show view;

show procedure;

show role;

File "c0986r-30.log" will be finished with this:

set echo on;

show collation; Испания, CHARACTER SET ISO8859_1, FROM EXTERNAL ('ES_ES_CI_AI'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1' Циферки, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, 'COLL-VERSION=58.0.6.50;NUMERIC-SORT=1'

show domain; Артикулы Группы
ИД'шники Кол-во
Комрады

show exception; There are no exceptions in this database

So, all these commands:

show sequence; show table; show trigger; show view; show procedure; show role;

-- either did not run or their output was suppressed.

firebird-automations commented 8 years ago
Modified by: @pavel-zotov Attachment: isql\_show\_exception\_terminates\_subsequent\_output\.7z \[ 12954 \]
firebird-automations commented 8 years ago

Commented by: @pavel-zotov

PS. Checked on: WI-V3.0.0.32499, WI-T4.0.0.153

pavel-zotov commented 2 months ago

See test for #1393 (CORE-986). Output in the provided .sql was terminated because of 'SET BAIL ON' (if DB has no exceptions then 'show exception' prints message and raise error flag in that case).