summaryrefslogtreecommitdiff
path: root/include/mysql.h
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-05-26 21:40:27 +0500
committerhf@deer.(none) <>2004-05-26 21:40:27 +0500
commit78f58ff38494c6483fd63e9f9d8824b34ebdbc44 (patch)
treeda6efb78f98da49c9e60050f45067be7a2860d8a /include/mysql.h
parent9a5dafba83c9135656727ab9e3236703fe49361d (diff)
downloadmariadb-git-78f58ff38494c6483fd63e9f9d8824b34ebdbc44.tar.gz
Fix to make Windows compilation smoother
Diffstat (limited to 'include/mysql.h')
-rw-r--r--include/mysql.h13
1 files changed, 13 insertions, 0 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