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-automations opened this issue Jun 2, 2016 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

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

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

@AlexPeshkoff
Copy link
Member

AlexPeshkoff commented May 24, 2021 via email

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

No branches or pull requests

3 participants