Condition Handling •Condition information, such as the error code and message. If a statement raises multiple conditions, this part of the diagnostics area has a condition area for each one. If a statement raises no conditions, this part of the diagnostics area is empty. • NUMBER : An integer indicating the number of condition areas that have information. • ROW_COUNT : An integer indicating the number of rows affected by the statement.  ROW_COUNT  has the same value as the  ROW_COUNT()  function (see Section 12.16, “Information Functions” ). • CLASS_ORIGIN : A string containing the class of the  RETURNED_SQLSTATE  value. If the RETURNED_SQLSTATE  value begins with a class value defined in SQL standards document ISO 9075-2 (section 24.1, SQLSTATE),  CLASS_ORIGIN  is  ’ISO 9075’ . Otherwise,  CLASS_ORIGIN  is  ’MySQL’ . • SUBCLASS_ORIGIN : A string containing the subclass of the  RETURNED_SQLSTATE  value. If CLASS_ORIGIN  is  ’ISO 9075’  or  RETURNED_SQLSTATE  ends with  ’000’ ,  SUBCLASS_ORIGIN  is ’ISO 9075’ . Otherwise,  SUBCLASS_ORIGIN  is  ’MySQL’ . • RETURNED_SQLSTATE : A string that indicates the  SQLSTATE  value for the condition. • MESSAGE_TEXT : A string that indicates the error message for the condition. • MYSQL_ERRNO : An integer that indicates the MySQL error code for the condition. 2830 Each condition area contains the items in the following list. All items are standard SQL except MYSQL_ERRNO , which is a MySQL extension. The definitions apply for conditions generated other than by a signal (that is, by a  SIGNAL  or  RESIGNAL  statement). For nonsignal conditions, MySQL populates only those condition items not described as always empty. The effects of signals on the condition area are described later. The condition information part of the diagnostics area contains a condition area for each condition. Condition areas are numbered from 1 to the value of the  NUMBER  statement condition item. If  NUMBER  is 0, there are no condition areas. The statement information part of the diagnostics area contains these items: The diagnostics area contains statement and condition information items. Numeric items are integers. The character set for character items is UTF-8. No item can be  NULL . If a statement or condition item is not set by a statement that populates the diagnostics area, its value is 0 or the empty string, depending on the item data type. For a statement that produces three conditions, the diagnostics area contains statement and condition information like this: Statement information: row count ... other statement information items ... Condition area list: Condition area 1: error code for condition 1 error message for condition 1 ... other condition information items ... Condition area 2: error code for condition 2: error message for condition 2 ... other condition information items ... Condition area 3: error code for condition 3 error message for condition 3 ... other condition information items ... Diagnostics Area Information Items