diff options
author | unknown <hf@deer.(none)> | 2003-06-19 16:38:21 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-06-19 16:38:21 +0500 |
commit | cc0904178b3972a7c9fba37bd98c9bbb576be1e9 (patch) | |
tree | 8faf883d9ceccc3d8cba7fe249e3965648ffe334 /include | |
parent | 76ad2da59f2d66a85ea8f509108559ede271901c (diff) | |
download | mariadb-git-cc0904178b3972a7c9fba37bd98c9bbb576be1e9.tar.gz |
SCRUM
client code added to the embedded library
some fixes
include/mysql.h:
test code removed
simple_command is the macrodefinition now
libmysqld/embedded_priv.h:
this declaration obsolete
libmysqld/lib_sql.cc:
errors stored in the same place for embedded and client libraries now
sql-common/client.c:
we don't need that ugly wrapper
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/include/mysql.h b/include/mysql.h index a6bdb39e5ec..e4f1d283899 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -204,8 +204,6 @@ enum mysql_rpl_type struct st_mysql_methods; -#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) - typedef struct st_mysql { NET net; /* Communication parameters */ @@ -250,40 +248,13 @@ typedef struct st_mysql LIST *stmts; /* list of all statements */ const struct st_mysql_methods *methods; -#if !defined(CHECK_EMBEDDED_DIFFERENCES) struct st_mysql_res *result; void *thd; unsigned int last_errno; char *last_error; char sqlstate[SQLSTATE_LENGTH+1]; /* Used by embedded server */ -#endif } 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; /* Used by embedded server */ - char sqlstate[SQLSTATE_LENGTH+1]; /* Used by embedded server */ -} MYSQL; - -#endif - typedef struct st_mysql_res { my_ulonglong row_count; MYSQL_FIELD *fields; @@ -638,9 +609,9 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); They are not for general usage */ -my_bool -simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg, - unsigned long length, my_bool skip_check); +#define simple_command(mysql, command, arg, length, skip_check) \ + (*(mysql)->methods->advanced_command)(mysql, command, \ + NullS, 0, arg, length, skip_check) unsigned long net_safe_read(MYSQL* mysql); void mysql_once_init(void); |