Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 47.0Mb
PDF (A4) - 47.0Mb
PDF (RPM) - 42.4Mb
HTML Download (TGZ) - 10.8Mb
HTML Download (Zip) - 10.9Mb
HTML Download (RPM) - 9.4Mb
Man Pages (TGZ) - 227.0Kb
Man Pages (Zip) - 333.6Kb
Info (Gzip) - 4.2Mb
Info (Zip) - 4.2Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  C API Function Descriptions

28.6.6 C API Function Descriptions

[+/-]

28.6.6.1 mysql_affected_rows()
28.6.6.2 mysql_autocommit()
28.6.6.3 mysql_change_user()
28.6.6.4 mysql_character_set_name()
28.6.6.5 mysql_close()
28.6.6.6 mysql_commit()
28.6.6.7 mysql_connect()
28.6.6.8 mysql_create_db()
28.6.6.9 mysql_data_seek()
28.6.6.10 mysql_debug()
28.6.6.11 mysql_drop_db()
28.6.6.12 mysql_dump_debug_info()
28.6.6.13 mysql_eof()
28.6.6.14 mysql_errno()
28.6.6.15 mysql_error()
28.6.6.16 mysql_escape_string()
28.6.6.17 mysql_fetch_field()
28.6.6.18 mysql_fetch_field_direct()
28.6.6.19 mysql_fetch_fields()
28.6.6.20 mysql_fetch_lengths()
28.6.6.21 mysql_fetch_row()
28.6.6.22 mysql_field_count()
28.6.6.23 mysql_field_seek()
28.6.6.24 mysql_field_tell()
28.6.6.25 mysql_free_result()
28.6.6.26 mysql_get_character_set_info()
28.6.6.27 mysql_get_client_info()
28.6.6.28 mysql_get_client_version()
28.6.6.29 mysql_get_host_info()
28.6.6.30 mysql_get_option()
28.6.6.31 mysql_get_proto_info()
28.6.6.32 mysql_get_server_info()
28.6.6.33 mysql_get_server_version()
28.6.6.34 mysql_get_ssl_cipher()
28.6.6.35 mysql_hex_string()
28.6.6.36 mysql_info()
28.6.6.37 mysql_init()
28.6.6.38 mysql_insert_id()
28.6.6.39 mysql_kill()
28.6.6.40 mysql_library_end()
28.6.6.41 mysql_library_init()
28.6.6.42 mysql_list_dbs()
28.6.6.43 mysql_list_fields()
28.6.6.44 mysql_list_processes()
28.6.6.45 mysql_list_tables()
28.6.6.46 mysql_more_results()
28.6.6.47 mysql_next_result()
28.6.6.48 mysql_num_fields()
28.6.6.49 mysql_num_rows()
28.6.6.50 mysql_options()
28.6.6.51 mysql_options4()
28.6.6.52 mysql_ping()
28.6.6.53 mysql_query()
28.6.6.54 mysql_real_connect()
28.6.6.55 mysql_real_escape_string()
28.6.6.56 mysql_real_escape_string_quote()
28.6.6.57 mysql_real_query()
28.6.6.58 mysql_refresh()
28.6.6.59 mysql_reload()
28.6.6.60 mysql_reset_connection()
28.6.6.61 mysql_reset_server_public_key()
28.6.6.62 mysql_result_metadata()
28.6.6.63 mysql_rollback()
28.6.6.64 mysql_row_seek()
28.6.6.65 mysql_row_tell()
28.6.6.66 mysql_select_db()
28.6.6.67 mysql_server_end()
28.6.6.68 mysql_server_init()
28.6.6.69 mysql_session_track_get_first()
28.6.6.70 mysql_session_track_get_next()
28.6.6.71 mysql_set_character_set()
28.6.6.72 mysql_set_local_infile_default()
28.6.6.73 mysql_set_local_infile_handler()
28.6.6.74 mysql_set_server_option()
28.6.6.75 mysql_shutdown()
28.6.6.76 mysql_sqlstate()
28.6.6.77 mysql_ssl_set()
28.6.6.78 mysql_stat()
28.6.6.79 mysql_store_result()
28.6.6.80 mysql_thread_id()
28.6.6.81 mysql_use_result()
28.6.6.82 mysql_warning_count()

This section describes C API functions other than those used for prepared statements, the asychronous interface, or the replication stream interface. For information about those, see Section 28.6.10, “C API Prepared Statement Function Descriptions”, Section 28.6.14, “C API Asynchronous Function Descriptions”, and Section 28.6.20, “C API Binary Log Function Descriptions”.

In the descriptions here, a parameter or return value of NULL means NULL in the sense of the C programming language, not a MySQL NULL value.

Functions that return a value generally return a pointer or an integer. Unless specified otherwise, functions returning a pointer return a non-NULL value to indicate success or a NULL value to indicate an error, and functions returning an integer return zero to indicate success or nonzero to indicate an error. Note that nonzero means just that. Unless the function description says otherwise, do not test against a value other than zero:

if (result)                   /* correct */
    ... error ...

if (result < 0)               /* incorrect */
    ... error ...

if (result == -1)             /* incorrect */
    ... error ...

When a function returns an error, the Errors subsection of the function description lists the possible types of errors. You can find out which of these occurred by calling mysql_errno(). A string representation of the error may be obtained by calling mysql_error().