After deleting tables, we observe residues in the RDB$USER_PRIVILEGES and RDB$SECURITY_CLASSES tables, which leads to an increase in the database with frequent creation and deletion of external tables. Played on Firebird 3-4-5.
After deleting tables, we observe residues in the RDB$USER_PRIVILEGES and RDB$SECURITY_CLASSES tables, which leads to an increase in the database with frequent creation and deletion of external tables. Played on Firebird 3-4-5.
Examples:
- Check service tables before creating tables
select count(*) from RDB$RELATIONS 54
select count(*) from RDB$USER_PRIVILEGES 729
select count(*) from RDB$SECURITY_CLASSES 517
-
Create two tables CREATE TABLE TABLE_01 (Q INTEGER) CREATE TABLE TABLE_02 (Q INTEGER)
-
Check the service tables after creating the tables
select count(*) from RDB$RELATIONS 56
select count(*) from RDB$USER_PRIVILEGES 741
select count(*) from RDB$SECURITY_CLASSES 523
-
Drop tables TABLE_01 and TABLE_02 drop table TABLE_01 drop table TABLE_02
-
Check service tables after deleting tables select count(*) from RDB$RELATIONS 54
select count(*) from RDB$USER_PRIVILEGES 731
select count(*) from RDB$SECURITY_CLASSES 521
Firebird 4.0.4.3010 external tables
- Check service tables before creating tables
select count(*) from RDB$RELATIONS 54
select count(*) from RDB$USER_PRIVILEGES 727
select count(*) from RDB$SECURITY_CLASSES 513
-
Create two external tables CREATE TABLE TABLE_EXT_01 EXTERNAL 'C:\dbase\TABLE_EXT_01.txt' (Q INTEGER); CREATE TABLE TABLE_EXT_02 EXTERNAL 'C:\dbase\TABLE_EXT_02.txt' (Q INTEGER);
-
Check the service tables after creating the tables
select count(*) from RDB$RELATIONS 56
select count(*) from RDB$USER_PRIVILEGES 739
select count(*) from RDB$SECURITY_CLASSES 519
-
Drop tables TABLE_EXT_01 and TABLE_EXT_02 drop table TABLE_EXT_01 drop table TABLE_EXT_02
-
Check service tables after deleting tables select count(*) from RDB$RELATIONS 54
select count(*) from RDB$USER_PRIVILEGES 729
select count(*) from RDB$SECURITY_CLASSES 517
FB 5
- Check service tables before creating tables
select count(*) from RDB$RELATIONS 56
select count(*) from RDB$USER_PRIVILEGES 1142
select count(*) from RDB$SECURITY_CLASSES 523
-
Create two tables CREATE TABLE TABLE_01 (Q INTEGER) CREATE TABLE TABLE_02 (Q INTEGER)
-
Check the service tables after creating the tables
select count(*) from RDB$RELATIONS 58
select count(*) from RDB$USER_PRIVILEGES 1154
select count(*) from RDB$SECURITY_CLASSES 529
-
Drop tables TABLE_01 and TABLE_02 drop table TABLE_01 drop table TABLE_02
-
Check service tables after deleting tables select count(*) from RDB$RELATIONS 56
select count(*) from RDB$USER_PRIVILEGES 1144
select count(*) from RDB$SECURITY_CLASSES 527
shows "dead" privileges on domains
SELECT * FROM RDB$USER_PRIVILEGES P WHERE P.RDB$PRIVILEGE = 'G' AND P.RDB$OBJECT_TYPE = 9 AND NOT EXISTS(SELECT * FROM RDB$FIELDS F WHERE F.RDB$FIELD_NAME = P.RDB$RELATION_NAME)
RDB$USER RDB$GRANTOR RDB$PRIVILEGE RDB$GRANT_OPTION RDB$RELATION_NAME RDB$FIELD_NAME RDB$USER_TYPE RDB$OBJECT_TYPE SYSDBA SYSDBA G 1 RDB$1 8 9 SYSDBA SYSDBA G 1 RDB$2 8 9