Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As we saw in the previous section, the server returns some
important information about each query, displaying some of it directly in
the MySQL client and making some of it easy to obtain through commands
such as SHOW WARNINGS. When SQL is
called from an application, it’s just as important to retrieve this
information and check to make sure nothing suspicious is going on. All
programming APIs for MySQL support functions that retrieve the query
information returned by the server. In this section, we will discuss these
functions. I refer just to the C API because I had to choose one language,
and most of the other APIs are based on the C API.[4]