Search Results
https://dev.mysql.com/doc/c-api/9.7/en/c-api-prepared-statement-interface-usage.html
If an error occurs, you can get the statement error number, error message, and SQLSTATE code using mysql_stmt_errno(), mysql_stmt_error(), and mysql_stmt_sqlstate(), respectively. To prepare and execute a statement, an application follows these ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-change-user.html
Errors The same that you can get from mysql_real_connect(), plus: CR_COMMANDS_OUT_OF_SYNC Commands were executed in an improper order. ER_UNKNOWN_COM_ERROR The MySQL server does not implement this command (probably an old server). bool ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-client-find-plugin.html
An error occurs if the type is invalid or the plugin cannot be found or loaded. Errors To check for errors, call the mysql_error() or mysql_errno() function. struct st_mysql_client_plugin * mysql_client_find_plugin(MYSQL *mysql, const char *name, ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-client-register-plugin.html
Errors To check for errors, call the mysql_error() or mysql_errno() function. struct st_mysql_client_plugin * mysql_client_register_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin) Description Adds a plugin structure to the list of ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-create-db.html
int mysql_create_db(MYSQL *mysql, const char *db) Description Creates the database named by the db parameter. Use mysql_real_query() or mysql_query() to issue an SQL CREATE DATABASE statement instead. CR_SERVER_LOST The connection to the server was ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-drop-db.html
Example if(mysql_drop_db(&mysql, "my_database")) fprintf(stderr, "Failed to drop the database: Error: %s\n", mysql_error(&mysql)); . int mysql_drop_db(MYSQL *mysql, const char *db) Description Drops the database named by the db parameter. Use ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-dump-debug-info.html
int mysql_dump_debug_info(MYSQL *mysql) Description Instructs the server to write debugging information to the error log. CR_SERVER_LOST The connection to the server was lost during the query.
https://dev.mysql.com/doc/c-api/9.7/en/mysql-field-count.html
In this case, you are checking directly for an error from mysql_store_result() rather than inferring from the value of mysql_field_count() whether the statement was a SELECT. unsigned int mysql_field_count(MYSQL *mysql) Description Returns the ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-next-result.html
Return Values Return Value Description 0 Successful and there are more results -1 Successful and there are no more results >0 An error occurred Errors CR_COMMANDS_OUT_OF_SYNC Commands were executed in an improper order. int mysql_next_result(MYSQL ...
https://dev.mysql.com/doc/c-api/9.7/en/mysql-options4.html
If the key is empty or already exists in the current set of connection attributes, an error occurs. For calls that cause this limit to be exceeded, a CR_INVALID_PARAMETER_NO error occurs. Example This example demonstrates the calls that specify ...