diff options
Diffstat (limited to 'include/mysql.h')
-rw-r--r-- | include/mysql.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/include/mysql.h b/include/mysql.h index ce321f5b5ea..acf0618c8e8 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -114,6 +114,9 @@ typedef struct st_mysql_data { unsigned int fields; MYSQL_ROWS *data; MEM_ROOT alloc; +#ifdef EMBEDDED_LIBRARY + MYSQL_ROWS **prev_ptr; +#endif } MYSQL_DATA; struct st_mysql_options { @@ -145,6 +148,9 @@ struct st_mysql_options { a read that is replication-aware */ my_bool no_master_reads; +#ifdef EMBEDDED_LIBRARY + my_bool separate_thread; +#endif char *shared_memory_base_name; unsigned int protocol; }; @@ -154,6 +160,9 @@ enum mysql_option MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME +#ifdef EMBEDDED_LIBRARY + , MYSQL_OPT_USE_RESULT +#endif }; enum mysql_status @@ -177,12 +186,14 @@ enum mysql_rpl_type }; +#ifndef EMBEDDED_LIBRARY + typedef struct st_mysql { NET net; /* Communication parameters */ gptr connector_fd; /* ConnectorFd for SSL */ - char *host,*user,*passwd,*unix_socket,*server_version,*host_info, - *info,*db; + char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info; + char *db; struct charset_info_st *charset; MYSQL_FIELD *fields; MEM_ROOT field_alloc; @@ -221,6 +232,29 @@ typedef struct st_mysql LIST *stmts; /* list of all statements */ } MYSQL; +#else + +struct st_mysql_res; + +typedef struct st_mysql +{ + struct st_mysql_res *result; + void *thd; + struct charset_info_st *charset; + unsigned int server_language; + MYSQL_FIELD *fields; + MEM_ROOT field_alloc; + my_ulonglong affected_rows; + unsigned int field_count; + struct st_mysql_options options; + enum mysql_status status; + my_bool free_me; /* If free in mysql_close */ + my_ulonglong insert_id; /* id if insert on table with NEXTNR */ + unsigned int last_errno; + char *last_error; +} MYSQL; + +#endif typedef struct st_mysql_res { my_ulonglong row_count; |