boolean_t cli_disallow_mupip_set(void) { int disallow_return_value = 0; boolean_t p1, p2, p3; *cli_err_str_ptr = 0; p1 = d_c_cli_present("FILE"); p2 = d_c_cli_present("REGION"); p3 = d_c_cli_present("JNLFILE"); /* any MUPIP SET command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any MUPIP SET command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("JOURNAL.ON") && d_c_cli_present("JOURNAL.OFF")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("JOURNAL.DISABLE") && (d_c_cli_present("JOURNAL.ON") || d_c_cli_present("JOURNAL.OFF") || d_c_cli_present("JOURNAL.ENABLE") || d_c_cli_present("JOURNAL.BEFORE_IMAGES") || d_c_cli_negated("JOURNAL.BEFORE_IMAGES") || d_c_cli_present("JOURNAL.FILENAME") || d_c_cli_present("JOURNAL.ALLOCATION") || d_c_cli_present("JOURNAL.EXTENSION") || d_c_cli_present("JOURNAL.BUFFER_SIZE") || d_c_cli_present("JOURNAL.ALIGNSIZE") || d_c_cli_present("JOURNAL.EPOCH_INTERVAL") || d_c_cli_present("JOURNAL.AUTOSWITCHLIMIT"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!(!d_c_cli_present("JOURNAL") || d_c_cli_present("DISABLE") || d_c_cli_present("OFF") || d_c_cli_present("JOURNAL.BEFORE_IMAGES") || d_c_cli_negated("JOURNAL.BEFORE_IMAGES"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REPLICATION.ON") && d_c_cli_present("REPLICATION.OFF")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REPLICATION.ON") && (d_c_cli_present("JOURNAL.OFF") || d_c_cli_present("JOURNAL.DISABLE") || d_c_cli_negated("JOURNAL"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("PREVJNLFILE") && !(d_c_cli_present("JNLFILE"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("VERSION") && (d_c_cli_present("ACCESS_METHOD") || d_c_cli_present("GLOBAL_BUFFERS") || d_c_cli_present("RESERVED_BYTES") || d_c_cli_present("FLUSH_TIME") || d_c_cli_present("LOCK_SPACE") || d_c_cli_present("DEFER_TIME") || d_c_cli_present("WAIT_DISK") || d_c_cli_present("PARTIAL_RECOV_BYPASS"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("INST_FREEZE_ON_ERROR") && p3); CLI_DIS_CHECK_N_RESET; p1 = d_c_cli_present("KEY_SIZE"); p2 = d_c_cli_present("RECORD_SIZE"); p3 = d_c_cli_present("RESERVED_BYTES"); disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_reorg(void) { int disallow_return_value = 0; *cli_err_str_ptr = 0; disallow_return_value = (d_c_cli_present("SELECT") || d_c_cli_present("EXCLUDE") || d_c_cli_present("FILL_FACTOR") || d_c_cli_present("INDEX_FILL_FACTOR") || d_c_cli_present("RESUME") || d_c_cli_present("USER_DEFINED_REORG") || d_c_cli_present("TRUNCATE")) && (d_c_cli_present("UPGRADE") || d_c_cli_present("DOWNGRADE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("UPGRADE") && d_c_cli_present("DOWNGRADE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("UPGRADE") || d_c_cli_present("DOWNGRADE")) && !d_c_cli_present("REGION"); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("SAFEJNL") || d_c_cli_negated("SAFEJNL") || d_c_cli_present("STARTBLK") || d_c_cli_present("STOPBLK")) && !(d_c_cli_present("UPGRADE") || d_c_cli_present("DOWNGRADE")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_cache(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; p1 = d_c_cli_present("CHANGE"); p2 = d_c_cli_present("RECOVER"); p3 = d_c_cli_present("SHOW"); p4 = d_c_cli_present("VERIFY"); /* any DSE CACHE command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3 || p4); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any DSE CACHE command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ALL") && d_c_cli_present("CHANGE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("SHOW")) && (d_c_cli_present("OFFSET") || d_c_cli_present("SIZE") || d_c_cli_present("VALUE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SHOW") && d_c_cli_present("VALUE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHANGE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("OFFSET") && !d_c_cli_present("SIZE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SIZE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("VALUE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_negated("CRIT") && (d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_cache(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("SHOW") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; p1 = d_c_cli_present("CHANGE"); p2 = d_c_cli_present("RECOVER"); p3 = d_c_cli_present("SHOW"); p4 = d_c_cli_present("VERIFY"); disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ALL") && d_c_cli_present("CHANGE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("SHOW")) && (d_c_cli_present("OFFSET") || d_c_cli_present("SIZE") || d_c_cli_present("VALUE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SHOW") && d_c_cli_present("VALUE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHANGE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("OFFSET") && !d_c_cli_present("SIZE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SIZE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("VALUE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_negated("CRIT") && (d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_backup(void) { int disallow_return_value = 0; *cli_err_str_ptr = 0; disallow_return_value = (d_c_cli_present("TRANSACTION") || d_c_cli_present("SINCE")) && !(d_c_cli_present("INCREMENTAL") || d_c_cli_present("BYTESTREAM")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("INCREMENTAL") || d_c_cli_present("BYTESTREAM")) && (d_c_cli_present("COMPREHENSIVE") || d_c_cli_present("DATABASE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("TRANSACTION") && d_c_cli_present("SINCE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("BKUPDBJNL.DISABLE") && d_c_cli_present("BKUPDBJNL.OFF"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("REPLICATION.OFF"); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REPLICATION.ON") && d_c_cli_negated("NEWJNLFILES")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_replic_editinst(void) { int disallow_return_value = 0; *cli_err_str_ptr = 0; /* any MUPIP REPLIC -EDITINSTANCE command should contain one of CHANGE or SHOW or NAME or QDBRUNDOWN */ disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("SHOW") || d_c_cli_present("NAME") || (d_c_cli_present("QDBRUNDOWN") || d_c_cli_negated("QDBRUNDOWN"))); CLI_DIS_CHECK_N_RESET; /* CHANGE and SHOW are mutually exclusive */ disallow_return_value = (d_c_cli_present("CHANGE") && d_c_cli_present("SHOW")); CLI_DIS_CHECK_N_RESET; /* CHANGE and NAME are mutually exclusive */ disallow_return_value = (d_c_cli_present("CHANGE") && d_c_cli_present("NAME")); CLI_DIS_CHECK_N_RESET; /* CHANGE and QDBRUNDOWN are mutually exclusive */ disallow_return_value = (d_c_cli_present("CHANGE") && (d_c_cli_present("QDBRUNDOWN") || d_c_cli_negated("QDBRUNDOWN"))); CLI_DIS_CHECK_N_RESET; /* SHOW and NAME are mutually exclusive */ disallow_return_value = (d_c_cli_present("SHOW") && d_c_cli_present("NAME")); CLI_DIS_CHECK_N_RESET; /* SHOW and QDBRUNDOWN are mutually exclusive */ disallow_return_value = (d_c_cli_present("SHOW") && (d_c_cli_present("QDBRUNDOWN") || d_c_cli_negated("QDBRUNDOWN"))); CLI_DIS_CHECK_N_RESET; /* OFFSET, SIZE and VALUE is compatible only with CHANGE */ disallow_return_value = (!d_c_cli_present("CHANGE") && (d_c_cli_present("OFFSET") || d_c_cli_present("SIZE") || d_c_cli_present("VALUE"))); CLI_DIS_CHECK_N_RESET; /* OFFSET and SIZE have to be present when CHANGE is specified */ disallow_return_value = (d_c_cli_present("CHANGE") && (!d_c_cli_present("OFFSET") || !d_c_cli_present("SIZE"))); CLI_DIS_CHECK_N_RESET; /* DETAIL is compatible only with SHOW */ disallow_return_value = (!d_c_cli_present("SHOW") && d_c_cli_present("DETAIL")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_journal(void) { int disallow_return_value = 0; *cli_err_str_ptr = 0; disallow_return_value = !(d_c_cli_present("RECOVER") || d_c_cli_present("VERIFY") || d_c_cli_present("SHOW") || d_c_cli_present("EXTRACT") || d_c_cli_present("ROLLBACK")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("RECOVER") && d_c_cli_present("ROLLBACK"); CLI_DIS_CHECK_N_RESET; disallow_return_value = !(d_c_cli_present("FORWARD") || d_c_cli_present("BACKWARD")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("FORWARD") && d_c_cli_present("BACKWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SINCE") && d_c_cli_present("FORWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("LOOKBACK_LIMIT") && d_c_cli_present("FORWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("REDIRECT") && !d_c_cli_present("RECOVER"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHECKTN") && d_c_cli_present("BACKWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("RESYNC") && d_c_cli_present("FETCHRESYNC"); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("RESYNC") || d_c_cli_present("FETCHRESYNC")) && !d_c_cli_present("ROLLBACK"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("RSYNC_STRM") && !d_c_cli_present("RESYNC"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("LOSTTRANS") && !(d_c_cli_present("RECOVER") || d_c_cli_present("ROLLBACK") || d_c_cli_present("EXTRACT")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("BROKENTRANS") && !(d_c_cli_present("RECOVER") || d_c_cli_present("ROLLBACK") || d_c_cli_present("EXTRACT")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("FORWARD") && d_c_cli_present("ROLLBACK"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("FULL") && (d_c_cli_present("RECOVER") || d_c_cli_present("ROLLBACK")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("DETAIL") && !d_c_cli_present("EXTRACT"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("AFTER") && !d_c_cli_present("FORWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("AFTER") && (d_c_cli_present("RECOVER") || d_c_cli_present("ROLLBACK")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SINCE") && !d_c_cli_present("BACKWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("LOOKBACK_LIMIT") && !d_c_cli_present("BACKWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("LOOKBACK_LIMIT") && !(d_c_cli_present("VERIFY") || d_c_cli_present("RECOVER") || d_c_cli_present("EXTRACT") || d_c_cli_present("SHOW")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("APPLY_AFTER_IMAGE") && !(d_c_cli_present("ROLLBACK") || d_c_cli_present("RECOVER")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("REDIRECT") && !d_c_cli_present("RECOVER"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("REDIRECT") && !d_c_cli_present("FORWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("BACKWARD") && d_c_cli_negated("CHAIN"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHECKTN") && d_c_cli_present("BACKWARD"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ROLLBACK") && (d_c_cli_present("AFTER") || d_c_cli_present("BEFORE") || d_c_cli_present("SINCE") || d_c_cli_present("LOOKBACK_LIMIT")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("GLOBAL") || d_c_cli_present("USER") || d_c_cli_present("ID") || d_c_cli_present("TRANSACTION")) && (d_c_cli_present("RECOVER") || d_c_cli_present("ROLLBACK") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("ONLINE") && !d_c_cli_present("ROLLBACK")); CLI_DIS_CHECK_N_RESET; return FALSE; }