Skip to content
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

SHOW <X> should produce WARNING rather than ERROR when <X> does not exist in database [CORE5256] #5535

Open
firebird-issue-importer opened this issue Jun 2, 2016 · 4 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jun 2, 2016

Submitted by: @pavel-zotov

Consider this script:

set echo on;
set bail on;
show domain;
show database;

Run it via batch:

@echo off
C:\MIX\firebird\fb30\isql /:e30 -i show-grant-when-bail-on.sql
if errorlevel 1 echo Error occured inside SQL script.

Output will be:

set bail on;
show domain;
There are no domains in this database
Error occured inside SQL script.

Command 'show database;' (and all subsequent ones) was not executed because of set bail = ON. But this case (when there is no domain or other object type) not neccessary should be considered as ERROR!

Can ISQL be improved in such way that message "There are no <...> in this database" will be WARNING rather than ERROR ? (of course it should be redirected in STDERR as before).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 3, 2016

Commented by: @AlexPeshkoff

Why not use slightly modified scrypt:

set echo on;
set bail off;
show domain;
show database;
set bail on;

Next time you would like to ignore errors from some specific COMMIT :)

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 3, 2016

Commented by: @pavel-zotov

1) Your sample requires two additive commands every time I need to show objects.
2) I do not offer to ignore absence of <X>, just to consider it as warning.

@pavel-zotov
Copy link

@pavel-zotov pavel-zotov commented May 22, 2021

Up!
Any chance to see changes in FB 5.x with this issue ?

@AlexPeshkoff
Copy link
Member

@AlexPeshkoff AlexPeshkoff commented May 24, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants