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 GRANTS does not display info about exceptions which were granted to user [CORE4839] #5135

Closed
firebird-automations opened this issue Jun 12, 2015 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

connect 'localhost/3333:e30' user 'SYSDBA' password 'masterke';

create or alter user u1 password '1';
recreate exception exc_foo 'Houston we have a problem: next sequence value is @1';
recreate sequence gen_bar start with 9223372036854775807 increment by 2147483647;
commit;

grant usage on exception exc_foo to u1; ----------------------- [ 1 ]
grant usage on sequence gen_bar to u1;
commit;

Output not containing info about possible usage of exception 'exc_foo' which was set in [ 1 ]:

/* Grant permissions for this database */
GRANT USAGE ON SEQUENCE GEN_BAR TO USER U1

PS. User `u1`, of course, CAN use both exception & sequence:

connect 'localhost/3333:e30' user u1 password '1';

show exception exc_foo;
show sequence gen_bar;
set term ^;
execute block as
begin
exception exc_foo using (next value for gen_bar);
end
^ set term ;^
commit;

Output:

Exception Name Used by, Type
=============================== =============================================
EXC_FOO
Msg: Houston we have a problem: next sequence value is @1

Generator GEN_BAR, current value: 9223372036854775807, initial value: 9223372036854775807, increment: 2147483647
Statement failed, SQLSTATE = HY000
exception 6
-EXC_FOO
-Houston we have a problem: next sequence value is -9223372034707292162

Commits: 466a19a 3e9d5db FirebirdSQL/fbt-repository@c5f912e FirebirdSQL/fbt-repository@8974ecd

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

This should be fixed now, please test with a fresh build.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Seems that still does not work.
I've update sources at revision 61821, than build FB on Linux and done (on SS - may be it's matter):

$ /opt/fb30ss/bin/isql localhost/3333:e30
Database: localhost/3333:e30
SQL> create or alter user u1 password '1';
SQL> recreate exception exc_foo 'Houston we have a problem: next sequence value is @1';
SQL> recreate sequence gen_bar start with 9223372036854775807 increment by 2147483647;
SQL> commit;
SQL>
SQL> grant usage on exception exc_foo to u1; ----------------------- [ 1 ]
SQL> grant usage on sequence gen_bar to u1;
SQL> commit;
SQL> show grants;

Output:

/* Grant permissions for this database */
GRANT USAGE ON SEQUENCE GEN_BAR TO USER U1

SQL> show version;
ISQL Version: LI-T3.0.0.31881 Firebird 3.0 Beta 2
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.31881 Firebird 3.0 Beta 2"
Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.31881 Firebird 3.0 Beta 2/tcp (oel64)/P13"
Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.31881 Firebird 3.0 Beta 2/tcp (oel64)/P13"
on disk structure version 12.0
SQL>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Fixed now (finally).

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

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

2 participants