Diagnostics Area-Related System Variables
Certain system variables control or are related to some aspects of the diagnostics area:
max_error_countcontrols the number of condition areas in the diagnostics area. If more conditions than this occur, MariaDB silently discards information for the excess conditions. (Conditions added byRESIGNALare always added, with older conditions being discarded as necessary to make room.)warning_countindicates the number of conditions that occurred. This includes errors, warnings, and notes. Normally,NUMBERandwarning-countare the same. However, as the number of conditions generated exceedsmax_error_count, the value ofwarning_countcontinues to rise whereasNUMBERremains capped atmax_error_countbecause no additional conditions are stored in the diagnostics area.error_countindicates the number of errors that occurred. This value includes "not found" and exception conditions, but excludes warnings and notes. Likewarning-count, its value can exceedmax_error_count.- If the
sql-notessystem variable is set to 0, notes are not recorded and do not incrementwarning_count.
Example: If max_error_count is 10, the diagnostics area can contain a maximum of 10 condition areas. Suppose that a statement raises 20 conditions, 12 of which are errors. In that case, the diagnostics area contains the first 10 conditions, NUMBER is 10, warning_count is 20, and error_count is 12.
Changes to the value of max_error_count have no effect until the next attempt to modify the diagnostics area. If the diagnostics area contains 10 condition areas and max_error_count is set to 5, that has no immediate effect on the size or content of the diagnostics area.
Before MariaDB 5.6, statement information items are not available directly. ROW_COUNT can be obtained by calling the ROW_COUNT() function. NUMBER is approximated by the value of the warning_count system variable. However, whereas NUMBER is capped to the value of max_error_count, warning_count is not.