/*{ ** Name: opx_rerror - this routine will report an optimizer error ** ** Description: ** This routine will log an optimizer error. ** ** Inputs: ** opfcb ptr to caller's control block ** error optimizer error code to log ** ** Outputs: ** Returns: ** VOID ** Exceptions: ** none ** ** Side Effects: ** none ** ** History: ** 3-jul-86 (seputis) ** initial creation ** 21-may-89 (jrb) ** now passes generic error to opx_sccerror ** 24-oct-92 (andre) ** interfaces of ule_format() and opx_sccerror() have been changed to ** receive (DB_SQLSTATE *) ** 24-june-03 (inkdo01) ** Add OP04C0 to list for which error is NOT returned to user. ** 22-june-06 (dougi) ** Make E_OP0018 (timeoutabort) go to log where the query text also ** gets dumped. ** 24-jun-08 (hayke02) ** Treat E_OP04C1 like E_OP04C0: soft failure, error reported to ** errlog.log and retry using non-greedy enumeration, unless op247 is ** set. [@history_line@]... */ VOID opx_rerror( OPF_CB *opfcb, OPX_ERROR error) { DB_STATUS ule_status; /* return status from ule_format */ i4 ule_error; /* ule cannot format message */ char msg_buffer[DB_ERR_SIZE]; /* error message buffer */ i4 msg_buf_length; /* length of message returned */ i4 log; /* should this error be logged */ DB_SQLSTATE sqlstate; bool enumnomsg = FALSE; opfcb->opf_errorblock.err_code = error; /* save error code */ if ((error % 256) < 128 && error != E_OP0018_TIMEOUTABORT) log = ULE_LOOKUP; else log = ULE_LOG; ule_status = ule_format( error, (CL_SYS_ERR *)NULL, log, &sqlstate, msg_buffer, (i4) (sizeof(msg_buffer)-1), &msg_buf_length, &ule_error, 0); if (ule_status != E_DB_OK) { (VOID)STprintf(msg_buffer, "ULE error = %x, Optimizer message cannot be found - error no. = %x\n", ule_error, error ); } else msg_buffer[msg_buf_length] = 0; /* null terminate */ if ((error == E_OP04C0_NEWENUMFAILURE) || (error == E_OP04C1_GREEDYCONSISTENCY)) { OPS_CB *opscb; OPS_STATE *global; i4 temp; /* Check if new enumeration is result of tp op247 - if not, ** message isn't displayed. */ opscb = ops_getcb(); global = opscb->ops_state; if (!global->ops_cb->ops_check || !opt_svtrace( global->ops_cb, OPT_F119_NEWENUM, &temp, &temp)) enumnomsg = TRUE; } if (error != E_OP0003_ASYNCABORT && !enumnomsg) /* do not report control C errors ** or "new enumeration" errors ** to the user */ { (VOID) opx_sccerror(E_DB_ERROR, &sqlstate, error, msg_buffer, (i4)msg_buf_length); } }
/*{ ** Name: opx_error - this routine will report an optimizer error ** ** Description: ** This routine will report a E_DB_ERROR optimizer error. The routine ** will not return but instead generate an internal exception and ** exit via the exception handling mechanism. The error code will be ** placed directly in the user's calling control block. A ptr to this ** block was placed in the session control block (which can be requested ** from SCF) ** ** Inputs: ** error optimizer error code to report ** ** Outputs: ** Returns: ** - routine does not return ** Exceptions: ** - internal exception generated ** ** Side Effects: ** the exception handling routines are responsible for ** deallocating OPF resources bound to this session. ** ** History: ** 3-jul-86 (seputis) ** initial creation [@history_line@]... */ VOID opx_error( OPX_ERROR error) { OPS_CB *opscb; /* ptr to session control block ** for this optimization */ opscb = ops_getcb(); opscb->ops_retstatus = E_DB_ERROR; /* return status code */ opx_rerror( opscb->ops_callercb, error); /* log error */ EXsignal( (EX)EX_JNP_LJMP, (i4)1, (long)error);/* signal an optimizer long ** jump */ }
/*{ ** Name: opx_exception - handle unknown exception for optimizer ** ** Description: ** This routine will handle unknown exceptions for the optimizer ** ** Inputs: ** ex_args argument list from exception handler ** ** Outputs: ** Returns: ** STATUS - appropriate CL return code for exception handler ** Exceptions: ** ** ** Side Effects: ** ** ** History: ** 20-jan-87 (seputis) ** initial creation ** 7-nov-88 (seputis) ** use EXsys_report ** 26-jun-91 (seputis) ** added check for OPC access violations ** 11-mar-92 (rog) ** Use EXsys_report for everything, not just EXSEGVIO. Call ** scs_avformat to dump info about the offending session. Remove ** underscores from EX return statuses. ** 02-jul-1993 (rog) ** Call ulx_exception() to handle all of the reporting duties. ** OPF should need to call adx_handler, so remove call to ** opx_adfexception(). [@history_line@]... [@history_template@]... */ STATUS opx_exception( EX_ARGS *args) { /* unexpected exception so record the error and return to ** deallocate resources */ OPS_CB *opscb; /* session control block */ OPF_CB *opfcb; /* caller's control block */ OPX_ERROR errorcode; /* error code for exception */ opscb = ops_getcb(); /* get optimizer session control block */ opfcb = opscb->ops_state->ops_caller_cb; /* report unexpected exception ** otherwise */ if (opfcb->opf_errorblock.err_code == E_OP0082_UNEXPECTED_EX) { /* try to check for exception within an exception as soon as possible */ errorcode = E_OP0083_UNEXPECTED_EXEX; /* second exception ** occurred so do not deallocate ** any resources */ opscb->ops_retstatus = E_DB_SEVERE; /* make sure an high enough priority ** error is reported */ } else { if (opscb->ops_state->ops_gmask & OPS_OPCEXCEPTION) errorcode = E_OP08A2_EXCEPTION; /* check for exception in ** OPC component of OPF */ else errorcode = E_OP0082_UNEXPECTED_EX; /* check for exception ** in non-OPC components of OPF */ } ulx_exception( args, DB_OPF_ID, E_OP0901_UNKNOWN_EXCEPTION, TRUE); if (opscb->ops_retstatus != E_DB_SEVERE && opscb->ops_retstatus != E_DB_FATAL) opscb->ops_retstatus = E_DB_ERROR; /* make sure an high enough priority ** error is reported */ opx_rerror(opscb->ops_state->ops_caller_cb, errorcode);/*log error*/ return (EXDECLARE); /* return to exception handler declaration pt */ }
/*{ ** Name: opx_vrecover - this routine return an error code without reporting ** ** Description: ** This routine will not log or report to the user this recoverable error ** to but instead exit to the caller who is expected to take corrective ** action. ** ** Inputs: ** error optimizer error code to report ** facility facility's error code ** status facility's return status ** ** Outputs: ** Returns: ** VOID ** Exceptions: ** - internal exception generated ** ** Side Effects: ** the exception handling routines are responsible for ** deallocating OPF resources bound to this session. ** ** History: ** 3-jul-86 (seputis) ** initial creation [@history_line@]... */ VOID opx_vrecover( DB_STATUS status, OPX_ERROR error, OPX_FACILITY facility) { OPS_CB *opscb; /* ptr to session control block ** for this optimization */ opscb = ops_getcb(); opscb->ops_retstatus = status; /* save status code */ opscb->ops_callercb->opf_errorblock.err_code = error; /* save error code */ opscb->ops_callercb->opf_errorblock.err_data = facility; /* save code ** from facility */ if (DB_SUCCESS_MACRO(status)) { return; /* return if error is not ** serious */ } EXsignal( (EX)EX_JNP_LJMP, (i4)1, (long)error); /* signal an optimizer long ** jump with error code */ }
/*{ ** Name: opx_2perror - print error with 2 parameters ** ** Description: ** Print error with exactly 2 parameters, do not use variable parameters to ** avoid lint errors ** ** Inputs: ** error error message number ** p1 parameter 1 ** p2 parameter 2 ** ** Outputs: ** ** Returns: ** VOID ** Exceptions: ** exits via exception handler ** ** Side Effects: ** does not return ** ** History: ** 18-may-92 (seputis) ** initial creation for tech support ** 24-oct-92 (andre) ** interfaces of ule_format() and opx_sccerror() have been changed to ** receive (DB_SQLSTATE *) [@history_template@]... */ VOID opx_2perror( OPX_ERROR error, PTR p1, PTR p2) { DB_STATUS ule_status; /* return status from ule_format */ i4 ule_error; /* ule cannot format message */ char msg_buffer[DB_ERR_SIZE]; /* error message buffer */ i4 msg_buf_length; /* length of message returned */ i4 log; /* should this error be logged */ DB_SQLSTATE sqlstate; OPS_CB *opscb; /* ptr to session control block ** for this optimization */ opscb = ops_getcb(); opscb->ops_retstatus = E_DB_ERROR; /* return status code */ opscb->ops_callercb->opf_errorblock.err_code = error; /* save error code */ if ((error % 256) < 128) log = ULE_LOOKUP; else log = ULE_LOG; ule_status = ule_format( error, (CL_SYS_ERR *)NULL, log, &sqlstate, msg_buffer, (i4) (sizeof(msg_buffer)-1), &msg_buf_length, &ule_error, 2 /* 2 parameters */, (i4)0, p1, (i4)0, p2); if (ule_status != E_DB_OK) { (VOID)STprintf(msg_buffer, "ULE error = %x, Optimizer message cannot be found - error no. = %x\n", ule_error, error ); } else msg_buffer[msg_buf_length] = 0; /* null terminate */ (VOID) opx_sccerror(E_DB_ERROR, &sqlstate, error, msg_buffer, (i4)msg_buf_length); EXsignal( (EX)EX_JNP_LJMP, (i4)1, (long)error);/* signal an optimizer long ** jump */ }
/*{ ** Name: opx_float - handle floating point exception in OPF ** ** Description: ** This routine will process a floating point exception error ** within the optimizer. This will normally be done by skipping ** the part of the search space which causes the floating point ** exception. ** ** Inputs: ** error floating point error code ** hard TRUE - if HARD error occurs ** which cannot be continued from ** ** Outputs: ** ** Returns: ** VOID ** Exceptions: ** none ** ** Side Effects: ** none ** ** History: ** 28-nov-90 (seputis) ** initial creation ** 21-jan-91 (jkb) submitted for seputis ** correct potential UNIX floating point problem ** 18-apr-91 (seputis) ** - fix bug 36920 ** 31-mar-92 (rog) ** Remove underscores from EX return statuses. [@history_template@]... */ STATUS opx_float( OPX_ERROR error, bool hard) { OPS_CB *opscb; /* session control block */ OPF_CB *opfcb; /* caller's control block */ opscb = ops_getcb(); /* get optimizer session control block */ opfcb = opscb->ops_state->ops_caller_cb; /* report unexpected exception ** otherwise */ if (opscb->ops_check && opt_strace( opscb, OPT_F048_FLOAT) && !hard && (opscb->ops_state->ops_gmask & OPS_BFPEXCEPTION) ) { opscb->ops_state->ops_gmask |= OPS_FPEXCEPTION; /* mark ** plan as having a floating point ** exception */ return(EXCONTINUES); /* try to recover from floating point ** exception unless a hard error occurs ** or a plan has been found which did ** not have a floating point exception */ } if (DB_SUCCESS_MACRO(opscb->ops_retstatus)) { opfcb->opf_errorblock.err_code = error; /* save error code */ opscb->ops_retstatus = E_DB_WARN; /* change status only if more ** severe */ } opscb->ops_state->ops_gmask |= (OPS_FLSPACE | OPS_FLINT); /* indicate that ** search space has been reduced */ return(EXDECLARE); }
/*{ ** Name: opx_verror - this routine will report another facility's error ** ** Description: ** This routine will report an error from another facility ** optimizer error. It will check the status and see the error ** is recoverable. The routine will not return if the status is fatal ** but instead generate an internal exception and ** exit via the exception handling mechanism. The error code will be ** placed directly in the user's calling control block. A ptr to this ** block was placed in the session control block (which can be requested ** from SCF) ** ** Inputs: ** error optimizer error code to report ** facility facility's error code ** status facility's return status ** ** Outputs: ** Returns: ** VOID ** Exceptions: ** - internal exception generated ** ** Side Effects: ** the exception handling routines are responsible for ** deallocating OPF resources bound to this session. ** ** History: ** 3-jul-86 (seputis) ** initial creation ** 28-jan-91 (seputis) ** added support for OPF ACTIVE flag ** 30-apr-92 (bryanp) ** Translate E_RD002A_DEADLOCK to E_OP0010_RDF_DEADLOCK. [@history_line@]... */ VOID opx_verror( DB_STATUS status, OPX_ERROR error, OPX_FACILITY facility) { OPS_CB *opscb; /* ptr to session control block ** for this optimization */ opscb = ops_getcb(); opscb->ops_retstatus = status; /* save status code */ if (facility == E_RD002A_DEADLOCK) error = E_OP0010_RDF_DEADLOCK; if ((facility == E_RD002B_LOCK_TIMER_EXPIRED) && (opscb->ops_smask & OPS_MCONDITION)) { error = E_OP000D_RETRY; /* when an attempt is made to ** report the RDF timeout error ** then it should be translated ** into a retry error, since an ** undetected deadlock may have ** occurred due to the ACTIVE flag */ opscb->ops_server->opg_sretry++; /* track number of retrys */ opx_vrecover(status, E_OP000D_RETRY, facility); /* this routine will not ** return */ } else opx_rverror(opscb->ops_callercb, status, error, facility); if (DB_SUCCESS_MACRO(status)) { return; /* return if error is not ** serious */ } EXsignal( (EX)EX_JNP_LJMP, (i4)1, (long)error); /* signal an optimizer long ** jump with error code */ }
/*{ ** Name: opx_rverror - this routine will report another facility's error ** ** Description: ** This routine will log an error from another facility and the related ** optimizer error. ** ** Inputs: ** opfcb ptr to another facility's control block ** error optimizer error code to report ** facility ptr to facility's control block ** ** Outputs: ** Returns: ** VOID ** Exceptions: ** - internal exception generated ** ** Side Effects: ** the exception handling routines are responsible for ** deallocating OPF resources bound to this session. ** ** History: ** 3-jul-86 (seputis) ** initial creation ** 21-may-89 (jrb) ** now passes generic_error to opx_sccerror routine ** 24-oct-92 (andre) ** interfaces of ule_format() and opx_sccerror() have been changed to ** receive (DB_SQLSTATE *) ** 24-Oct-2008 (jonj) ** Replace ule_doformat with ule_format. [@history_line@]... */ VOID opx_rverror( OPF_CB *opfcb, DB_STATUS status, OPX_ERROR error, OPX_FACILITY facility) { DB_STATUS ule_status; /* return status from ule_format */ i4 ule_error; /* ule cannot format message */ char msg_buffer[DB_ERR_SIZE]; /* error message buffer */ i4 msg_buf_length; /* length of message returned */ i4 log; /* logging state */ DB_SQLSTATE sqlstate; opfcb->opf_errorblock.err_code = error; /* save error code */ opfcb->opf_errorblock.err_data = facility; /* save code ** from facility */ if ((error % 256) < 128) log = ULE_LOOKUP; /* lookup only user errors with range ** of 0-127 */ else log = ULE_LOG; /* log errors with range 128-255 */ #ifdef OPT_F031_WARNINGS /* if trace flag is set then warning or info errors will be reported */ if ( DB_SUCCESS_MACRO(status)) { OPS_CB *ops_cb; ops_cb = ops_getcb(); if (ops_cb && ( !ops_cb->ops_check || !opt_strace( ops_cb, OPT_F031_WARNINGS) )) return; } #endif ule_status = ule_format( error, (CL_SYS_ERR *)NULL, log, &sqlstate, msg_buffer, (i4) (sizeof(msg_buffer)-1), &msg_buf_length, &ule_error, 0); if (ule_status != E_DB_OK) { (VOID)STprintf(msg_buffer, "ULE error = %x\nOptimizer cannot be found - error no = %x Status = %x Facility error = %x \n", ule_error, error , status, facility); } else msg_buffer[msg_buf_length] = 0; /* null terminate */ /* FIXME - should check possible return status and generate a severe error ** unless it is simple (like cannot find message) */ { /* report any errors in the range 0 to 127 to the user */ DB_STATUS scf_status; if (facility) scf_status = opx_sccerror(E_DB_WARN, &sqlstate, error, msg_buffer,(i4)msg_buf_length); /* generate ** a warning, so that SCC_TRACE is ** used, this will ensure that ** SCC_ERROR will be called with ** the "facility" error code which ** will be the ingres user code ** which will be returned to the ** equel program */ else scf_status = opx_sccerror(status, &sqlstate, error, msg_buffer, (i4)msg_buf_length); if (scf_status != E_DB_OK) { TRdisplay( "Optimizer error = %x Status = %x Facility error = %x \n", error , status, facility); } } if (!facility) return; /* if facility error exists then ** report it in the same way */ ule_status = ule_format( facility, (CL_SYS_ERR *)NULL, log, &sqlstate, msg_buffer, (i4) (sizeof(msg_buffer)-1), &msg_buf_length, &ule_error, 0); if (ule_status != E_DB_OK) { (VOID)STprintf(msg_buffer, "ULE error = %x\nOptimizer error = %x Status = %x Facility error cannot be found - error no = %x \n", ule_error, error , status, facility); } else msg_buffer[msg_buf_length] = 0; /* null terminate */ { DB_STATUS scf1_status; scf1_status = opx_sccerror(status, &sqlstate, facility, msg_buffer, (i4)msg_buf_length); if (scf1_status != E_DB_OK) { TRdisplay( "Optimizer error = %x Status = %x Facility error = %x \n", error , status, facility); } } }
DB_STATUS opt_call( DB_DEBUG_CB *debug_cb) { i4 flag; /* Trace flag to be affected */ i4 firstval; /* first value of trace control ** block */ i4 secondval; /* second value of trace control ** block */ OPS_CB *ops_cb; /* ptr to session control block */ /* FIXME - need to establish an exception handler here */ ops_cb = ops_getcb(); /* get session control block from ** SCF */ /* Flags 0 - OPT_GMAX-1 are for the server; all others are for sessions */ flag = debug_cb->db_trace_point; if (flag < 0) return (E_DB_ERROR); /* There can be UP TO two values, but maybe they weren't given */ if (debug_cb->db_value_count > 0) firstval = debug_cb->db_vals[0]; else firstval = 0L; if (debug_cb->db_value_count > 1) secondval = debug_cb->db_vals[1]; else secondval = 0L; if (flag < OPT_GMAX) { /* a server trace flag is found */ switch (flag) { /* check that a valid global trace flag is being affected */ case OPT_F038_FAKE_GATEWAY: { /* set some flags to change OPF to gateway */ ops_cb->ops_server->opg_qeftype = OPF_GQEF; /* make this a gateway QEF */ ops_cb->ops_server->opg_smask = OPF_TIDDUPS | OPF_TIDUPDATES | OPF_INDEXSUB; } case OPT_GSTARTUP: case OPT_F004_FLATTEN: case OPT_F005_PARSER: break; default: return( E_DB_ERROR ); /* return if not a valid flag */ } /* ** Three possible actions: Turn on flag, turn it off, or do nothing. */ switch (debug_cb->db_trswitch) { case DB_TR_ON: ult_set_macro(&ops_cb->ops_server->opg_tt, flag, firstval, secondval); ops_cb->ops_server->opg_check = TRUE; /* indicates that at least one ** trace flag has been set ** - this probably could be made ** into a counter */ break; case DB_TR_OFF: ult_clear_macro(&ops_cb->ops_server->opg_tt, flag); break; case DB_TR_NOCHANGE: break; default: return (E_DB_ERROR); } } else { /* a session level trace flag will be set */ flag = flag - OPT_GMAX; /* get proper offset for session ** trace buffer */ switch (flag) { case OPT_F002_SKIPCONSISTENCY: { switch (debug_cb->db_trswitch) { case DB_TR_ON: ops_cb->ops_skipcheck = TRUE; /* indicates non critical consistency ** checks should be skipped */ break; case DB_TR_OFF: ops_cb->ops_skipcheck = FALSE; /* resume consistency checks */ break; case DB_TR_NOCHANGE: break; default: return (E_DB_ERROR); } return(E_DB_OK); } case OPT_F001_DUMP_QTREE: case OPT_T129_NO_LOAD: case OPT_T131_NO_JOINPQUAL: case OPT_F004_FLATTEN: case OPT_F005_PARSER: case OPT_F006_NONOTEX: case OPT_AGSNAME: case OPT_AGSIMPLE: case OPT_AGSUB: case OPT_MAKAVAR: case OPT_AGCANDIDATE: case OPT_AGREPLACE: case OPT_PROJECTION: case OPT_TIMER: case OPT_F016_OPFSTATS: case OPT_FCOTREE: case OPT_F019_AGGCOMPAT: case OPT_F020_NOPRESORT: case OPT_F021_QPTREE: case OPT_F022_FULL_QP: case OPT_F023_NOCOMP: case OPT_F025_RANGETAB: case OPT_F026_FULL_OPKEY: case OPT_F027_FUSED_OPKEY: case OPT_F028_JOINOP: case OPT_F029_HISTMAP: case OPT_F030_SQLNAMES: case OPT_F031_WARNINGS: case OPT_F032_NOEXECUTE: case OPT_F033_OPF_TO_OPC: case OPT_F034_NEWFEATS: case OPT_F035_NO_HISTJOIN: case OPT_F036_OPC_DISTRIBUTED: case OPT_F037_STATISTICS: case OPT_F039_NO_KEYJOINS: #ifdef xDEBUG case OPT_F040_SQL_TEXT: #endif case OPT_F041_MULTI_SITE: case OPT_F042_PTREEDUMP: case OPT_F043_CONSTANTS: case OPT_F044_NO_RTREE: case OPT_F045_QENPROW: case OPT_F046_CONTROLC: case OPT_F048_FLOAT: case OPT_F049_KEYING: case OPT_F050_COMPLETE: case OPT_F051_QPDUMP: case OPT_F052_CARTPROD: case OPT_F053_FASTOPT: case OPT_F054_OLDCNF: case OPT_F055_NOCNF: case OPT_F056_NOSMARTDISK: case OPT_F057_WHYNOSMARTDISK: case OPT_F058_SD_CONJUNCT_TRACE: case OPT_F059_CARTPROD: case OPT_F060_QEP: case OPT_F061_CORRELATION: case OPT_F062_OLDJCARD: case OPT_F063_CORRELATION: case OPT_F064_NOKEY: case OPT_F065_8CHAR: case OPT_F066_GUESS: case OPT_F067_PQ: case OPT_F068_OLDFLATTEN: case OPT_F069_ALLPLANS: case OPT_F070_RIGHT: case OPT_F071_QEP_WITHOUT_COST: case OPT_F073_NODEFAULT: case OPT_F074_UVAGG: case OPT_F075_FLOATQEP: case 76: /* inkdo01 kludge */ case OPT_F077_STATS_NOSTATS_MAX: case OPT_F078_NO_STATS_NOSTATS_MAX: case OPT_F081_DUMPENUM: case OPT_F082_QEPDUMP: case OPT_F083_OLDIDXORDER: case OPT_F084_TBLAUTOSTRUCT: case OPT_F085_MISSINGSTATS: case OPT_F086_DUMP_QTREE2: case OPT_F087_ALLFRAGS: case OPT_F088_BESTPLANS: case OPT_F089_FORCE_HASHJOIN: case OPT_F090_FORCE_EXCHANGE: if (debug_cb->db_value_count > 0) return( E_DB_ERROR ); /* these flags have no values */ break; /* Flag is defined */ case OPT_F119_NEWENUM: if (debug_cb->db_value_count > 1) return( E_DB_ERROR ); /* this flag may have 0 or 1 value */ break; /* Flag is defined */ case OPT_F120_SORTCPU: if (debug_cb->db_value_count > 1) return( E_DB_ERROR ); /* this flag may have 0 or 1 value */ break; /* Flag is defined */ case OPT_F118_GREEDY_FACTOR: case OPT_F123_SCAN: case OPT_F124_BLOCKING: case OPT_F125_TIMEFACTOR: case OPT_F126_SITE_FACTOR: case OPT_F127_TIMEOUT: if ((debug_cb->db_value_count < 1) && (debug_cb->db_trswitch == DB_TR_ON) /* value only required ** if trace flag is to be ** turned on */ ) return (E_DB_ERROR); /* at least one value must be ** specified */ break; case OPT_F024_NOTIMEOUT: if (debug_cb->db_value_count > 0) return( E_DB_ERROR ); ops_cb->ops_alter.ops_timeout = FALSE; /* alternative way of ** changing no timeout flag for ** session */ return (E_DB_OK); case OPT_F072_LVCH_TO_VCH: if (debug_cb->db_value_count > 0) return( E_DB_ERROR ); /* these flags have no values */ /* ** This trace point instructs OPF\OPC to use set the tuple ** descriptor for the query to state that long varchar elements ** are varchar. This is useful for testing the system before there ** is large object support in the frontends. ** ** To be useful, this action must be accompanied by an action which ** tells the adu_redeem() code to format the beasts as varchar. ** This is accomplished by setting adf trace point 11. ** ** Note that this is server wide setting... */ if (debug_cb->db_trswitch != DB_TR_NOCHANGE) { DB_STATUS status; DB_DEBUG_CB adf_dbg; STRUCT_ASSIGN_MACRO(*debug_cb, adf_dbg); /* {@fix_me@} Need a #define for this... */ adf_dbg.db_trace_point = 11; status = adb_trace(&adf_dbg); if (DB_FAILURE_MACRO(status)) return(status); } break; default: return( E_DB_ERROR ); /* unknown session trace flag */ } /* ** Three possible actions: Turn on flag, turn it off, or do nothing. */ switch (debug_cb->db_trswitch) { case DB_TR_ON: ult_set_macro(&ops_cb->ops_tt, flag, firstval, secondval); ops_cb->ops_check = TRUE; /* indicates that at least one ** trace flag has been set ** - this probably could be made ** into a counter */ break; case DB_TR_OFF: ult_clear_macro(&ops_cb->ops_tt, flag); break; case DB_TR_NOCHANGE: break; default: return (E_DB_ERROR); } } return (E_DB_OK); }