diff options
author | unknown <hf@deer.(none)> | 2004-05-26 21:40:27 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-05-26 21:40:27 +0500 |
commit | 00c41b28504728ecdce90a3a2975102e401a3bfc (patch) | |
tree | da6efb78f98da49c9e60050f45067be7a2860d8a /include | |
parent | 3b1dd9af7b1ba6645bf8c5594ee456ca62d0f4c0 (diff) | |
download | mariadb-git-00c41b28504728ecdce90a3a2975102e401a3bfc.tar.gz |
Fix to make Windows compilation smoother
VC++Files/innobase/innobase.dsp:
non-existent file removed
client/mysql.cc:
local opt_max_allowed_packet and opt_net_buffer_length introduced
client/mysqldump.c:
local opt_max_allowed_packet and opt_net_buffer_length introduced
include/mysql.h:
mysql_get_parameters() interface added
#define max_allowed_packet added
include/mysql_com.h:
these should not be exported
libmysql/libmysql.c:
mysql_get_parameters implementations
libmysql/libmysql.def:
interface changed
libmysql_r/Makefile.am:
MYSQL_CLIENT define added
libmysqld/lib_sql.cc:
line moved to be above the '#include "mysql.cc"'
libmysqld/libmysqld.c:
mysql_get_parameters implementation (embedded)
libmysqld/libmysqld.def:
interface changed
sql/log_event.cc:
should be like that in this case
tools/mysqlmanager.c:
compiler warns on this line
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 13 | ||||
-rw-r--r-- | include/mysql_com.h | 9 |
2 files changed, 13 insertions, 9 deletions
diff --git a/include/mysql.h b/include/mysql.h index 3ffc014c449..1665dd5027e 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -244,6 +244,17 @@ typedef struct st_mysql_manager char last_error[MAX_MYSQL_MANAGER_ERR]; } MYSQL_MANAGER; +typedef struct st_mysql_parameters +{ + unsigned long *p_max_allowed_packet; + unsigned long *p_net_buffer_length; +} MYSQL_PARAMETERS; + +#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) +#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) +#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) +#endif + /* Set up and bring down the server; to ensure that applications will work when linked against either the standard client library or the @@ -252,6 +263,8 @@ typedef struct st_mysql_manager int STDCALL mysql_server_init(int argc, char **argv, char **groups); void STDCALL mysql_server_end(void); +MYSQL_PARAMETERS *STDCALL mysql_get_parameters(); + /* Set up and bring down a thread; these function should be called for each thread in an application which opens at least one MySQL diff --git a/include/mysql_com.h b/include/mysql_com.h index c81c90dec22..94b864375ba 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -34,12 +34,6 @@ #define MYSQL_SERVICENAME "MySQL" #endif /* __WIN__ */ -#if defined(__WIN__) && !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) && !defined(EMBEDDED_LIBRARY) -#define dll_import_spec __declspec( dllimport ) -#else -#define dll_import_spec -#endif - enum enum_server_command { COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, @@ -229,9 +223,6 @@ typedef struct st_udf_init extern "C" { #endif -dll_import_spec extern unsigned long max_allowed_packet; -dll_import_spec extern unsigned long net_buffer_length; - void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); double my_rnd(struct rand_struct *); |