You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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>
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
The text was updated successfully, but these errors were encountered: