10.04.2018 21:51, Rashid Abzalov wrote:
The implemented feature allows changing user indexes to any users.

  It allows to change user indices by the OWNERS and users with ALTER TABLE
privilege granted, see below:

fb30\temp\x64\debug\firebird>isql s:\Temp\A.30.FDB
Database: s:\Temp\A.30.FDB, User: SYSDBA
SQL> show users;
Users in the database
  1 #SYSDBA                              0  VLAD
SQL>
SQL> create index idx1 on rdb$dependencies(RDB$DEPENDENT_NAME);
SQL> exit;

fb30\temp\x64\debug\firebird>isql s:\Temp\A.30.FDB -user vlad
Database: s:\Temp\A.30.FDB, User: VLAD
SQL> create index idx1 on rdb$dependencies(RDB$DEPENDENT_NAME);
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-CREATE INDEX IDX1 failed
-no permission for ALTER access to TABLE RDB$DEPENDENCIES
SQL> drop index idx1;
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-DROP INDEX IDX1 failed
-no permission for ALTER access to TABLE RDB$DEPENDENCIES
SQL> exit;

fb30\temp\x64\debug\firebird>isql s:\Temp\A.30.FDB
Database: s:\Temp\A.30.FDB, User: SYSDBA
SQL> grant alter any table to user vlad;
SQL> exit;

F:\FB2\fb30\temp\x64\debug\firebird>isql s:\Temp\A.30.FDB -user vlad
Database: s:\Temp\A.30.FDB, User: VLAD
SQL> create index idx1 on rdb$dependencies(RDB$DEPENDENT_NAME);
Statement failed, SQLSTATE = 42S11
unsuccessful metadata update
-CREATE INDEX IDX1 failed
-Index IDX1 already exists
SQL> drop index idx1;
SQL> exit;


Regards,
Vlad

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to