On 30/07/2015 13:22, Vlad Khorsun wrote: > 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 > > My real change is about a MODIFY (of course, inside a FOR) that would be run only when !readOnly. It will speed things up, which now uses two FORs which a MODIFY only in the second (the one that runs only when !readOnly).
So, I'd like a solution which allow this. Adriano ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
