diff options
Diffstat (limited to 'include/mysql.h')
-rw-r--r-- | include/mysql.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/mysql.h b/include/mysql.h index 0949937814c..143f6752c46 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -216,6 +216,7 @@ enum mysql_rpl_type }; struct st_mysql_methods; +struct st_mysql_stmt; typedef struct st_mysql { @@ -269,6 +270,12 @@ typedef struct st_mysql from mysql_stmt_close if close had to cancel result set of this object. */ my_bool *unbuffered_fetch_owner; + /* + In embedded server it points to the statement that is processed + in the current query. We store some results directly in statement + fields then. + */ + struct st_mysql_stmt *current_stmt; } MYSQL; typedef struct st_mysql_res { @@ -636,7 +643,8 @@ typedef struct st_mysql_methods unsigned long header_length, const char *arg, unsigned long arg_length, - my_bool skip_check); + my_bool skip_check, + MYSQL_STMT *stmt); MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, unsigned int fields); MYSQL_RES * (*use_result)(MYSQL *mysql); @@ -724,8 +732,11 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); */ #define simple_command(mysql, command, arg, length, skip_check) \ - (*(mysql)->methods->advanced_command)(mysql, command, \ - NullS, 0, arg, length, skip_check) + (*(mysql)->methods->advanced_command)(mysql, command, NullS, \ + 0, arg, length, skip_check, NULL) +#define stmt_command(mysql, command, arg, length, stmt) \ + (*(mysql)->methods->advanced_command)(mysql, command, NullS, \ + 0, arg, length, 1, stmt) unsigned long net_safe_read(MYSQL* mysql); #ifdef __NETWARE__ |