diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-01-06 12:43:18 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-01-06 12:43:18 +0100 |
commit | 17940b652d0a078f5a28b089aa0f5362756d438e (patch) | |
tree | 0c198251f33fd1b19ae2bb443a732496a3bf5ee3 /include/mysql.h.pp | |
parent | a5b881594da4258257b18cc42f5ce7be3524e02c (diff) | |
download | mariadb-git-17940b652d0a078f5a28b089aa0f5362756d438e.tar.gz |
MWL#192: non-blocking client API, after-review fixes.
Main change is that non-blocking operation is now an option that must be
explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...)
before any non-blocing operation can be used.
Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus
effectively ignored (it was not really useful anyway, and this simplifies
things when non-blocking mysql_real_connect() fails).
Diffstat (limited to 'include/mysql.h.pp')
-rw-r--r-- | include/mysql.h.pp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/mysql.h.pp b/include/mysql.h.pp index f66d92c06a1..ce5790b9346 100644 --- a/include/mysql.h.pp +++ b/include/mysql.h.pp @@ -257,7 +257,8 @@ enum mysql_option MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH, MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, - MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH + MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH, + MYSQL_OPT_NONBLOCK=6000 }; struct st_mysql_options_extention; struct st_mysql_options { @@ -318,7 +319,6 @@ typedef struct character_set } MY_CHARSET_INFO; struct st_mysql_methods; struct st_mysql_stmt; -struct st_mysql_extension; typedef struct st_mysql { NET net; @@ -354,7 +354,7 @@ typedef struct st_mysql void *thd; my_bool *unbuffered_fetch_owner; char *info_buffer; - struct st_mysql_extension *extension; + void *extension; } MYSQL; typedef struct st_mysql_res { my_ulonglong row_count; @@ -392,12 +392,6 @@ typedef struct st_mysql_parameters unsigned long *p_net_buffer_length; void *extension; } MYSQL_PARAMETERS; -typedef enum { - MYSQL_WAIT_READ= 1, - MYSQL_WAIT_WRITE= 2, - MYSQL_WAIT_EXCEPT= 4, - MYSQL_WAIT_TIMEOUT= 8 -} MYSQL_ASYNC_STATUS; int mysql_server_init(int argc, char **argv, char **groups); void mysql_server_end(void); MYSQL_PARAMETERS * mysql_get_parameters(void); @@ -776,6 +770,7 @@ my_bool mysql_more_results(MYSQL *mysql); int mysql_next_result(MYSQL *mysql); int mysql_next_result_start(int *ret, MYSQL *mysql); int mysql_next_result_cont(int *ret, MYSQL *mysql, int status); +void mysql_close_slow_part(MYSQL *mysql); void mysql_close(MYSQL *sock); int mysql_close_start(MYSQL *sock); int mysql_close_cont(MYSQL *sock, int status); |