summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-05-26 21:40:27 +0500
committerunknown <hf@deer.(none)>2004-05-26 21:40:27 +0500
commit8fd378d65a60907b3f4c1c4e52611d9157f4a2ea (patch)
treeda6efb78f98da49c9e60050f45067be7a2860d8a /libmysqld
parent64fee753f698911b9a23a77008d45aa2d25caa31 (diff)
downloadmariadb-git-8fd378d65a60907b3f4c1c4e52611d9157f4a2ea.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 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc6
-rw-r--r--libmysqld/libmysqld.c12
-rw-r--r--libmysqld/libmysqld.def3
3 files changed, 18 insertions, 3 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 4a96cb64ce4..0ec7d161f24 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -23,6 +23,11 @@
#define mysql_unix_port mysql_inix_port1
#define mysql_port mysql_port1
+extern "C"
+{
+ unsigned long max_allowed_packet, net_buffer_length;
+}
+
#if defined (__WIN__)
#include "../sql/mysqld.cpp"
#else
@@ -315,7 +320,6 @@ extern "C"
static my_bool org_my_init_done;
my_bool server_inited;
-ulong max_allowed_packet, net_buffer_length;
char ** copy_arguments_ptr= 0;
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 2e8cd2a4861..6f60e4c4fbc 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -46,6 +46,9 @@
#define INADDR_NONE -1
#endif
+extern ulong net_buffer_length;
+extern ulong max_allowed_packet;
+
static my_bool mysql_client_init=0;
uint mysql_port=0;
my_string mysql_unix_port=0;
@@ -722,6 +725,15 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
return 0;
}
+static MYSQL_PARAMETERS mysql_internal_parameters=
+{&max_allowed_packet, &net_buffer_length};
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters()
+{
+ return &mysql_internal_parameters;
+}
+
+
/****************************************************************************
** Init MySQL structure or allocate one
****************************************************************************/
diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def
index 1c9bdea0a01..8db8a846562 100644
--- a/libmysqld/libmysqld.def
+++ b/libmysqld/libmysqld.def
@@ -63,6 +63,5 @@ EXPORTS
mysql_refresh
mysql_odbc_escape_string
myodbc_remove_escape
- net_buffer_length
- max_allowed_packet
get_tty_password
+ mysql_get_parameters