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

Summary


This chapter focused on logging, finding, and understanding the errors that occur in a MariaDB installation.

We analyzed the information available in a single error condition. These conditions populate the diagnostics area. We discussed how the diagnostics area is populated or emptied by the statements we execute. We also discussed and tried the SQL statements that show information from the diagnostics area: SHOW WARNINGS, SHOW ERRORS, and GET DIAGNOSTICS. The SQL errors are also logged in a file if the SQL_ERROR_LOG plugin is enabled. We learned how to use that plugin efficiently. Some further notes were dedicated to the debugging of stored programs, which is often a difficult task.

The general query log is also useful to debug applications or find problematic statements. While it does not contain information about errors which occurred, it keeps a track of all the statements that were sent to the server. This log can be written to a file or to a SQL table called general_log.

SQL errors...