OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Connector/C

V2.0.0
  • Overview
  • Installation guide
  • User Guide
    • Basic data structures
    • Basic operations
      • Basic API operations
      • API operations on prepared statements
  • C API functions
    • Overview
    • my_init()
    • mysql_affected_rows()
    • mysql_autocommit()
    • mysql_change_user()
    • mysql_character_set_name()
    • mysql_client_find_plugin()
    • mysql_client_register_plugin()
    • mysql_close()
    • mysql_commit()
    • mysql_connect()
    • mysql_create_db()
    • mysql_data_seek()
    • mysql_debug()
    • mysql_drop_db()
    • mysql_dump_debug_info()
    • mysql_eof()
    • mysql_errno()
    • mysql_error()
    • mysql_escape_string()
    • mysql_fetch_field()
    • mysql_fetch_field_direct()
    • mysql_fetch_fields()
    • mysql_fetch_lengths()
    • mysql_fetch_row()
    • mysql_field_count()
    • mysql_field_seek()
    • mysql_field_tell()
    • mysql_free_result()
    • mysql_get_character_set_info()
    • mysql_get_client_info()
    • mysql_get_client_version()
    • mysql_get_host_info()
    • mysql_get_proto_info()
    • mysql_get_server_info()
    • mysql_get_server_version()
    • mysql_get_ssl_cipher()
    • mysql_hex_string()
    • mysql_info()
    • mysql_init()
    • mysql_insert_id()
    • mysql_kill()
    • mysql_library_end()
    • mysql_library_init()
    • mysql_list_dbs()
    • mysql_list_fields()
    • mysql_list_processes()
    • mysql_list_tables()
    • mysql_load_plugin()
    • mysql_load_plugin_v()
    • mysql_more_results()
    • mysql_next_result()
    • mysql_num_fields()
    • mysql_num_rows()
    • mysql_options()
    • mysql_options4()
    • mysql_ping()
    • mysql_plugin_options()
    • mysql_query()
    • mysql_real_connect()
    • mysql_real_escape_string()
    • mysql_real_query()
    • mysql_refresh()
    • mysql_reload()
    • mysql_rollback()
    • mysql_row_seek()
    • mysql_row_tell()
    • mysql_select_db()
    • mysql_server_end()
    • mysql_server_init()
    • mysql_set_character_set()
    • mysql_set_local_infile_default()
    • mysql_set_local_infile_handler()
    • mysql_set_server_option()
    • mysql_shutdown()
    • mysql_sqlstate()
    • mysql_ssl_set()
    • mysql_stat()
    • mysql_stmt_affected_rows()
    • mysql_stmt_attr_get()
    • mysql_stmt_attr_set()
    • mysql_stmt_bind_param()
    • mysql_stmt_bind_result()
    • mysql_stmt_close()
    • mysql_stmt_data_seek()
    • mysql_stmt_errno()
    • mysql_stmt_error()
    • mysql_stmt_execute()
    • mysql_stmt_fetch()
    • mysql_stmt_fetch_column()
    • mysql_stmt_field_count()
    • mysql_stmt_free_result()
    • mysql_stmt_init()
    • mysql_stmt_insert_id()
    • mysql_stmt_next_result()
    • mysql_stmt_num_rows()
    • mysql_stmt_param_count()
    • mysql_stmt_param_metadata()
    • mysql_stmt_prepare()
    • mysql_stmt_reset()
    • mysql_stmt_result_metadata()
    • mysql_stmt_row_seek()
    • mysql_stmt_row_tell()
    • mysql_stmt_send_long_data()
    • mysql_stmt_sqlstate()
    • mysql_stmt_store_result()
    • mysql_store_result()
    • mysql_thread_end()
    • mysql_thread_id()
    • mysql_thread_init()
    • mysql_thread_safe()
    • mysql_use_result()
    • mysql_warning_count()

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Connector/C
  3. V2.0.0

Overview

Last Updated:2026-09-04 08:24:09

The following table summarizes all C API functions available in the current version of OceanBase Connector/C.

Function
Description
my_init() Initializes global variables in OceanBase Database.
mysql_affected_rows() Returns the number of rows modified, deleted, or inserted by the last UPDATE, DELETE, or INSERT statement.
mysql_autocommit() Sets the autocommit mode.
mysql_change_user() Modifies the user and database on an open connection.
mysql_character_set_name() Returns the name of the default character set for the current connection.
mysql_client_find_plugin() Returns a pointer to a plug-in.
mysql_client_register_plugin() Registers a plug-in.
mysql_close() Closes the connection with the server.
mysql_commit() Commits a transaction.
mysql_connect() Connects to the server. This function is deprecated.
mysql_create_db() Creates a database. This function is deprecated.
mysql_data_seek() Searches for an arbitrary row in a result set.
mysql_debug() Uses a given string to perform a DBUG_PUSH operation.
mysql_drop_db() Drops a database. This function is deprecated.
mysql_dump_debug_info() Instructs the server to write debugging information to the error log.
mysql_eof() Checks whether the last row in a result set is already read. This function is deprecated.
mysql_errno() Returns the error code generated for the last called API function.
mysql_error() Returns the error message generated for the last called API function.
mysql_escape_string() Escapes special characters in a string so that it can be used in an SQL statement.
mysql_fetch_field() Returns the next field.
mysql_fetch_field_direct() Returns the field with the specified field number.
mysql_fetch_fields() Returns an array of all field structures.
mysql_fetch_lengths() Returns the lengths of the columns of the current row in a result set.
mysql_fetch_row() Retrieves the next row of a result set.
mysql_field_count() Returns the number of columns for the most recent query.
mysql_field_seek() Searches for columns of a row in a result set.
mysql_field_tell() Returns the position of the field used for the last call to the mysql_fetch_field() function.
mysql_free_result() Frees the memory allocated to a result set.
mysql_get_character_set_info() Returns the information about the default character set.
mysql_get_client_info() Returns a string that represents the OceanBase client library version.
mysql_get_client_version() Returns an integer that represents the OceanBase client library version.
mysql_get_host_info() Returns the connection information, including the server host name.
mysql_get_proto_info() Returns the protocol version used for the current connection.
mysql_get_server_info() Returns a string that represents the server version.
mysql_get_server_version() Returns an integer that represents the server version.
mysql_get_ssl_cipher() Returns the current SSL password.
mysql_hex_string() Creates a hexadecimal string.
mysql_info() Returns the information about the most recently executed statement.
mysql_init() Obtains or initializes a connection structure.
mysql_insert_id() Returns the ID generated by the previous statement for an AUTO_INCREMENT column.
mysql_kill() Kills a thread. This function is deprecated.
mysql_library_end() Finalizes the C API library.
mysql_library_init() Initializes the C API library.
mysql_list_dbs() Returns database names that match a regular expression.
mysql_list_fields() Returns field names that match a regular expression.
mysql_list_processes() Returns the thread list of the server.
mysql_list_tables() Returns table names that match a regular expression.
mysql_load_plugin() Loads a plug-in.
mysql_load_plugin_v() Loads a plug-in.
mysql_more_results() Checks whether more results exist.
mysql_next_result() Returns the next statement result.
mysql_num_fields() Returns the number of columns in a result set.
mysql_num_rows() Returns the number of rows in a result set.
mysql_options() Sets connection options.
mysql_options4() Sets connection options.
mysql_ping() Checks whether the connection to the server is working.
mysql_plugin_options() Sets plug-in options.
mysql_query() Executes an SQL statement.
mysql_real_connect() Connects to the server.
mysql_real_escape_string() Encodes special characters in a string of a statement.
mysql_real_query() Executes a statement.
mysql_refresh() Flushes or resets tables or caches.
mysql_reload() Reloads the grant tables. This function is deprecated.
mysql_rollback() Rolls back a transaction.
mysql_row_seek() Searches for an arbitrary row in a query result set.
mysql_row_tell() Returns the current position of the row cursor for a result set.
mysql_select_db() Selects a database.
mysql_server_end() Finalizes the C API library.
mysql_server_init() Initializes the C API library.
mysql_set_character_set() Sets the default character set for the current connection.
mysql_set_local_infile_default() Sets the LOAD DATA LOCAL callback functions to the default values.
mysql_set_local_infile_handler() Installs callbacks to be used during the execution of LOAD DATA LOCAL statements.
mysql_set_server_option() Enables or disables an option for the current connection.
mysql_shutdown() Shuts down the server.
mysql_sqlstate() Returns the SQLSTATE value of the most recently called function.
mysql_ssl_set() Establishes an SSL connection to the server.
mysql_stat() Returns the status of the server.
mysql_stmt_affected_rows() Returns the number of rows modified, deleted, or inserted by the last UPDATE, DELETE, or INSERT statement.
mysql_stmt_attr_get() Obtains an attribute value of a prepared statement.
mysql_stmt_attr_set() Sets an attribute value for a prepared statement.
mysql_stmt_bind_param() Associates the input data with the parameter markers of a prepared statement.
mysql_stmt_bind_result() Associates data buffers with output columns in the result set.
mysql_stmt_close() Closes a prepared statement.
mysql_stmt_data_seek() Searches for an arbitrary row in the result set of a prepared statement.
mysql_stmt_errno() Returns the error code for the most recently called statement.
mysql_stmt_error() Returns the error message generated for the last called statement API function.
mysql_stmt_execute() Executes a prepared statement.
mysql_stmt_fetch() Returns the next row in a result set and returns the values of all associated columns.
mysql_stmt_fetch_column() Fetches one column from the current result set row.
mysql_stmt_field_count() Returns the number of columns in the result set of the most recently executed prepared statement.
mysql_stmt_free_result() Free resources allocated to the statement handler.
mysql_stmt_init() Allocates and initializes memory to the STMT structure.
mysql_stmt_insert_id() Returns the ID generated by the previous prepared statement for an AUTO_INCREMENT column.
mysql_stmt_next_result() Returns the next result in the result set of a prepared statement.
mysql_stmt_num_rows() Returns the number of rows in the result set of a statement.
mysql_stmt_param_count() Returns the number of parameters in a prepared statement.
mysql_stmt_param_metadata() Returns parameter metadata as a result set.
mysql_stmt_prepare() Prepares a statement.
mysql_stmt_reset() Resets a statement buffer on the server.
mysql_stmt_result_metadata() Returns the metadata of a prepared statement as a result set.
mysql_stmt_row_seek() Searches for an arbitrary row in the result set of a prepared statement.
mysql_stmt_row_tell() Returns the current position of the row cursor for the result set of a prepared statement.
mysql_stmt_send_long_data() Sends data to the server in pieces.
mysql_stmt_sqlstate() Returns the SQLSTATE value for the most recently called statement API function.
mysql_stmt_store_result() Retrieves and stores a result set.
mysql_store_result() Retrieves and stores a result set.
mysql_thread_end() Finalizes the thread handler.
mysql_thread_id() Returns the current thread ID.
mysql_thread_init() Initializes the thread handler.
mysql_thread_safe() Indicates whether the client library is compiled as thread-safe.
mysql_use_result() Retrieves a result set row by row.
mysql_warning_count() Returns the number of alerts generated during the execution of the previous statement.

Previous topic

API operations on prepared statements
Last

Next topic

my_init()
Next