Sp_Procedure_Templet (procedure)
�����ų�
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | sWorkOrderGuid |
varchar(5000) |
| 2 | IN | sWorkOrderBillNo |
varchar(100) |
| 3 | IN | bCheck |
int |
| 4 | IN | sLoginId |
varchar(100) |
| 5 | IN | sBrId |
varchar(100) |
| 6 | IN | sSuId |
varchar(100) |
| 7 | OUT | sCode |
int |
| 8 | OUT | sReturn |
varchar(4000) |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpProcedure_Templet'._
Narrative
Business context: Boilerplate template ("Templet" — typo for "Template") — not a business routine. Comment header is mojibake (originally 生产排程, garbled by encoding mismatch). The body is the scaffolding every transactional proc copies from: parameter null-coalesce defaults, transaction-savepoint setup, top: BEGIN … END block, and an SQLEXCEPTION rollback handler. Maintainers duplicate this file as the starting point when writing a new Sp_* proc.
What it does: IFNULLs every parameter, counts in-flight INNODB_TRX for the connection, opens a START TRANSACTION only if there isn't one, sets SAVEPOINT sInsertMftPlan, and runs a single placeholder statement SELECT * FROM gdsconfigcharmaster LIMIT 0,1 inside the top: block. The error handler rolls back to the savepoint and emits the SQLEXCEPTION localised message via SP_Sis_GetConst; success path COMMITs. The sWorkOrderGuid/bCheck parameter list reflects the audit-button family it was copied for.
Invocation: Status: appears orphaned by design. No gdsmodule.sProcName binding, no form-master sSqlStr reference, no other-routine caller, no xly-src reference. Kept in the catalog as a developer template — not intended to be invoked from production.