Hello, All.

   Compile DbCrypt example and put "Auto=y" into its config. Then connect to a 
database 
big enough (don't forget to make a backup beforehand) and execute following 
script:

set autoddl off;
alter database decrypt encrypt with dbcrypt_example;
commit;
commit;
rollback;

   Guess what state the database is now. Check yourself with "gstat -e".
   Restore database from backup.
   Continue with following script:

set autoddl off;
alter database encrypt with dbcrypt_example;
alter database encrypt with nope;
commit;
rollback;

   Exit isql and connect again. Check the state with "gstat -e" again.
   Restore the backup.
   Continue with following script:

set autoddl off;
alter database encrypt with nope;
alter database encrypt with dbcrypt_example;
commit;
rollback;

   Exit and connect again. Look at "gstat -e".

   Have a fun?

   I think that AlterDatabaseNode::execute() have to perform all checks and 
leave only 
real encryption to dfw.
   I also think that ALTER DATABASE should require exclusive access to the 
database 
because in parallel connections it can be even funnier.

-- 
   WBR, SD.

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

Reply via email to