Suppress output of "SQL>" and "CON>" prompts in ISQL in 2.5.x and 3.0 when it 
get commands through OS pipe mechanism
--------------------------------------------------------------------------------------------------------------------

                 Key: CORE-4944
                 URL: http://tracker.firebirdsql.org/browse/CORE-4944
             Project: Firebird Core
          Issue Type: Improvement
          Components: ISQL
    Affects Versions: 2.5.4, 2.5.3 Update 1, 2.5.3, 2.5.2 Update 1, 2.5.2, 
2.5.1, 2.5.0
            Reporter: Pavel Zotov
            Priority: Minor


Create empty database in FB 2.5  (I've assigned to it alias = 'oltp25') and 
following text file:
===
connect '/3255:oltp25'; 
set list on; 

select
    mon$attachment_id
    ,mon$server_pid
    ,mon$state
    ,mon$attachment_name
    ,mon$user
    ,mon$role
    ,mon$remote_protocol
    ,mon$remote_address
    ,mon$remote_pid
    ,mon$character_set_id
    ,mon$timestamp
    ,mon$garbage_collection
    ,mon$remote_process
    ,mon$stat_id
from mon$attachments
where mon$attachment_id = current_connection
;

show version;

exit;
===

Note: this file does contain empty lines. Just for readability :-)

Then try to send tis file in STDOUT (using TYPE command on Windows) and PIPE 
this output to ISQL, but use:
1) ISQL of 2.5
2) ISQL of 3.0.

You'll get following results:

1) when use ISQL of 2.5:
===
C:\...>type pipetest.sql | C:\MIX\firebird\fb25\bin\isql.exe  -q
SQL> Database:  '/3255:oltp25'
SQL> SQL> SQL> CON> CON> CON> CON> CON> CON> CON> CON> CON> CON> CON> CON> CON> 
CON> CON> CON> CON>
MON$ATTACHMENT_ID               43
MON$SERVER_PID                  1280
MON$STATE                       1
MON$ATTACHMENT_NAME             oltp25
MON$USER                        SYSDBA
MON$ROLE                        NONE
MON$REMOTE_PROTOCOL             TCPv4
MON$REMOTE_ADDRESS              192.168.43.154
MON$REMOTE_PID                  2504
MON$CHARACTER_SET_ID            0
MON$TIMESTAMP                   2015-09-23 21:54:11.8780
MON$GARBAGE_COLLECTION          1
MON$REMOTE_PROCESS              C:\MIX\firebird\fb25\bin\isql.exe
MON$STAT_ID                     2


SQL> SQL> ISQL Version: WI-V2.5.5.26929 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.5.26929 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.5.26929 Firebird 
2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.5.26929 Firebird 
2.5/tcp (csprog)/P12"
on disk structure version 11.2
SQL> SQL>
===

2) when use ISQL of 3.0:
===
C:\...>type pipetest.sql | C:\MIX\firebird\fb30\isql.exe -q

MON$ATTACHMENT_ID               42
MON$SERVER_PID                  1280
MON$STATE                       1
MON$ATTACHMENT_NAME             oltp25
MON$USER                        SYSDBA
MON$ROLE                        NONE
MON$REMOTE_PROTOCOL             TCPv4
MON$REMOTE_ADDRESS              192.168.43.154
MON$REMOTE_PID                  3964
MON$CHARACTER_SET_ID            0
MON$TIMESTAMP                   2015-09-23 21:54:07.9720
MON$GARBAGE_COLLECTION          1
MON$REMOTE_PROCESS              C:\MIX\firebird\fb30\isql.exe
MON$STAT_ID                     2


ISQL Version: WI-V3.0.0.32047 Firebird 3.0 Release Candidate 1
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-V2.5.5.26929 Firebird 
2.5"
Firebird/Windows/Intel/i386 (remote server), version "WI-V2.5.5.26929 Firebird 
2.5/tcp (csprog)/P12"
Firebird/Windows/Intel/i386 (remote interface), version "WI-V3.0.0.32047 
Firebird 3.0 Release Candidate 1/tcp (csprog)/P12"
on disk structure version 11.2
===

One may see that ISQL 2.5 produces lot of 'dirty' tokens in its output, such as 
"SQL>" and  "CON>".  And also it ignores command switch '-q' and produces name 
of database ("Database:  '/3255:oltp25'").

Can these unneeded tokens be suppressed in its output ?


-- 
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

        

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to