1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
embedded library trimming


include/my_global.h:
  HAVE_REPLICATION & HAVE_EXTERNAL_CLIENT macro definitions
libmysqld/lib_sql.cc:
  Protocol:: methods implementation for embedded case
sql/field.cc:
  geometry type methods implementations
sql/ha_berkeley.cc:
  set_nfields deletion
sql/ha_innodb.cc:
  macro changed
sql/ha_myisam.cc:
  set_nfields deletion
sql/ha_myisam.h:
  code #ifdef-ed
sql/item.cc:
  bugfix
sql/item_func.cc:
  macro changed
sql/item_strfunc.cc:
  superfluous code deleted
sql/log.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/log_event.cc:
  #ifdef constructions changed
sql/log_event.h:
  #ifdef-s changed
sql/mf_iocache.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/mini_client.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/mysql_priv.h:
  code removation
sql/mysqld.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/opt_range.cc:
  code trimming
sql/protocol.cc:
  net_store_data becomes a member of Protocol
sql/protocol.h:
  changes to make Protocol working in embedded library
sql/repl_failsafe.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/repl_failsafe.h:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/set_var.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/slave.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/slave.h:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/sql_parse.cc:
  code trimming
sql/sql_prepare.cc:
  comment added
sql/sql_repl.cc:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/sql_repl.h:
  HAVE_REPLICATION instead of EMBEDDED_LIBRARY
sql/sql_show.cc:
  mysql_list_processes to work in embedded library
sql/sql_table.cc:
  set_nfields deletion
This commit is contained in:
unknown
2003-01-15 12:11:44 +04:00
parent 1bc932384b
commit 09b79b65f2
31 changed files with 326 additions and 331 deletions

View File

@ -52,6 +52,7 @@ extern struct st_VioSSLAcceptorFd * ssl_acceptor_fd;
** Send list of databases
** A database is a directory in the mysql_data_home directory
****************************************************************************/
int
mysqld_show_dbs(THD *thd,const char *wild)
{
@ -648,6 +649,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
/***************************************************************************
** List all columns in a table_list->real_name
***************************************************************************/
int
mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
bool verbose)
@ -1240,7 +1242,6 @@ public:
template class I_List<thread_info>;
#endif
#ifndef EMBEDDED_LIBRARY
void mysqld_list_processes(THD *thd,const char *user, bool verbose)
{
Item *field;
@ -1272,8 +1273,13 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
THD *tmp;
while ((tmp=it++))
{
#ifndef EMBEDDED_LIBRARY
if ((tmp->net.vio || tmp->system_thread) &&
(!user || (tmp->user && !strcmp(tmp->user,user))))
#else
if (tmp->system_thread &&
(!user || (tmp->user && !strcmp(tmp->user,user))))
#endif
{
thread_info *thd_info=new thread_info;
@ -1291,6 +1297,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
if (tmp->mysys_var)
pthread_mutex_lock(&tmp->mysys_var->mutex);
thd_info->proc_info= (char*) (tmp->killed ? "Killed" : 0);
#ifndef EMBEDDED_LIBRARY
thd_info->state_info= (char*) (tmp->locked ? "Locked" :
tmp->net.reading_or_writing ?
(tmp->net.reading_or_writing == 2 ?
@ -1301,6 +1308,9 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
tmp->mysys_var &&
tmp->mysys_var->current_cond ?
"Waiting on cond" : NullS);
#else
thd_info->state_info= (char*)"Writing to net";
#endif
if (tmp->mysys_var)
pthread_mutex_unlock(&tmp->mysys_var->mutex);
@ -1353,12 +1363,6 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
send_eof(thd);
DBUG_VOID_RETURN;
}
#else /* EMBEDDED_LIBRARY */
void mysqld_list_processes(THD *thd __attribute__(unused),
const char *user __attribute__(unused),
bool verbose __attribute__(unused))
{}
#endif
/*****************************************************************************
Status functions
@ -1666,6 +1670,8 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
case SHOW_UNDEF: // Show never happen
case SHOW_SYS:
break; // Return empty string
default:
break;
}
if (protocol->store(pos, (uint32) (end - pos)) ||
protocol->write())