https://dev.mysql.com/mysql-stmt-free-result.html
bool mysql_stmt_free_result(MYSQL_STMT *stmt) Releases memory associated with the result set produced by execution of the prepared statement. If there is a cursor open for the statement, mysql_stmt_free_result() closes it.
https://dev.mysql.com/mysql-stmt-reset.html
bool mysql_stmt_reset(MYSQL_STMT *stmt) Resets a prepared statement on client and server to state after prepare. It resets the statement on the server, data sent using mysql_stmt_send_long_data(), unbuffered result sets and current errors. Stored ...
https://dev.mysql.com/c-api-prepared-call-statements.html
This section describes prepared-statement support in the C API for stored procedures executed using CALL statements: Stored procedures executed using prepared CALL statements can be used in the following ways: A stored procedure can produce any ...
https://dev.mysql.com/mysql-stmt-send-long-data.html
bool mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int parameter_number, const char *data, unsigned long length) Enables an application to send parameter data to the server in pieces (or “chunks”). It can be called multiple times to send ...
https://dev.mysql.com/mysql-thread-init.html
bool mysql_thread_init(void) This function must be called early within each created thread to initialize thread-specific variables. However, you may not necessarily need to invoke it explicitly: calling mysql_thread_init() is automatically handled ...
https://dev.mysql.com/c-api-auto-reconnect.html
To ensure this, call mysql_options() with the MYSQL_OPT_RECONNECT option: bool reconnect = 0; mysql_options(&mysql, MYSQL_OPT_RECONNECT, &reconnect); If the connection has gone down, the effect of mysql_ping() depends on the auto-reconnect state.