YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
typedefstruct st_mysql_field { char *name; /* Name of column */ char *org_name; /* Original column name, if an alias */ char *table; /* Table of column if column was a field */ char *org_table; /* Org table name, if table was an alias */ char *db; /* Database for table */ char *catalog; /* Catalog for table */ char *def; /* Default value (set by mysql_list_fields) */ unsignedlong length; /* Width of column (create length) */ unsignedlong max_length; /* Max width for selected set */ unsignedint name_length; unsignedint org_name_length; unsignedint table_length; unsignedint org_table_length; unsignedint db_length; unsignedint catalog_length; unsignedint def_length; unsignedint flags; /* Div flags */ unsignedint decimals; /* Number of decimals in field */ unsignedint charsetnr; /* Character set */ enum enum_field_types type; /* Type of field. See mysql_com.h for types */ void *extension;
} MYSQL_FIELD;
typedefchar **MYSQL_ROW; /* return data as array of strings */ typedefunsignedint MYSQL_FIELD_OFFSET; /* offset to current field */
typedefstruct character_set
{ unsignedint number; /* character set number */ unsignedint state; /* character set state */ constchar *csname; /* collation name */ constchar *name; /* character set name */ constchar *comment; /* comment */ constchar *dir; /* character set directory */ unsignedint mbminlen; /* min. length for multibyte strings */ unsignedint mbmaxlen; /* max. length for multibyte strings */
} MY_CHARSET_INFO;
struct st_mysql_methods; struct st_mysql_stmt;
typedefstruct st_mysql
{
NET net; /* Communication parameters */ unsignedchar *connector_fd; /* ConnectorFd for SSL */ char *host,*user,*passwd,*unix_socket,*server_version,*host_info; char *info, *db; conststruct charset_info_st *charset;
MEM_ROOT field_alloc;
my_ulonglong affected_rows;
my_ulonglong insert_id; /* id if insert on table with NEXTNR */
my_ulonglong extra_info; /* Not used */ unsignedlong thread_id; /* Id for connection in server */ unsignedlong packet_length; unsignedint port; unsignedlong client_flag,server_capabilities; unsignedint protocol_version; unsignedint field_count; unsignedint server_status; unsignedint server_language; unsignedint warning_count; struct st_mysql_options options; enum mysql_status status;
my_bool free_me; /* If free in mysql_close */
my_bool reconnect; /* set to 1 if automatic reconnect */
LIST *stmts; /* list of all statements */ conststruct st_mysql_methods *methods; void *thd; /* PointstobooleanflaginMYSQL_RESorMYSQL_STMT.Wesetthisflag frommysql_stmt_closeifclosehadtocancelresultsetofthisobject.
*/
my_bool *unbuffered_fetch_owner; /* needed for embedded server - no net buffer to store the 'info' */ char *info_buffer; void *extension;
} MYSQL;
typedefstruct st_mysql_res {
my_ulonglong row_count;
MYSQL_FIELD *fields;
MYSQL_DATA *data;
MYSQL_ROWS *data_cursor; unsignedlong *lengths; /* column lengths of current row */
MYSQL *handle; /* for unbuffered reads */ conststruct st_mysql_methods *methods;
MYSQL_ROW row; /* If unbuffered read */
MYSQL_ROW current_row; /* buffer to current row */
MEM_ROOT field_alloc; unsignedint field_count, current_field;
my_bool eof; /* Used by mysql_fetch_row */ /* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled; void *extension;
} MYSQL_RES;
typedefstruct st_mysql_bind
{ unsignedlong *length; /* output length pointer */
my_bool *is_null; /* Pointer to null indicator */ void *buffer; /* buffer to get/put data */ /* set this if you want to track data truncations happened during fetch */
my_bool *error; unsignedchar *row_ptr; /* for the current data position */ void (*store_param_func)(NET *net, struct st_mysql_bind *param); void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsignedchar **row); void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsignedchar **row); /* output buffer length, must be set when fetching str/binary */ unsignedlong buffer_length; unsignedlong offset; /* offset position for char/binary fetch */ unsignedlong length_value; /* Used if length is 0 */ unsignedint param_number; /* For null count and error messages */ unsignedint pack_length; /* Internal length for packed data */ enum enum_field_types buffer_type; /* buffer type */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */ void *extension;
} MYSQL_BIND;
struct st_mysql_stmt_extension;
/* statement handler */ typedefstruct st_mysql_stmt
{
MEM_ROOT mem_root; /* root allocations */
LIST list; /* list to keep track of all stmts */
MYSQL *mysql; /* connection handle */
MYSQL_BIND *params; /* input parameters */
MYSQL_BIND *bind; /* output parameters */
MYSQL_FIELD *fields; /* result set metadata */
MYSQL_DATA result; /* cached result set */
MYSQL_ROWS *data_cursor; /* current row in cached result */ /* mysql_stmt_fetch()callsthisfunctiontofetchonerow(it'sdifferent forbuffered,unbufferedandcursorfetch).
*/ int (*read_row_func)(struct st_mysql_stmt *stmt, unsignedchar **row); /* copy of mysql->affected_rows after statement execution */
my_ulonglong affected_rows;
my_ulonglong insert_id; /* copy of mysql->insert_id */ unsignedlong stmt_id; /* Id for prepared statement */ unsignedlong flags; /* i.e. type of cursor to open */ unsignedlong prefetch_rows; /* number of rows per one COM_FETCH */ /* Copiedfrommysql->server_statusafterexecute/fetchtoknow server-sidecursorstatusforthisstatement.
*/ unsignedint server_status; unsignedint last_errno; /* error code */ unsignedint param_count; /* input parameter count */ unsignedint field_count; /* number of columns in result set */ enum enum_mysql_stmt_state state; /* statement state */ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ char sqlstate[SQLSTATE_LENGTH+1]; /* Types of input parameters should be sent to server */
my_bool send_types_to_server;
my_bool bind_param_done; /* input buffers were supplied */ unsignedchar bind_result_done; /* output buffers were supplied */ /* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled; /* Issettotrueifweneedtocalculatefield->max_lengthfor metadatafieldswhendoingmysql_stmt_store_result.
*/
my_bool update_max_length; struct st_mysql_stmt_extension *extension;
} MYSQL_STMT;
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql); int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, constchar *query, unsignedlong length); int STDCALL mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, constchar *query, unsignedlong length); int STDCALL mysql_stmt_prepare_cont(int *ret, MYSQL_STMT *stmt, int status); int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); int STDCALL mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_execute_cont(int *ret, MYSQL_STMT *stmt, int status); int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch_start(int *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch_cont(int *ret, MYSQL_STMT *stmt, int status); int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsignedint column, unsignedlong offset); int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_store_result_cont(int *ret, MYSQL_STMT *stmt, int status); unsignedlong STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, constvoid *attr);
my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr);
my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt); int STDCALL mysql_stmt_close_start(my_bool *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_close_cont(my_bool *ret, MYSQL_STMT * stmt, int status);
my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt); int STDCALL mysql_stmt_reset_start(my_bool *ret, MYSQL_STMT * stmt); int STDCALL mysql_stmt_reset_cont(my_bool *ret, MYSQL_STMT *stmt, int status);
my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt); int STDCALL mysql_stmt_free_result_start(my_bool *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_free_result_cont(my_bool *ret, MYSQL_STMT *stmt, int status);
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsignedint param_number, constchar *data, unsignedlong length); int STDCALL mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt, unsignedint param_number, constchar *data, unsignedlong len); int STDCALL mysql_stmt_send_long_data_cont(my_bool *ret, MYSQL_STMT *stmt, int status);
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt); unsignedint STDCALL mysql_stmt_errno(MYSQL_STMT * stmt); constchar *STDCALL mysql_stmt_error(MYSQL_STMT * stmt); constchar *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
MYSQL_ROW_OFFSET offset);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); unsignedint STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
my_bool STDCALL mysql_commit(MYSQL * mysql); int STDCALL mysql_commit_start(my_bool *ret, MYSQL * mysql); int STDCALL mysql_commit_cont(my_bool *ret, MYSQL * mysql, int status);
my_bool STDCALL mysql_rollback(MYSQL * mysql); int STDCALL mysql_rollback_start(my_bool *ret, MYSQL * mysql); int STDCALL mysql_rollback_cont(my_bool *ret, MYSQL * mysql, int status);
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); int STDCALL mysql_autocommit_start(my_bool *ret, MYSQL * mysql,
my_bool auto_mode); int STDCALL mysql_autocommit_cont(my_bool *ret, MYSQL * mysql, int status);
my_bool STDCALL mysql_more_results(MYSQL *mysql); int STDCALL mysql_next_result(MYSQL *mysql); int STDCALL mysql_next_result_start(int *ret, MYSQL *mysql); int STDCALL mysql_next_result_cont(int *ret, MYSQL *mysql, int status); int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt); int STDCALL mysql_stmt_next_result_start(int *ret, MYSQL_STMT *stmt); int STDCALL mysql_stmt_next_result_cont(int *ret, MYSQL_STMT *stmt, int status); void STDCALL mysql_close_slow_part(MYSQL *mysql); void STDCALL mysql_close(MYSQL *sock); int STDCALL mysql_close_start(MYSQL *sock); int STDCALL mysql_close_cont(MYSQL *sock, int status);
my_socket STDCALL mysql_get_socket(const MYSQL *mysql); unsignedint STDCALL mysql_get_timeout_value(const MYSQL *mysql); unsignedint STDCALL mysql_get_timeout_value_ms(const MYSQL *mysql);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.