1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -875,7 +875,7 @@ void clean_up(bool print_message)
DBUG_PRINT("exit",("clean_up"));
if (cleanup_done++)
return; /* purecov: inspected */
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
if (use_slave_mask)
bitmap_free(&slave_error_mask);
#endif
@ -900,14 +900,14 @@ void clean_up(bool print_message)
free_defaults(defaults_argv);
my_free(charsets_list, MYF(MY_ALLOW_ZERO_PTR));
free_tmpdir(&mysql_tmpdir_list);
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
my_free(slave_load_tmpdir,MYF(MY_ALLOW_ZERO_PTR));
#endif
x_free(opt_bin_logname);
x_free(opt_relay_logname);
bitmap_free(&temp_pool);
free_max_user_conn();
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
end_slave_list();
#endif
#ifdef USE_REGEX
@ -1948,7 +1948,7 @@ static int init_thread_environement()
(void) pthread_mutex_init(&LOCK_bytes_received,MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_timezone,MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_user_conn, MY_MUTEX_INIT_FAST);
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
(void) pthread_mutex_init(&LOCK_rpl_status, MY_MUTEX_INIT_FAST);
#endif
(void) pthread_mutex_init(&LOCK_active_mi, MY_MUTEX_INIT_FAST);
@ -1959,7 +1959,7 @@ static int init_thread_environement()
(void) pthread_cond_init(&COND_thread_cache,NULL);
(void) pthread_cond_init(&COND_flush_thread_cache,NULL);
(void) pthread_cond_init(&COND_manager,NULL);
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
(void) pthread_cond_init(&COND_rpl_status, NULL);
#endif
/* Parameter for threads created for connections */
@ -2008,7 +2008,7 @@ static int init_server_components()
randominit(&sql_rand,(ulong) start_time,(ulong) start_time/2);
reset_floating_point_exceptions();
init_thr_lock();
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
init_slave_list();
#endif
/* Setup log files */
@ -2269,6 +2269,7 @@ The server will not act as a slave.");
if (opt_bootstrap)
{
printf("###stdin as bootstrap\n");
int error=bootstrap(stdin);
end_thr_alarm(); // Don't allow alarms
unireg_abort(error ? 1 : 0);
@ -2338,6 +2339,7 @@ The server will not act as a slave.");
#endif /* EMBEDDED_LIBRARY */
/****************************************************************************
Main and thread entry function for Win32
(all this is needed only to run mysqld as a service on WinNT)
@ -3498,7 +3500,7 @@ struct my_option my_long_options[] =
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"memlock", OPT_MEMLOCK, "Lock mysqld in memory", (gptr*) &locked_in_memory,
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
{"disconnect-slave-event-count", OPT_DISCONNECT_SLAVE_EVENT_COUNT,
"Option used by mysql-test for debugging and testing of replication",
(gptr*) &disconnect_slave_event_count,
@ -3517,7 +3519,7 @@ struct my_option my_long_options[] =
(gptr*) &opt_sporadic_binlog_dump_fail,
(gptr*) &opt_sporadic_binlog_dump_fail, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
#endif /* EMBEDDED_LIBRARY */
#endif /* HAVE_REPLICATION */
{"safemalloc-mem-limit", OPT_SAFEMALLOC_MEM_LIMIT,
"Simulate memory shortage when compiled with the --with-debug=full option",
0, 0, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@ -3660,7 +3662,7 @@ struct my_option my_long_options[] =
{"relay-log-info-file", OPT_RELAY_LOG_INFO_FILE, "Undocumented",
(gptr*) &relay_log_info_file, (gptr*) &relay_log_info_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
{"slave-load-tmpdir", OPT_SLAVE_LOAD_TMPDIR, "Undocumented",
(gptr*) &slave_load_tmpdir, (gptr*) &slave_load_tmpdir, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@ -3995,7 +3997,7 @@ struct my_option my_long_options[] =
(gptr*) &global_system_variables.read_buff_size,
(gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE, 0},
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
{"relay_log_space_limit", OPT_RELAY_LOG_SPACE_LIMIT,
"Max space to use for all relay logs",
(gptr*) &relay_log_space_limit,
@ -4354,7 +4356,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'o':
protocol_version=PROTOCOL_VERSION-1;
break;
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
case OPT_SLAVE_SKIP_ERRORS:
init_slave_skip_errors(argument);
break;
@ -4398,7 +4400,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case (int) OPT_BIN_LOG:
opt_bin_log=1;
break;
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
case (int) OPT_INIT_RPL_ROLE:
{
int role;
@ -4523,7 +4525,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_reckless_slave = 1;
init_slave_skip_errors("all");
break;
#endif /* EMBEDDED_LIBRARY */
#endif /* HAVE_REPLICATION */
case (int) OPT_SLOW_QUERY_LOG:
opt_slow_log=1;
break;
@ -4900,7 +4902,7 @@ static void fix_paths(void)
if (init_tmpdir(&mysql_tmpdir_list, opt_mysql_tmpdir))
exit(1);
#ifndef EMBEDDED_LIBRARY
#ifdef HAVE_REPLICATION
if (!slave_load_tmpdir)
{
if (!(slave_load_tmpdir = (char*) my_strdup(mysql_tmpdir, MYF(MY_FAE))))