summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/Makefile.am2
-rw-r--r--libmysqld/WHITEPAPER16
-rwxr-xr-xlibmysqld/examples/test-run1
-rw-r--r--libmysqld/lib_sql.cc18
-rw-r--r--libmysqld/lib_vio.c31
-rw-r--r--libmysqld/libmysqld.c37
6 files changed, 42 insertions, 63 deletions
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 6e02f24af8a..7c4197afb32 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -50,7 +50,7 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
sql_crypt.cc sql_db.cc sql_delete.cc sql_insert.cc sql_lex.cc \
sql_list.cc sql_manager.cc sql_map.cc sql_parse.cc \
- sql_rename.cc sql_repl.cc sql_select.cc sql_show.cc \
+ sql_rename.cc sql_repl.cc sql_select.cc sql_do.cc sql_show.cc \
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \
unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc
diff --git a/libmysqld/WHITEPAPER b/libmysqld/WHITEPAPER
deleted file mode 100644
index 191cdb4e0fd..00000000000
--- a/libmysqld/WHITEPAPER
+++ /dev/null
@@ -1,16 +0,0 @@
-LIBRARY VERSION DESIGN (EMBEDDED SERVER)
-
-
-- The library version of MySQL server is the client library that contains embedded server.
-
-- This client DLL has name : libmysqlclient_e (.la)
-
-- The client application that supposed to use MySQL LV need to be rebuilt against libmysqlclient_e.la. The rebuild process is necessary, because libmysqlclient_e is a LIBTOOL object, which has the different LIBS list compared to the original libmysqlclient.la.
-
-- The client and the server code run in the same process and the same thread;
-
-- The server code is invoked when client writes the command to the net, and when connection is established;
-
-
-
-
diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run
index d525c7a14a3..c7434488259 100755
--- a/libmysqld/examples/test-run
+++ b/libmysqld/examples/test-run
@@ -78,6 +78,7 @@ if test $clean = 1
then
rm -f $datadir/ib_* $datadir/ibdata*
rm -f $datadir/log.00*
+ rm -f $datadir/test/*.db
fi
rm -f $datadir/../tmp/*
rm -f test-gdbinit
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index d4072f73522..ed666659af1 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -61,7 +61,7 @@ bool lib_dispatch_command(enum enum_server_command command, NET *net,
thd->store_globals(); // Fix if more than one connect
thd->net.last_error[0]=0; // Clear error message
thd->net.last_errno=0;
-
+
net_new_transaction(&thd->net);
return dispatch_command(command, thd, (char *) arg, length + 1);
}
@@ -156,7 +156,7 @@ check_connections1(THD *thd)
/* nasty, but any other way? */
uint pkt_len = 0;
-
+
char buff[80],*end;
int client_flags = CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB |
CLIENT_TRANSACTIONS;
@@ -296,7 +296,7 @@ extern "C"
static my_bool inited, org_my_init_done;
-int mysql_server_init(int argc, char **argv, char **groups)
+int STDCALL mysql_server_init(int argc, char **argv, char **groups)
{
char glob_hostname[FN_REFLEN];
@@ -448,7 +448,7 @@ int mysql_server_init(int argc, char **argv, char **groups)
#ifdef USE_REGEX
regex_init();
#endif
- if (use_temp_pool && bitmap_init(&temp_pool,1024))
+ if (use_temp_pool && bitmap_init(&temp_pool,1024,1))
{
mysql_server_end();
return 1;
@@ -460,7 +460,7 @@ int mysql_server_init(int argc, char **argv, char **groups)
umask(((~my_umask) & 0666));
table_cache_init();
hostname_cache_init();
- sql_cache_init();
+ /*sql_cache_init();*/
randominit(&sql_rand,(ulong) start_time,(ulong) start_time/2);
reset_floating_point_exceptions();
init_thr_lock();
@@ -489,7 +489,7 @@ int mysql_server_init(int argc, char **argv, char **groups)
LOG_BIN);
using_update_log=1;
}
-
+
if (opt_slow_log)
open_log(&mysql_slow_log, glob_hostname, opt_slow_logname, "-slow.log",
LOG_NORMAL);
@@ -561,7 +561,7 @@ int mysql_server_init(int argc, char **argv, char **groups)
}
-void mysql_server_end()
+void STDCALL mysql_server_end()
{
clean_up(0);
#ifdef THREAD
@@ -571,7 +571,7 @@ void mysql_server_end()
#endif
}
-my_bool mysql_thread_init()
+my_bool STDCALL mysql_thread_init()
{
#ifdef THREAD
return my_thread_init();
@@ -580,7 +580,7 @@ my_bool mysql_thread_init()
#endif
}
-void mysql_thread_end()
+void STDCALL mysql_thread_end()
{
#ifdef THREAD
my_thread_end();
diff --git a/libmysqld/lib_vio.c b/libmysqld/lib_vio.c
index 270b08ef51d..a6723f8322e 100644
--- a/libmysqld/lib_vio.c
+++ b/libmysqld/lib_vio.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Note that we can't have assertion on file descriptors; The reason for
@@ -110,7 +109,7 @@ int vio_read(Vio * vio, gptr buf, int size)
vio->reading = 1;
if (vio->where_in_packet >= vio->end_of_packet)
{
- dbug_assert(vio->packets);
+ DBUG_ASSERT(vio->packets);
vio->where_in_packet = vio->packets + sizeof(char *) + 4;
vio->end_of_packet = vio->where_in_packet +
uint4korr(vio->packets + sizeof(char *));
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 49f467da601..82928434cc6 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "embedded_priv.h"
#include <my_sys.h>
@@ -971,9 +970,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
}
if (my_net_write(net,buff,(ulong) (end-buff)) || net_flush(net))
goto error;
-
+
lib_connection_phase(net,2);
-
+
if( net_safe_read(mysql) == packet_error)
goto error;
if (db && mysql_select_db(mysql,db))
@@ -2090,7 +2089,3 @@ myodbc_remove_escape(MYSQL *mysql,char *name)
}
*to=0;
}
-
-
-
-