Add DDL tests for ALLPROC permission and fix a bug in Permission.