Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The diagnostics area


The diagnostics area consists of two subareas: the statement information and the condition information.

The statement information contains two values:

  • NUMBER: This is the number of conditions stored in the condition area.

  • ROW_COUNT: This is the number of rows modified by the statement it refers to. The same value is returned by the ROW_COUNT() SQL function and by the mysql_affected_rows() API function.

The diagnostics area is populated and emptied by following the exact rules. Knowing these rules is very important to debug single statements without falling for some common pitfalls, and it is more important to debug the stored programs.

Whenever a statement generates at least one condition (notes, warnings, or errors), the diagnostics area is populated with such conditions. Any condition present previously in the diagnostics area is deleted. However, there is an exception. If the new statement is RESIGNAL or GET DIAGNOSTICS, the old conditions are not deleted. This is to...