17.9 RESIGNAL
RESIGNAL [condition_value]
[SET signal_information_item
[, signal_information_item] ...]
condition_value: {
SQLSTATE [VALUE] sqlstate_value
| condition_name
}
signal_information_item:
condition_information_item_name = simple_value_specification
condition_information_item_name: {
CLASS_ORIGIN
| SUBCLASS_ORIGIN
| MESSAGE_TEXT
| MYSQL_ERRNO
| CONSTRAINT_CATALOG
| CONSTRAINT_SCHEMA
| CONSTRAINT_NAME
| CATALOG_NAME
| SCHEMA_NAME
| TABLE_NAME
| COLUMN_NAME
| CURSOR_NAME
}
condition_name, simple_value_specification:
(see following discussion)
RESIGNAL
传递错误状况的信息(information
),该信息是在存储过程或函数、触发器、事件中的复合语句内部的处理器的执行期间可用的信息。RESIGNAL
可能会在传递它之前改变信息。
RESIGNAL
与SIGNAL
的区别在于:SIGNAL发送错误状况,而RESIGNAL传递错误状况,并可能会在传递之前改变信息。
执行RESIGNAL
不需要任何权限。
它必须在处理器的内部使用。
详细说明参考:https://dev.mysql.com/doc/refman/5.5/en/resignal.html