What is an error buffer? In MySQL, the Error Buffer only records the last error. If a new error is generated, the old one will be overwritten. So if you want to know what errors are generated, you have
What is an error buffer? In MySQL, the Error Buffer only records the last error. If a new error is generated, the old one will be overwritten. So if you want to know what errors are generated, you have
What is an error buffer?
In MySQL, the Error Buffer only records the last error. If a new error is generated, the old one will be overwritten. So I want to know what the error is,
You must follow the "show warnings" or "show errors" statements that may cause errors ". The simplest way is to redirect the output result to the custom one.
Log File to facilitate subsequent viewing. If you want to view these errors at any time, you must use the APIS provided by MySQL.
Since the emergence of the revolutionary MySQL 5.6 version, the problem has been preliminarily solved. Although it is far from what we think.
MySQL 5.6 provides the get diagnostic statement to get the content of the Error Buffer, and then output the content to variables in different range fields, so that we can flexibly perform subsequent operations.
Next, let's look at an example.
The target table structure is:
The Stored Procedure Code is:
Let's execute the above stored procedure. After the server space is complete, the website space will save the error information to the SESSION variable @ I _result. In this way, the Hong Kong Space facilitates subsequent output.
This article is from "god, let's see it !" Blog, please keep this source