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
Suppress output of "SQL>" and "CON>" prompts in ISQL in 2.5.x and 3.0 when it get commands through OS pipe mechanism [CORE4944] #5235
Comments
Commented by: Sean Leyne (seanleyne) Unless the 2.5.x output is a regression from 2.0.x, I would say that 2.5.x should remain as is. While I agree that it is 'dirty', it is how it has always been. (so this case should be closed "As designed/Wont fix"). |
Commented by: @asfernandes Sean? So there should be no point releases if bugs are declared to be features. |
Commented by: @pavel-zotov > I would say that 2.5.x should remain as is. I can imagine only one environment where this dirty output should be taken in account: some tests. From this POV you're right - it will be better to leave ISQL 2.5 behaviour as current. But one may to add new command switch to suppress these "CON> CON>" - for example, '-nop[rompt]'. So, I urge: do not close this ticket with 'won`t fix' resolution! |
Commented by: Sean Leyne (seanleyne) Adriano, My view is: I can't know how someone might be using/parsing the piped ISQL output. As such, within the context of a point-release (especially a late release), we should not be changing some minor annoyances. Even more so, if the next major release changes/fixes the issue and is close to release. |
Commented by: @pavel-zotov This: > one may to add new command switch to suppress these "CON> CON>" -- can be done anyway. If this switch will not be specified in command, no any expectations of these prompts will be broken. |
Commented by: @asfernandes > one may to add new command switch to suppress these "CON> CON>" Totally against it. If you do not want the thing fixed nor want the ticket marked as rejected, then why you created it? Please delete then! |
Commented by: @pavel-zotov > If you do not want the thing fixed I've create this ticket with exactly one goal: want to have ability suppress these dummy prompts. Currently this output can not be normally parsed or parsed. |
Commented by: @asfernandes Cannot reproduce in Linux with: cat file | isql Did you tested fresh 2.5 branch/snapshot? |
Commented by: @pavel-zotov Yes, seems that this effect can be seen only on Windows (just checked on Linux - no such "CON> CON>" lines, so you're right).
|
Submitted by: @pavel-zotov
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 ?
The text was updated successfully, but these errors were encountered: