1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
client capabilities included into libmysqld
some API methods became "virtual"
lots of duplicated code removed

IMHO all the above made library's code way more pleasant to look at, didn't it?


BitKeeper/deleted/.del-lib_vio.c~d779731a1e391220:
  Delete: libmysqld/lib_vio.c
BitKeeper/etc/ignore:
  Added libmysqld/client.c libmysqld/client_settings.h libmysqld/libmysql.c libmysqld/pack.c to the ignore list
client/mysqltest.c:
  we don't need this now
include/mysql.h:
  MYSQL and related structures unified
  four methods made "virtual"
  relative wrappers added
include/mysql_com.h:
  todo added
include/mysql_embed.h:
  now we include implementations of Vio structure in libmysqld
include/sql_common.h:
  declarations changed
include/violite.h:
  implementation of Vio included in libmysqld
libmysql/client_settings.h:
  changes to make this working with both client and embedded
libmysql/libmysql.c:
  global variables and my_net_local_init moved to sql-common/pack.c
libmysqld/Makefile.am:
  libmysql.c, client.c, pack.c symlinked and added to sources
  lib_vio.c removed
libmysqld/examples/Makefile.am:
  now we need CLIENT_LIBS here
libmysqld/lib_sql.cc:
  code duplications removed
  emb_advanced_command was made from simple_command
libmysqld/libmysqld.c:
  duplicated code removed
sql-common/client.c:
  code trimmed with new model of calling
sql-common/pack.c:
  some code moved here from libmysql.c and protocol.cc
sql/client_settings.h:
  we don't need mysql_use_result for mini_client
sql/net_serv.cc:
  file included in embedded server
sql/protocol.cc:
  code moved to sql-common/pack.c
This commit is contained in:
unknown
2003-06-17 21:32:31 +05:00
parent 5551e0df2a
commit ef726bbff3
19 changed files with 217 additions and 1568 deletions

View File

@ -47,9 +47,10 @@ static bool check_user(THD *thd, enum_server_command command,
char * get_mysql_home(){ return mysql_home;};
char * get_mysql_real_data_home(){ return mysql_real_data_home;};
my_bool simple_command(MYSQL *mysql,enum enum_server_command command,
const char *arg,
ulong length, my_bool skipp_check)
my_bool
emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check)
{
my_bool result= 1;
THD *thd=(THD *) mysql->thd;
@ -67,9 +68,9 @@ my_bool simple_command(MYSQL *mysql,enum enum_server_command command,
mysql->affected_rows= ~(my_ulonglong) 0;
thd->store_globals(); // Fix if more than one connect
result= dispatch_command(command, thd, (char *) arg, length + 1);
result= dispatch_command(command, thd, (char *) arg, arg_length + 1);
if (!skipp_check)
if (!skip_check)
result= thd->net.last_errno ? -1 : 0;
mysql->last_error= thd->net.last_error;
@ -144,7 +145,6 @@ char **copy_arguments(int argc, char **argv)
extern "C"
{
ulong max_allowed_packet, net_buffer_length;
char ** copy_arguments_ptr= 0;
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
@ -281,21 +281,6 @@ void STDCALL mysql_server_end()
my_end(0);
}
my_bool STDCALL mysql_thread_init()
{
#ifdef THREAD
return my_thread_init();
#else
return 0;
#endif
}
void STDCALL mysql_thread_end()
{
#ifdef THREAD
my_thread_end();
#endif
}
} /* extern "C" */
C_MODE_START
@ -454,11 +439,6 @@ send_eof(THD *thd, bool no_flush)
{
}
uint STDCALL mysql_warning_count(MYSQL *mysql)
{
return ((THD *)mysql->thd)->total_warn_count;
}
void Protocol_simple::prepare_for_resend()
{
MYSQL_ROWS *cur;