diff options
author | unknown <konstantin@mysql.com> | 2004-03-28 17:22:04 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-03-28 17:22:04 +0400 |
commit | 7e5cd910576c1149d6cac0b1babb0b71c76ca102 (patch) | |
tree | 5bf725b1d8706c37d5a6850017ab0655d21bae3e /include | |
parent | 76385f32b67ae6560cebd81a985d9793202b81c3 (diff) | |
download | mariadb-git-7e5cd910576c1149d6cac0b1babb0b71c76ca102.tar.gz |
Simplification: MYSQL_RES *result replaced with MYSQL_DATA result;
No need to check for result existence any more, store_result functions
now are shorter.
cli_read_binary_rows rewritten to handle MYSQL_DATA directly.
include/mysql.h:
MYSQL_RES * pointer replaced with MYSQL_DATA: it saves us at least 2 mallocs
per store_result and simplifies stored result handling.
Plus it's done with cursor fetch in mind: cursor fetch will use this
structure to buffer fetched rows.
libmysql/client_settings.h:
signature of cli_read_binary_rows changed
libmysql/libmysql.c:
MYSQL_DATA is now used to handle result.
cli_read_binary_rows rewritten to use MYSQL_DATA directly.
libmysql/libmysql.def:
declarations of new calls in the library
libmysqld/lib_sql.cc:
MYSQL_DATA is now used to handle result.
cli_read_binary_rows rewritten to use MYSQL_DATA directly.
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/mysql.h b/include/mysql.h index dcdbe3a07a4..43ca7fdba12 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -563,9 +563,11 @@ typedef struct st_mysql_stmt MYSQL_BIND *params; /* input parameters */ MYSQL_BIND *bind; /* output parameters */ MYSQL_FIELD *fields; /* result set metadata */ - MYSQL_RES *result; /* cached result set */ + MYSQL_DATA result; /* cached result set */ + MYSQL_ROWS *data_cursor; /* current row in cached result */ /* copy of mysql->affected_rows after statement execution */ my_ulonglong affected_rows; + my_ulonglong insert_id; /* copy of mysql->insert_id */ /* mysql_stmt_fetch() calls this function to fetch one row (it's different for buffered, unbuffered and cursor fetch). @@ -607,7 +609,7 @@ typedef struct st_mysql_methods MYSQL_FIELD * (*list_fields)(MYSQL *mysql); my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); int (*stmt_execute)(MYSQL_STMT *stmt); - MYSQL_DATA *(*read_binary_rows)(MYSQL_STMT *stmt); + int (*read_binary_rows)(MYSQL_STMT *stmt); int (*unbuffered_fetch)(MYSQL *mysql, char **row); void (*free_embedded_thd)(MYSQL *mysql); const char *(*read_statistics)(MYSQL *mysql); @@ -664,6 +666,7 @@ 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); my_bool STDCALL mysql_commit(MYSQL * mysql); my_bool STDCALL mysql_rollback(MYSQL * mysql); |