20.02.2018 14:23, Rashid Abzalov wrote:

The background of this task in CORE-5612, it contains research details and 
conclusions.

How much I understood, there is no way to specify what index should be used at 
system inquiries from *.epp files?

  I have the same understanding

If not, is it possible to enable the create/delete, enable/disable indexes on 
system tables, including standard system indexes?
I would try to implement this if the approach is approved.

  I have no objection to allow to create\alter\drop\set_stats for user index on
system tables. Note, such indices will not be put into gbak backup and should be
re-created after restore. Of course, it also could be improved, if necessary.

In Firebird 2.5, we get around the problem described in CORE-5612 by creating 2 indexes and turning off the indices RDB$INDEX_27 and RDB$INDEX_28 at the right time (then turn it back on).

But we can not act in the same way in Firebird 3.0 because these actions are only allowed by GBACK (attachment->isGbak) and only during the creation of the database (attachment->att_flags & ATT_creator).

Those if you do not want to allow such actions publicly, you could be allowed to do it from external utilities similar to GBACK (dpb.insertString(isc_dpb_gbak_attach, FB_VERSION, fb_strlen(FB_VERSION))), but then need to remove the check for the creator of database (attachment->att_flags & ATT_creator).

  I could be wrong, but: to make it properly, one should look as 
SCL_check_relation(..., SCL_control)
calls at VIO_erase\VIO_modify\VIO_store near the "case rel_indices" and pass 
"false" into last parameter
(protectSys) for user indices. The same should be done at checkPermission() 
method of CreateIndexNode,
AlterIndexNode, DropIndexNode, and SetStatisticsNode classes.

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