30.07.2015 19:01, Adriano dos Santos Fernandes пишет:
> Hi!
>
> I purposely put a MODIFY of system tables in epp file without
> considering dbb->readOnly() flag.
>
> And it worked (changed the database) and committed the change.
>
> Shouldn't that be prevent in lower layers?
>
> Then I chmod -w the database. Then it fails at commit time with:
>
> Statement failed, SQLSTATE = 08001
> I/O error during "write" operation for file
> "/home/asfernandes/fb/dev/trunk.git/z.fdb"
> -Error while trying to write to file
> -Bad file descriptor

   It prevents at lower (PIO) layer :)

   To be serious, it also prevents on TRA layer - when you start transaction
at read-only database, engine adds TRA_readonly flag to it. But you run
MODIFY in system transaction and bypass this barrier.

   BTW, it seems we could add more safety moving check for system tx after
check for read-only DB in RLCK_reserve_relation

Regards,
Vlad



------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to