Search Results
https://dev.mysql.com/doc/c-api/8.4/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/8.4/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/8.4/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/8.4/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/8.4/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/8.4/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 ...
https://dev.mysql.com/doc/c-api/8.4/en/mysql-ping.html
If the connection is down and auto-reconnect is disabled, mysql_ping() returns an error. int mysql_ping(MYSQL *mysql) Description Checks whether the connection to the server is working. If the connection has gone down and auto-reconnect is enabled ...
https://dev.mysql.com/doc/c-api/8.4/en/mysql-real-connect.html
It causes the parser to generate an error if you use that syntax, which is useful for trapping bugs in some ODBC programs. CR_VERSION_ERROR A protocol mismatch resulted from attempting to connect to a server with a client library that uses a ...
https://dev.mysql.com/doc/c-api/8.4/en/mysql-stmt-close.html
For a failed mysql_stmt_close() call, do not call mysql_stmt_error(), or mysql_stmt_errno(), or mysql_stmt_sqlstate() to obtain error information because mysql_stmt_close() makes the statement handler invalid. mysql_stmt_close() also deallocates the ...
https://dev.mysql.com/doc/c-api/8.4/en/mysql-stmt-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 ...