Repository navigation
Errors
A failed query calls OnQueryError in the script that sent it, with the error of MySQL, its message, the public of the query and the start of the query. The public of the query is not called.
public OnQueryError(errorid, const error[], const callback[], const query[], MySQL:handle) {
printf("Error %i in %s: %s", errorid, callback, error);
return 1;
}With ERROR_CALLBACK, an option of the connection, the public of a failed query is called too, after OnQueryError, with an empty cache. mysql_errno and cache_get_errno give the error inside it. Code that waits for a public, such as an inline, then always hears back.
mysql_errno and mysql_error give the last error of a handle, also of its connection after mysql_connect.
Every connection connects again when it is lost, half a second after the first failure and twice as long after each next one, up to five seconds. A query that runs while it cannot connect fails with the error of the connection.
A query past MAX_QUERY_LENGTH, MAX_PENDING or MAX_QUERIES_PER_SECOND is not sent, and the native returns false. A public that is not in the script, or a format that does not match the values, also makes the native return false, and a line is logged.
mysql 0.6.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- The cache
- JSON cells
- Prepared statements
- Transactions
- The ORM
- Passwords
- Errors
- TLS
- Coming from another plugin
- Performance
Reference
Functions
Connections
Queries
Cache
- cache_get_row_count
- cache_get_field_count
- cache_get_result_count
- cache_get_field_name
- cache_get_field_type
- cache_get_field_index
- cache_set_result
- cache_get_value_index
- cache_get_value_index_int
- cache_get_value_index_float
- cache_get_value_index_bool
- cache_is_value_index_null
- cache_get_value_name
- cache_get_value_name_int
- cache_get_value_name_float
- cache_get_value_name_bool
- cache_is_value_name_null
- cache_get_row
- cache_save
- cache_delete
- cache_set_active
- cache_unset_active
- cache_is_any_active
- cache_is_valid
- cache_affected_rows
- cache_insert_id
- cache_warning_count
- cache_get_query_exec_time
- cache_get_query_string
- cache_get_errno