#At file:///home/cpowers/work/dev/base-wl4896/mysql/ based on revid:chris.powers@stripped
3157 Christopher Powers 2010-08-03
merge
modified:
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
sql/mysqld.cc
storage/perfschema/pfs_engine_table.h
=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp 2010-07-29 19:56:17 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp 2010-08-03 21:34:06 +0000
@@ -1,5 +1,6 @@
#include "mysql/psi/psi.h"
C_MODE_START
+struct TABLE_SHARE;
struct PSI_mutex;
struct PSI_rwlock;
struct PSI_cond;
@@ -7,7 +8,7 @@ struct PSI_table_share;
struct PSI_table;
struct PSI_thread;
struct PSI_file;
-struct PSI_socket;
+struct PSI_table_locker;
struct PSI_bootstrap
{
void* (*get_interface)(int version);
@@ -53,26 +54,20 @@ enum PSI_file_operation
PSI_FILE_RENAME= 15,
PSI_FILE_SYNC= 16
};
-enum PSI_socket_operation
+enum PSI_table_operation
{
- PSI_SOCKET_CREATE= 0,
- PSI_SOCKET_CONNECT= 1,
- PSI_SOCKET_BIND= 2,
- PSI_SOCKET_CLOSE= 3,
- PSI_SOCKET_SEND= 4,
- PSI_SOCKET_RECV= 5,
- PSI_SOCKET_SEEK= 6,
- PSI_SOCKET_OPT= 7,
- PSI_SOCKET_STAT= 8,
- PSI_SOCKET_SHUTDOWN= 9
+ PSI_TABLE_LOCK= 0,
+ PSI_TABLE_EXTERNAL_LOCK= 1,
+ PSI_TABLE_FETCH_ROW= 2,
+ PSI_TABLE_WRITE_ROW= 3,
+ PSI_TABLE_UPDATE_ROW= 4,
+ PSI_TABLE_DELETE_ROW= 5
};
-struct PSI_table_locker;
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
typedef unsigned int PSI_cond_key;
typedef unsigned int PSI_thread_key;
typedef unsigned int PSI_file_key;
-typedef unsigned int PSI_socket_key;
struct PSI_mutex_info_v1
{
PSI_mutex_key *m_key;
@@ -103,11 +98,71 @@ struct PSI_file_info_v1
const char *m_name;
int m_flags;
};
-struct PSI_socket_info_v1
+struct PSI_mutex_locker_state_v1
{
- PSI_socket_key *m_key;
- const char *m_name;
- int m_flags;
+ uint m_flags;
+ struct PSI_mutex *m_mutex;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_mutex_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
+struct PSI_rwlock_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_rwlock *m_rwlock;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_rwlock_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
+struct PSI_cond_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_cond *m_cond;
+ struct PSI_mutex *m_mutex;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_cond_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
+struct PSI_file_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_file *m_file;
+ struct PSI_thread *m_thread;
+ size_t m_number_of_bytes;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_file_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
+struct PSI_table_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_table *m_table;
+ struct PSI_table_share *m_table_share;
+ void *m_class;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_table_operation m_operation;
+ uint m_index;
+ uint m_lock_index;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
};
typedef void (*register_mutex_v1_t)
(const char *category, struct PSI_mutex_info_v1 *info, int count);
@@ -119,8 +174,6 @@ typedef void (*register_thread_v1_t)
(const char *category, struct PSI_thread_info_v1 *info, int count);
typedef void (*register_file_v1_t)
(const char *category, struct PSI_file_info_v1 *info, int count);
-typedef void (*register_socket_v1_t)
- (const char *category, struct PSI_socket_info_v1 *info, int count);
typedef struct PSI_mutex* (*init_mutex_v1_t)
(PSI_mutex_key key, const void *identity);
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
@@ -130,13 +183,12 @@ typedef void (*destroy_rwlock_v1_t)(stru
typedef struct PSI_cond* (*init_cond_v1_t)
(PSI_cond_key key, const void *identity);
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
-typedef struct PSI_socket* (*init_socket_v1_t)
- (PSI_socket_key key, const void *identity);
-typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
typedef struct PSI_table_share* (*get_table_share_v1_t)
- (const char *schema_name, int schema_name_length, const char *table_name,
- int table_name_length, const void *identity);
+ (my_bool temporary, struct TABLE_SHARE *share);
typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
+typedef void (*drop_table_share_v1_t)
+ (const char *schema_name, int schema_name_length,
+ const char *table_name, int table_name_length);
typedef struct PSI_table* (*open_table_v1_t)
(struct PSI_table_share *share, const void *identity);
typedef void (*close_table_v1_t)(struct PSI_table *table);
@@ -155,31 +207,38 @@ typedef void (*set_thread_v1_t)(struct P
typedef void (*delete_current_thread_v1_t)(void);
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
- (struct PSI_mutex *mutex, enum PSI_mutex_operation op);
+ (struct PSI_mutex_locker_state_v1 *state,
+ struct PSI_mutex *mutex,
+ enum PSI_mutex_operation op);
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
- (struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op);
+ (struct PSI_rwlock_locker_state_v1 *state,
+ struct PSI_rwlock *rwlock,
+ enum PSI_rwlock_operation op);
typedef struct PSI_cond_locker* (*get_thread_cond_locker_v1_t)
- (struct PSI_cond *cond, struct PSI_mutex *mutex,
+ (struct PSI_cond_locker_state_v1 *state,
+ struct PSI_cond *cond, struct PSI_mutex *mutex,
enum PSI_cond_operation op);
typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
- (struct PSI_table *table);
+ (struct PSI_table_locker_state_v1 *state,
+ struct PSI_table *table, enum PSI_table_operation op, ulong flags);
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
- (PSI_file_key key, enum PSI_file_operation op, const char *name,
+ (struct PSI_file_locker_state_v1 *state,
+ PSI_file_key key, enum PSI_file_operation op, const char *name,
const void *identity);
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
- (struct PSI_file *file, enum PSI_file_operation op);
+ (struct PSI_file_locker_state_v1 *state,
+ struct PSI_file *file, enum PSI_file_operation op);
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
- (File file, enum PSI_file_operation op);
-typedef struct PSI_socket_locker* (*get_thread_socket_locker_v1_t)
- (struct PSI_socket *socket, enum PSI_socket_operation op);
+ (struct PSI_file_locker_state_v1 *state,
+ File file, enum PSI_file_operation op);
typedef void (*unlock_mutex_v1_t)
- (struct PSI_thread *thread, struct PSI_mutex *mutex);
+ (struct PSI_mutex *mutex);
typedef void (*unlock_rwlock_v1_t)
- (struct PSI_thread *thread, struct PSI_rwlock *rwlock);
+ (struct PSI_rwlock *rwlock);
typedef void (*signal_cond_v1_t)
- (struct PSI_thread *thread, struct PSI_cond *cond);
+ (struct PSI_cond *cond);
typedef void (*broadcast_cond_v1_t)
- (struct PSI_thread *thread, struct PSI_cond *cond);
+ (struct PSI_cond *cond);
typedef void (*start_mutex_wait_v1_t)
(struct PSI_mutex_locker *locker, const char *src_file, uint src_line);
typedef void (*end_mutex_wait_v1_t)
@@ -197,7 +256,7 @@ typedef void (*start_cond_wait_v1_t)
typedef void (*end_cond_wait_v1_t)
(struct PSI_cond_locker *locker, int rc);
typedef void (*start_table_wait_v1_t)
- (struct PSI_table_locker *locker, const char *src_file, uint src_line);
+ (struct PSI_table_locker *locker, uint index, const char *src_file, uint src_line);
typedef void (*end_table_wait_v1_t)(struct PSI_table_locker *locker);
typedef struct PSI_file* (*start_file_open_wait_v1_t)
(struct PSI_file_locker *locker, const char *src_file, uint src_line);
@@ -209,18 +268,6 @@ typedef void (*start_file_wait_v1_t)
const char *src_file, uint src_line);
typedef void (*end_file_wait_v1_t)
(struct PSI_file_locker *locker, size_t count);
-typedef void (*start_socket_wait_v1_t)
- (struct PSI_socket_locker *locker,
- const char *src_file, uint src_line);
-typedef void (*end_socket_wait_v1_t)
- (struct PSI_socket_locker *locker);
-typedef void (*set_socket_descriptor_v1_t)(struct PSI_socket *socket,
- uint fd);
-typedef void (*set_socket_address_v1_t)(struct PSI_socket *socket,
- const struct sockaddr * addr);
-typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
- uint fd,
- const struct sockaddr * addr);
struct PSI_v1
{
register_mutex_v1_t register_mutex;
@@ -228,17 +275,15 @@ struct PSI_v1
register_cond_v1_t register_cond;
register_thread_v1_t register_thread;
register_file_v1_t register_file;
- register_socket_v1_t register_socket;
init_mutex_v1_t init_mutex;
destroy_mutex_v1_t destroy_mutex;
init_rwlock_v1_t init_rwlock;
destroy_rwlock_v1_t destroy_rwlock;
init_cond_v1_t init_cond;
destroy_cond_v1_t destroy_cond;
- init_socket_v1_t init_socket;
- destroy_socket_v1_t destroy_socket;
get_table_share_v1_t get_table_share;
release_table_share_v1_t release_table_share;
+ drop_table_share_v1_t drop_table_share;
open_table_v1_t open_table;
close_table_v1_t close_table;
create_file_v1_t create_file;
@@ -256,7 +301,6 @@ struct PSI_v1
get_thread_file_name_locker_v1_t get_thread_file_name_locker;
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
- get_thread_socket_locker_v1_t get_thread_socket_locker;
unlock_mutex_v1_t unlock_mutex;
unlock_rwlock_v1_t unlock_rwlock;
signal_cond_v1_t signal_cond;
@@ -277,11 +321,6 @@ struct PSI_v1
end_file_open_wait_and_bind_to_descriptor;
start_file_wait_v1_t start_file_wait;
end_file_wait_v1_t end_file_wait;
- start_socket_wait_v1_t start_socket_wait;
- end_socket_wait_v1_t end_socket_wait;
- set_socket_descriptor_v1_t set_socket_descriptor;
- set_socket_address_v1_t set_socket_address;
- set_socket_info_v1_t set_socket_info;
};
typedef struct PSI_v1 PSI;
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
@@ -289,6 +328,10 @@ typedef struct PSI_rwlock_info_v1 PSI_rw
typedef struct PSI_cond_info_v1 PSI_cond_info;
typedef struct PSI_thread_info_v1 PSI_thread_info;
typedef struct PSI_file_info_v1 PSI_file_info;
-typedef struct PSI_socket_info_v1 PSI_socket_info;
+typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END
=== modified file 'include/mysql/psi/psi_abi_v2.h.pp'
--- a/include/mysql/psi/psi_abi_v2.h.pp 2010-06-22 23:02:37 +0000
+++ b/include/mysql/psi/psi_abi_v2.h.pp 2010-08-03 21:34:06 +0000
@@ -1,5 +1,6 @@
#include "mysql/psi/psi.h"
C_MODE_START
+struct TABLE_SHARE;
struct PSI_mutex;
struct PSI_rwlock;
struct PSI_cond;
@@ -7,7 +8,7 @@ struct PSI_table_share;
struct PSI_table;
struct PSI_thread;
struct PSI_file;
-struct PSI_socket;
+struct PSI_table_locker;
struct PSI_bootstrap
{
void* (*get_interface)(int version);
@@ -53,26 +54,20 @@ enum PSI_file_operation
PSI_FILE_RENAME= 15,
PSI_FILE_SYNC= 16
};
-enum PSI_socket_operation
+enum PSI_table_operation
{
- PSI_SOCKET_CREATE= 0,
- PSI_SOCKET_CONNECT= 1,
- PSI_SOCKET_BIND= 2,
- PSI_SOCKET_CLOSE= 3,
- PSI_SOCKET_SEND= 4,
- PSI_SOCKET_RECV= 5,
- PSI_SOCKET_SEEK= 6,
- PSI_SOCKET_OPT= 7,
- PSI_SOCKET_STAT= 8,
- PSI_SOCKET_SHUTDOWN= 9
+ PSI_TABLE_LOCK= 0,
+ PSI_TABLE_EXTERNAL_LOCK= 1,
+ PSI_TABLE_FETCH_ROW= 2,
+ PSI_TABLE_WRITE_ROW= 3,
+ PSI_TABLE_UPDATE_ROW= 4,
+ PSI_TABLE_DELETE_ROW= 5
};
-struct PSI_table_locker;
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
typedef unsigned int PSI_cond_key;
typedef unsigned int PSI_thread_key;
typedef unsigned int PSI_file_key;
-typedef unsigned int PSI_socket_key;
struct PSI_v2
{
int placeholder;
@@ -97,12 +92,36 @@ struct PSI_file_info_v2
{
int placeholder;
};
+struct PSI_mutex_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_rwlock_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_cond_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_file_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_table_locker_state_v2
+{
+ int placeholder;
+};
typedef struct PSI_v2 PSI;
typedef struct PSI_mutex_info_v2 PSI_mutex_info;
typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
typedef struct PSI_cond_info_v2 PSI_cond_info;
typedef struct PSI_thread_info_v2 PSI_thread_info;
typedef struct PSI_file_info_v2 PSI_file_info;
-typedef struct PSI_socket_info_v2 PSI_socket_info;
+typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-07-16 16:45:37 +0000
+++ b/sql/mysqld.cc 2010-08-03 21:34:06 +0000
@@ -1,4 +1,4 @@
-/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
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
@@ -57,7 +57,6 @@
#include "rpl_master.h"
#include "rpl_mi.h"
#include "rpl_filter.h"
-#include "repl_failsafe.h"
#include <my_stacktrace.h>
#include "mysqld_suffix.h"
#include "mysys_err.h"
@@ -127,14 +126,12 @@ extern "C" { // Because of SCO 3.2V4
#include <my_net.h>
#if !defined(__WIN__)
-# ifndef __NETWARE__
#include <sys/resource.h>
-# endif /* __NETWARE__ */
#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
+#include <sys/un.h>
#endif
#ifdef HAVE_SELECT_H
-# include <select.h>
+#include <select.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
@@ -165,45 +162,6 @@ extern int memcntl(caddr_t, size_t, int,
#endif /* __sun__ ... */
#endif /* HAVE_SOLARIS_LARGE_PAGES */
-#ifdef __NETWARE__
-#define zVOLSTATE_ACTIVE 6
-#define zVOLSTATE_DEACTIVE 2
-#define zVOLSTATE_MAINTENANCE 3
-
-#undef __event_h__
-#include <../include/event.h>
-/*
- This #undef exists here because both libc of NetWare and MySQL have
- files named event.h which causes compilation errors.
-*/
-
-#include <nks/netware.h>
-#include <nks/vm.h>
-#include <library.h>
-#include <monitor.h>
-#include <zOmni.h> //For NEB
-#include <neb.h> //For NEB
-#include <nebpub.h> //For NEB
-#include <zEvent.h> //For NSS event structures
-#include <zPublics.h>
-
-static void *neb_consumer_id= NULL; //For storing NEB consumer id
-static char datavolname[256]= {0};
-static VolumeID_t datavolid;
-static event_handle_t eh;
-static Report_t ref;
-static void *refneb= NULL;
-my_bool event_flag= FALSE;
-static int volumeid= -1;
-
- /* NEB event callback */
-unsigned long neb_event_callback(struct EventBlock *eblock);
-static void registerwithneb();
-static void getvolumename();
-static void getvolumeID(BYTE *volumeName);
-#endif /* __NETWARE__ */
-
-
#ifdef _AIX41
int initgroups(const char *,unsigned int);
#endif
@@ -542,7 +500,6 @@ ulong slow_launch_threads = 0;
uint sync_binlog_period= 0, sync_relaylog_period= 0,
sync_relayloginfo_period= 0, sync_masterinfo_period= 0;
ulong expire_logs_days = 0;
-ulong rpl_recovery_rank=0;
const double log_10[] = {
1e000, 1e001, 1e002, 1e003, 1e004, 1e005, 1e006, 1e007, 1e008, 1e009,
@@ -1042,7 +999,7 @@ static void close_connections(void)
flush_thread_cache();
/* kill connection thread */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_PRINT("quit", ("waiting for select thread: 0x%lx",
(ulong) select_thread));
mysql_mutex_lock(&LOCK_thread_count);
@@ -1220,14 +1177,6 @@ static void close_server_sock()
mysql_socket_getfd(ip_sock)= INVALID_SOCKET;
DBUG_PRINT("info",("calling shutdown on TCP/IP socket"));
(void) mysql_socket_shutdown(tmp_sock, SHUT_RDWR);
-#if defined(__NETWARE__)
- /*
- The following code is disabled for normal systems as it causes MySQL
- to hang on AIX 4.3 during shutdown
- */
- DBUG_PRINT("info",("calling closesocket on TCP/IP socket"));
- (void) mysql_socket_close(tmp_sock);
-#endif
}
tmp_sock=unix_sock;
if (mysql_socket_getfd(tmp_sock) != INVALID_SOCKET)
@@ -1235,14 +1184,6 @@ static void close_server_sock()
mysql_socket_getfd(unix_sock)= INVALID_SOCKET;
DBUG_PRINT("info",("calling shutdown on unix socket"));
(void) mysql_socket_shutdown(tmp_sock, SHUT_RDWR);
-#if defined(__NETWARE__)
- /*
- The following code is disabled for normal systems as it may cause MySQL
- to hang on AIX 4.3 during shutdown
- */
- DBUG_PRINT("info",("calling closesocket on unix/IP socket"));
- (void) mysql_socket_close(tmp_sock);
-#endif
(void) unlink(mysqld_unix_port);
}
DBUG_VOID_RETURN;
@@ -1311,10 +1252,7 @@ void kill_mysql(void)
or stop, we just want to kill the server.
*/
-#if defined(__NETWARE__)
-extern "C" void kill_server(int sig_ptr)
-#define RETURN_FROM_KILL_SERVER return
-#elif !defined(__WIN__)
+#if !defined(__WIN__)
static void *kill_server(void *sig_ptr)
#define RETURN_FROM_KILL_SERVER return 0
#else
@@ -1360,11 +1298,6 @@ static void __cdecl kill_server(int sig_
unireg_end();
/* purecov: begin deadcode */
-#ifdef __NETWARE__
- if (!event_flag)
- pthread_join(select_thread, NULL); // wait for main thread
-#endif /* __NETWARE__ */
-
DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
pthread_exit(0);
@@ -1381,7 +1314,7 @@ static void __cdecl kill_server(int sig_
}
-#if defined(USE_ONE_SIGNAL_HAND) || (defined(__NETWARE__) && defined(SIGNALS_DONT_BREAK_READ))
+#if defined(USE_ONE_SIGNAL_HAND)
pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
{
my_thread_init(); // Initialize new thread
@@ -1399,10 +1332,10 @@ extern "C" sig_handler print_signal_warn
{
if (global_system_variables.log_warnings)
sql_print_warning("Got signal %d from thread %ld", sig,my_thread_id());
-#ifdef DONT_REMEMBER_SIGNAL
+#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
if (sig == SIGALRM)
alarm(2); /* reschedule alarm */
#endif
@@ -1436,7 +1369,7 @@ void unireg_end(void)
{
clean_up(1);
my_thread_end();
-#if defined(SIGNALS_DONT_BREAK_READ) && !defined(__NETWARE__)
+#if defined(SIGNALS_DONT_BREAK_READ)
exit(0);
#else
pthread_exit(0); // Exit is in main thread
@@ -1534,7 +1467,7 @@ void clean_up(bool print_message)
if (defaults_argv)
free_defaults(defaults_argv);
free_tmpdir(&mysql_tmpdir_list);
- x_free(opt_bin_logname);
+ my_free(opt_bin_logname);
bitmap_free(&temp_pool);
free_max_user_conn();
#ifdef HAVE_REPLICATION
@@ -1590,7 +1523,6 @@ void clean_up(bool print_message)
*/
static void wait_for_signal_thread_to_end()
{
-#ifndef __NETWARE__
uint i;
/*
Wait up to 10 seconds for signal thread to die. We use this mainly to
@@ -1602,7 +1534,6 @@ static void wait_for_signal_thread_to_en
break;
my_sleep(100); // Give it time to die
}
-#endif
}
@@ -1631,10 +1562,6 @@ static void clean_up_mutexes()
OPENSSL_free(openssl_stdlocks);
#endif
#endif
-#ifdef HAVE_REPLICATION
- mysql_mutex_destroy(&LOCK_rpl_status);
- mysql_cond_destroy(&COND_rpl_status);
-#endif
mysql_mutex_destroy(&LOCK_active_mi);
mysql_rwlock_destroy(&LOCK_sys_init_connect);
mysql_rwlock_destroy(&LOCK_sys_init_slave);
@@ -1700,7 +1627,7 @@ static void set_ports()
static struct passwd *check_user(const char *user)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
struct passwd *tmp_user_info;
uid_t user_id= geteuid();
@@ -1765,7 +1692,7 @@ err:
static void set_user(const char *user, struct passwd *user_info_arg)
{
/* purecov: begin tested */
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_ASSERT(user_info_arg != 0);
#ifdef HAVE_INITGROUPS
/*
@@ -1795,7 +1722,7 @@ static void set_user(const char *user, s
static void set_effective_user(struct passwd *user_info_arg)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
DBUG_ASSERT(user_info_arg != 0);
if (setregid((gid_t)-1, user_info_arg->pw_gid) == -1)
{
@@ -1814,7 +1741,7 @@ static void set_effective_user(struct pa
/** Change root user if started with @c --chroot . */
static void set_root(const char *path)
{
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
if (chroot(path) == -1)
{
sql_perror("chroot");
@@ -2146,6 +2073,16 @@ static bool cache_thread()
/* Don't kill the thread, just put it in cache for reuse */
DBUG_PRINT("info", ("Adding thread to cache"));
cached_thread_count++;
+
+#ifdef HAVE_PSI_INTERFACE
+ /*
+ Delete the instrumentation for the job that just completed,
+ before parking this pthread in the cache (blocked on COND_thread_cache).
+ */
+ if (likely(PSI_server != NULL))
+ PSI_server->delete_current_thread();
+#endif
+
while (!abort_loop && ! wake_thread && ! kill_cached_threads)
mysql_cond_wait(&COND_thread_cache, &LOCK_thread_count);
cached_thread_count--;
@@ -2158,6 +2095,21 @@ static bool cache_thread()
thd= thread_cache.get();
thd->thread_stack= (char*) &thd; // For store_globals
(void) thd->store_globals();
+
+#ifdef HAVE_PSI_INTERFACE
+ /*
+ Create new instrumentation for the new THD job,
+ and attach it to this running pthread.
+ */
+ if (likely(PSI_server != NULL))
+ {
+ PSI_thread *psi= PSI_server->new_thread(key_thread_one_connection,
+ thd, thd->thread_id);
+ if (likely(psi != NULL))
+ PSI_server->set_thread(psi);
+ }
+#endif
+
/*
THD::mysys_var::abort is associated with physical thread rather
than with THD object. So we need to reset this flag before using
@@ -2404,243 +2356,7 @@ static void start_signal_handler(void)
static void check_data_home(const char *path)
{}
-
-#elif defined(__NETWARE__)
-
-/// down server event callback.
-void mysql_down_server_cb(void *, void *)
-{
- event_flag= TRUE;
- kill_server(0);
-}
-
-
-/// destroy callback resources.
-void mysql_cb_destroy(void *)
-{
- UnRegisterEventNotification(eh); // cleanup down event notification
- NX_UNWRAP_INTERFACE(ref);
- /* Deregister NSS volume deactivation event */
- NX_UNWRAP_INTERFACE(refneb);
- if (neb_consumer_id)
- UnRegisterConsumer(neb_consumer_id, NULL);
-}
-
-
-/// initialize callbacks.
-void mysql_cb_init()
-{
- // register for down server event
- void *handle = getnlmhandle();
- rtag_t rt= AllocateResourceTag(handle, "MySQL Down Server Callback",
- EventSignature);
- NX_WRAP_INTERFACE((void *)mysql_down_server_cb, 2, (void **)&ref);
- eh= RegisterForEventNotification(rt, EVENT_PRE_DOWN_SERVER,
- EVENT_PRIORITY_APPLICATION,
- NULL, ref, NULL);
-
- /*
- Register for volume deactivation event
- Wrap the callback function, as it is called by non-LibC thread
- */
- (void *) NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb);
- registerwithneb();
-
- NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up
-}
-
-
-/** To get the name of the NetWare volume having MySQL data folder. */
-static void getvolumename()
-{
- char *p;
- /*
- We assume that data path is already set.
- If not it won't come here. Terminate after volume name
- */
- if ((p= strchr(mysql_real_data_home, ':')))
- strmake(datavolname, mysql_real_data_home,
- (uint) (p - mysql_real_data_home));
-}
-
-
-/**
- Registering with NEB for NSS Volume Deactivation event.
-*/
-
-static void registerwithneb()
-{
-
- ConsumerRegistrationInfo reg_info;
-
- /* Clear NEB registration structure */
- bzero((char*) ®_info, sizeof(struct ConsumerRegistrationInfo));
-
- /* Fill the NEB consumer information structure */
- reg_info.CRIVersion= 1; // NEB version
- /* NEB Consumer name */
- reg_info.CRIConsumerName= (BYTE *) "MySQL Database Server";
- /* Event of interest */
- reg_info.CRIEventName= (BYTE *) "NSS.ChangeVolState.Enter";
- reg_info.CRIUserParameter= NULL; // Consumer Info
- reg_info.CRIEventFlags= 0; // Event flags
- /* Consumer NLM handle */
- reg_info.CRIOwnerID= (LoadDefinitionStructure *)getnlmhandle();
- reg_info.CRIConsumerESR= NULL; // No consumer ESR required
- reg_info.CRISecurityToken= 0; // No security token for the event
- reg_info.CRIConsumerFlags= 0; // SMP_ENABLED_BIT;
- reg_info.CRIFilterName= 0; // No event filtering
- reg_info.CRIFilterDataLength= 0; // No filtering data
- reg_info.CRIFilterData= 0; // No filtering data
- /* Callback function for the event */
- (void *)reg_info.CRIConsumerCallback= (void *) refneb;
- reg_info.CRIOrder= 0; // Event callback order
- reg_info.CRIConsumerType= CHECK_CONSUMER; // Consumer type
-
- /* Register for the event with NEB */
- if (RegisterConsumer(®_info))
- {
- consoleprintf("Failed to register for NSS Volume Deactivation event \n");
- return;
- }
- /* This ID is required for deregistration */
- neb_consumer_id= reg_info.CRIConsumerID;
-
- /* Get MySQL data volume name, stored in global variable datavolname */
- getvolumename();
-
- /*
- Get the NSS volume ID of the MySQL Data volume.
- Volume ID is stored in a global variable
- */
- getvolumeID((BYTE*) datavolname);
-}
-
-
-/**
- Callback for NSS Volume Deactivation event.
-*/
-
-ulong neb_event_callback(struct EventBlock *eblock)
-{
- EventChangeVolStateEnter_s *voldata;
- extern bool nw_panic;
-
- voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData;
-
- /* Deactivation of a volume */
- if ((voldata->oldState == zVOLSTATE_ACTIVE &&
- voldata->newState == zVOLSTATE_DEACTIVE ||
- voldata->newState == zVOLSTATE_MAINTENANCE))
- {
- /*
- Ensure that we bring down MySQL server only for MySQL data
- volume deactivation
- */
- if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t)))
- {
- consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n");
- event_flag= TRUE;
- nw_panic = TRUE;
- event_flag= TRUE;
- kill_server(0);
- }
- }
- return 0;
-}
-
-
-#define ADMIN_VOL_PATH "_ADMIN:/Volumes/"
-
-/**
- Function to get NSS volume ID of the MySQL data.
-*/
-static void getvolumeID(BYTE *volumeName)
-{
- char path[zMAX_FULL_NAME];
- Key_t rootKey= 0, fileKey= 0;
- QUAD getInfoMask;
- zInfo_s info;
- STATUS status;
-
- /* Get the root key */
- if ((status= zRootKey(0, &rootKey)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed to get root key, status: %d\n.", (int) status);
- goto exit;
- }
-
- /*
- Get the file key. This is the key to the volume object in the
- NSS admin volumes directory.
- */
-
- strxmov(path, (const char *) ADMIN_VOL_PATH, (const char *) volumeName,
- NullS);
- if ((status= zOpen(rootKey, zNSS_TASK, zNSPACE_LONG|zMODE_UTF8,
- (BYTE *) path, zRR_READ_ACCESS, &fileKey)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed to get file, status: %d\n.", (int) status);
- goto exit;
- }
-
- getInfoMask= zGET_IDS | zGET_VOLUME_INFO ;
- if ((status= zGetInfo(fileKey, getInfoMask, sizeof(info),
- zINFO_VERSION_A, &info)) != zOK)
- {
- consoleprintf("\nGetNSSVolumeProperties - Failed in zGetInfo, status: %d\n.", (int) status);
- goto exit;
- }
-
- /* Copy the data to global variable */
- datavolid.timeLow= info.vol.volumeID.timeLow;
- datavolid.timeMid= info.vol.volumeID.timeMid;
- datavolid.timeHighAndVersion= info.vol.volumeID.timeHighAndVersion;
- datavolid.clockSeqHighAndReserved= info.vol.volumeID.clockSeqHighAndReserved;
- datavolid.clockSeqLow= info.vol.volumeID.clockSeqLow;
- /* This is guranteed to be 6-byte length (but sizeof() would be better) */
- memcpy(datavolid.node, info.vol.volumeID.node, (unsigned int) 6);
-
-exit:
- if (rootKey)
- zClose(rootKey);
- if (fileKey)
- zClose(fileKey);
-}
-
-
-static void init_signals(void)
-{
- int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT};
-
- for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++)
- signal(signals[i], kill_server);
- mysql_cb_init(); // initialize callbacks
-
-}
-
-
-static void start_signal_handler(void)
-{
- // Save vm id of this process
- if (!opt_bootstrap)
- create_pid_file();
- // no signal handler
-}
-
-
-/**
- Warn if the data is on a Traditional volume.
-
- @note
- Already done by mysqld_safe
-*/
-
-static void check_data_home(const char *path)
-{
-}
-
-#endif /*__WIN__ || __NETWARE */
+#endif /* __WIN__ */
#ifdef HAVE_LINUXTHREADS
#define UNSAFE_DEFAULT_LINUX_THREADS 200
@@ -2660,7 +2376,6 @@ extern "C" sig_handler handle_segfault(i
{
time_t curr_time;
struct tm tm;
- THD *thd=current_thd;
/*
Strictly speaking, one needs a mutex here
@@ -2720,13 +2435,15 @@ the thread stack. Please read http://dev
#endif /* HAVE_LINUXTHREADS */
#ifdef HAVE_STACKTRACE
+ THD *thd=current_thd;
+
if (!(test_flags & TEST_NO_STACKTRACE))
{
- fprintf(stderr,"thd: 0x%lx\n",(long) thd);
- fprintf(stderr,"\
-Attempting backtrace. You can use the following information to find out\n\
-where mysqld died. If you see no messages after this, something went\n\
-terribly wrong...\n");
+ fprintf(stderr, "thd: 0x%lx\n",(long) thd);
+ fprintf(stderr, "Attempting backtrace. You can use the following "
+ "information to find out\nwhere mysqld died. If "
+ "you see no messages after this, something went\n"
+ "terribly wrong...\n");
my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL,
my_thread_stack_size);
}
@@ -2809,7 +2526,7 @@ bugs.\n");
#endif
}
-#if !defined(__WIN__) && !defined(__NETWARE__)
+#if !defined(__WIN__)
#ifndef SA_RESETHAND
#define SA_RESETHAND 0
#endif
@@ -3146,7 +2863,7 @@ void *my_str_malloc_mysqld(size_t size)
void my_str_free_mysqld(void *ptr)
{
- my_free(ptr, MYF(MY_FAE));
+ my_free(ptr);
}
#endif /* EMBEDDED_LIBRARY */
@@ -3719,7 +3436,7 @@ static int init_common_variables()
#define FIX_LOG_VAR(VAR, ALT) \
if (!VAR || !*VAR) \
{ \
- x_free(VAR); /* it could be an allocated empty string "" */ \
+ my_free(VAR); /* it could be an allocated empty string "" */ \
VAR= my_strdup(ALT, MYF(0)); \
}
@@ -3854,10 +3571,6 @@ static int init_thread_environment()
mysql_cond_init(key_COND_thread_cache, &COND_thread_cache, NULL);
mysql_cond_init(key_COND_flush_thread_cache, &COND_flush_thread_cache, NULL);
mysql_cond_init(key_COND_manager, &COND_manager, NULL);
-#ifdef HAVE_REPLICATION
- mysql_mutex_init(key_LOCK_rpl_status, &LOCK_rpl_status, MY_MUTEX_INIT_FAST);
- mysql_cond_init(key_COND_rpl_status, &COND_rpl_status, NULL);
-#endif
mysql_mutex_init(key_LOCK_server_started,
&LOCK_server_started, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_server_started, &COND_server_started, NULL);
@@ -4090,7 +3803,7 @@ static int init_server_auto_options()
{
bool flush= false;
char fname[FN_REFLEN];
- char *name= "auto";
+ char *name= (char *)"auto";
const char *groups[]= {"auto", NULL};
char *uuid= 0;
my_option auto_options[]= {
@@ -4124,7 +3837,7 @@ static int init_server_auto_options()
{
if (strlen(uuid) != UUID_LENGTH)
{
- sql_print_error("Invalid UUID in the auto.cnf file");
+ sql_print_error("The UUID stored in auto.cnf file is the wrong length.");
goto err;
}
strcpy(server_uuid, uuid);
@@ -4135,8 +3848,9 @@ static int init_server_auto_options()
/* server_uuid will be set in the function */
if (generate_server_uuid())
goto err;
- sql_print_warning("It might be a maiden lunch of the server, for there is"
- " no UUID existing. A new UUID is generated. it is %s",
+ sql_print_warning("No existing UUID has been found, so we assume that this"
+ " is the first time that this server has been started."
+ " Generating a new UUID: %s.",
server_uuid);
}
/*
@@ -4310,7 +4024,7 @@ a file name for --log-bin-index option",
}
if (ln == buf)
{
- my_free(opt_bin_logname, MYF(MY_ALLOW_ZERO_PTR));
+ my_free(opt_bin_logname);
opt_bin_logname=my_strdup(buf, MYF(0));
}
if (mysql_bin_log.open_index_file(opt_binlog_index_name, ln, TRUE))
@@ -4375,15 +4089,6 @@ a file name for --log-bin-index option",
if (opt_help)
unireg_abort(0);
- /*
- Each server should have one UUID. We will create it automatically, if it
- does not exist.
- */
- if (!opt_bootstrap && init_server_auto_options())
- {
- sql_print_error("Initializing server's UUID failed");
- unireg_abort(1);
- }
/* if the errmsg.sys is not loaded, terminate to maintain behaviour */
if (!DEFAULT_ERRMSGS[0][0])
@@ -4497,10 +4202,6 @@ a file name for --log-bin-index option",
mysql_bin_log.purge_logs_before_date(purge_time);
}
#endif
-#ifdef __NETWARE__
- /* Increasing stacksize of threads on NetWare */
- pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
-#endif
if (opt_myisam_log)
(void) mi_log(1);
@@ -4879,10 +4580,6 @@ int mysqld_main(int argc, char **argv)
}
}
#endif
-#ifdef __NETWARE__
- /* Increasing stacksize of threads on NetWare */
- pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
-#endif
(void) thr_setconcurrency(concurrency); // 10 by default
@@ -4929,6 +4626,19 @@ int mysqld_main(int argc, char **argv)
if (init_server_components())
unireg_abort(1);
+ /*
+ Each server should have one UUID. We will create it automatically, if it
+ does not exist.
+ */
+ if (!opt_bootstrap && init_server_auto_options())
+ {
+ sql_print_error("Initialzation of the server's UUID failed because it could"
+ " not be read from the auto.cnf file. If this is a new"
+ " server, the initialization failed because it was not"
+ " possible to generate a new UUID.");
+ unireg_abort(1);
+ }
+
init_ssl();
network_init();
@@ -4960,9 +4670,9 @@ int mysqld_main(int argc, char **argv)
{
abort_loop=1;
select_thread_in_use=0;
-#ifndef __NETWARE__
+
(void) pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
-#endif /* __NETWARE__ */
+
if (!opt_bootstrap)
mysql_file_delete(key_file_pid, pidfile_name, MYF(MY_WME)); // Not needed anymore
@@ -5515,15 +5225,13 @@ static void create_new_thread(THD *thd)
inline void kill_broken_server()
{
/* hack to get around signals ignored in syscalls for problem OS's */
- if (
-#if !defined(__NETWARE__)
- mysql_socket_getfd(unix_sock) == INVALID_SOCKET ||
-#endif
+ if (unix_sock == INVALID_SOCKET ||
+ (!opt_disable_networking && ip_sock == INVALID_SOCKET))
(!opt_disable_networking && mysql_socket_getfd(ip_sock) == INVALID_SOCKET))
{
select_thread_in_use = 0;
/* The following call will never return */
- kill_server(IF_NETWARE(MYSQL_KILL_SIGNAL, (void*) MYSQL_KILL_SIGNAL));
+ kill_server((void*) MYSQL_KILL_SIGNAL);
}
}
#define MAYBE_BROKEN_SYSCALL kill_broken_server();
@@ -5657,13 +5365,8 @@ void handle_connections_sockets()
{
size_socket length= sizeof(struct sockaddr_storage);
new_sock= mysql_socket_accept(key_socket_handle_connection, sock, (struct sockaddr *)(&cAddr), &length);
-#ifdef __NETWARE__
- // TODO: temporary fix, waiting for TCP/IP fix - DEFECT000303149
- if ((mysql_socket_getfd(new_sock) == INVALID_SOCKET) && (socket_errno == EINVAL))
- {
- kill_server(SIGTERM);
- }
-#endif
+ &length);
+ if (new_sock != INVALID_SOCKET ||
if (mysql_socket_getfd(new_sock) != INVALID_SOCKET ||
(socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
break;
@@ -6103,7 +5806,7 @@ errorconn:
/* End shared memory handling */
error:
if (tmp)
- my_free(tmp, MYF(0));
+ my_free(tmp);
if (errmsg)
{
@@ -6320,9 +6023,6 @@ struct my_option my_long_options[]=
&master_retry_count, &master_retry_count, 0, GET_ULONG,
REQUIRED_ARG, 3600*24, 0, 0, 0, 0, 0},
#ifdef HAVE_REPLICATION
- {"init-rpl-role", 0, "Set the replication role.",
- &rpl_status, &rpl_status, &rpl_role_typelib,
- GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"max-binlog-dump-events", 0,
"Option used by mysql-test for debugging and testing of replication.",
&max_binlog_dump_events, &max_binlog_dump_events, 0,
@@ -6403,14 +6103,6 @@ struct my_option my_long_options[]=
"Don't allow new user creation by the user who has no write privileges to the mysql.user table.",
&opt_safe_user_create, &opt_safe_user_create, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
-#if !defined(DBUG_OFF) && defined(SAFEMALLOC)
- {"safemalloc", 0, "Enable the memory allocation checking.",
- &sf_malloc_quick, &sf_malloc_quick, 0,
- GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
- {"safemalloc-mem-limit", 0, "Simulate memory shortage.",
- &sf_malloc_mem_limit, &sf_malloc_mem_limit, 0, GET_UINT,
- REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"show-slave-auth-info", 0,
"Show user and password in SHOW SLAVE HOSTS on this master.",
&opt_show_slave_auth_info, &opt_show_slave_auth_info, 0,
@@ -6546,13 +6238,6 @@ static int show_flushstatustime(THD *thd
#endif
#ifdef HAVE_REPLICATION
-static int show_rpl_status(THD *thd, SHOW_VAR *var, char *buff)
-{
- var->type= SHOW_CHAR;
- var->value= const_cast<char*>(rpl_status_type[(int)rpl_status]);
- return 0;
-}
-
static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
{
var->type= SHOW_MY_BOOL;
@@ -6610,7 +6295,7 @@ static int show_heartbeat_period(THD *th
{
var->type= SHOW_CHAR;
var->value= buff;
- my_sprintf(buff, (buff, "%.3f",active_mi->heartbeat_period));
+ sprintf(buff, "%.3f", active_mi->heartbeat_period);
}
else
var->type= SHOW_UNDEF;
@@ -6972,9 +6657,6 @@ SHOW_VAR status_vars[]= {
#endif /*HAVE_QUERY_CACHE*/
{"Queries", (char*) &show_queries, SHOW_FUNC},
{"Questions", (char*) offsetof(STATUS_VAR, questions), SHOW_LONG_STATUS},
-#ifdef HAVE_REPLICATION
- {"Rpl_status", (char*) &show_rpl_status, SHOW_FUNC},
-#endif
{"Select_full_join", (char*) offsetof(STATUS_VAR, select_full_join_count), SHOW_LONG_STATUS},
{"Select_full_range_join", (char*) offsetof(STATUS_VAR, select_full_range_join_count), SHOW_LONG_STATUS},
{"Select_range", (char*) offsetof(STATUS_VAR, select_range_count), SHOW_LONG_STATUS},
@@ -7328,23 +7010,21 @@ static int mysql_init_variables(void)
shared_memory_base_name= default_shared_memory_base_name;
#endif
-#if defined(__WIN__) || defined(__NETWARE__)
- /* Allow Win32 and NetWare users to move MySQL anywhere */
+#if defined(__WIN__)
+ /* Allow Win32 users to move MySQL anywhere */
{
char prg_dev[LIBLEN];
-#if defined __WIN__
- char executing_path_name[LIBLEN];
- if (!test_if_hard_path(my_progname))
- {
- // we don't want to use GetModuleFileName inside of my_path since
- // my_path is a generic path dereferencing function and here we care
- // only about the executing binary.
- GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
- my_path(prg_dev, executing_path_name, NULL);
- }
- else
-#endif
- my_path(prg_dev,my_progname,"mysql/bin");
+ char executing_path_name[LIBLEN];
+ if (!test_if_hard_path(my_progname))
+ {
+ // we don't want to use GetModuleFileName inside of my_path since
+ // my_path is a generic path dereferencing function and here we care
+ // only about the executing binary.
+ GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
+ my_path(prg_dev, executing_path_name, NULL);
+ }
+ else
+ my_path(prg_dev, my_progname, "mysql/bin");
strcat(prg_dev,"/../"); // Remove 'bin' to get base dir
cleanup_dirname(mysql_home,prg_dev);
}
@@ -7762,13 +7442,8 @@ static int get_options(int *argc_ptr, ch
}
if (opt_disable_networking)
- {
-#if defined(__NETWARE__)
- sql_print_error("Can't start server: skip-networking option is currently not supported on NetWare");
- return 1;
-#endif
mysqld_port= 0;
- }
+
if (opt_skip_show_db)
opt_specialflag|= SPECIAL_SKIP_SHOW_DB;
@@ -8040,7 +7715,7 @@ static int fix_paths(void)
}
char *secure_file_real_path= (char *)my_malloc(FN_REFLEN, MYF(MY_FAE));
convert_dirname(secure_file_real_path, buff, NullS);
- my_free(opt_secure_file_priv, MYF(0));
+ my_free(opt_secure_file_priv);
opt_secure_file_priv= secure_file_real_path;
}
}
@@ -8182,7 +7857,7 @@ PSI_mutex_key key_BINLOG_LOCK_index, key
key_LOCK_gdl, key_LOCK_global_read_lock, key_LOCK_global_system_variables,
key_LOCK_lock_db, key_LOCK_manager, key_LOCK_mapped_file,
key_LOCK_mysql_create_db, key_LOCK_open, key_LOCK_prepared_stmt_count,
- key_LOCK_rpl_status, key_LOCK_server_started, key_LOCK_status,
+ key_LOCK_server_started, key_LOCK_status,
key_LOCK_system_variables_hash, key_LOCK_table_share, key_LOCK_thd_data,
key_LOCK_user_conn, key_LOCK_uuid_generator, key_LOG_LOCK_log,
key_master_info_data_lock, key_master_info_run_lock,
@@ -8225,7 +7900,6 @@ static PSI_mutex_info all_server_mutexes
{ &key_LOCK_mysql_create_db, "LOCK_mysql_create_db", PSI_FLAG_GLOBAL},
{ &key_LOCK_open, "LOCK_open", PSI_FLAG_GLOBAL},
{ &key_LOCK_prepared_stmt_count, "LOCK_prepared_stmt_count", PSI_FLAG_GLOBAL},
- { &key_LOCK_rpl_status, "LOCK_rpl_status", PSI_FLAG_GLOBAL},
{ &key_LOCK_server_started, "LOCK_server_started", PSI_FLAG_GLOBAL},
{ &key_LOCK_status, "LOCK_status", PSI_FLAG_GLOBAL},
{ &key_LOCK_system_variables_hash, "LOCK_system_variables_hash", PSI_FLAG_GLOBAL},
@@ -8271,7 +7945,7 @@ PSI_cond_key key_PAGE_cond, key_COND_act
PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
key_COND_cache_status_changed, key_COND_global_read_lock, key_COND_manager,
- key_COND_refresh, key_COND_rpl_status, key_COND_server_started,
+ key_COND_refresh, key_COND_server_started,
key_delayed_insert_cond, key_delayed_insert_cond_client,
key_item_func_sleep_cond, key_master_info_data_cond,
key_master_info_start_cond, key_master_info_stop_cond,
@@ -8296,7 +7970,6 @@ static PSI_cond_info all_server_conds[]=
{ &key_COND_global_read_lock, "COND_global_read_lock", PSI_FLAG_GLOBAL},
{ &key_COND_manager, "COND_manager", PSI_FLAG_GLOBAL},
{ &key_COND_refresh, "COND_refresh", PSI_FLAG_GLOBAL},
- { &key_COND_rpl_status, "COND_rpl_status", PSI_FLAG_GLOBAL},
{ &key_COND_server_started, "COND_server_started", PSI_FLAG_GLOBAL},
{ &key_delayed_insert_cond, "Delayed_insert::cond", 0},
{ &key_delayed_insert_cond_client, "Delayed_insert::cond_client", 0},
=== modified file 'storage/perfschema/pfs_engine_table.h'
--- a/storage/perfschema/pfs_engine_table.h 2010-07-09 02:23:31 +0000
+++ b/storage/perfschema/pfs_engine_table.h 2010-08-03 21:34:06 +0000
@@ -293,25 +293,6 @@ struct PFS_triple_index
}
};
-struct PFS_instrument_view_constants
-{
- static const uint FIRST_VIEW=1;
- static const uint VIEW_MUTEX= 1;
- static const uint VIEW_RWLOCK= 2;
- static const uint VIEW_COND= 3;
- static const uint VIEW_FILE= 4;
- static const uint VIEW_SOCKET= 5;
- static const uint LAST_VIEW= 6;
-};
-
-struct PFS_object_view_constants
-{
- static const uint VIEW_TABLE= 1;
- static const uint VIEW_EVENT= 2;
- static const uint VIEW_PROCEDURE= 3;
- static const uint VIEW_FUNCTION= 4;
-};
-
bool pfs_show_status(handlerton *hton, THD *thd,
stat_print_fn *print, enum ha_stat_type stat);
Attachment: [text/bzr-bundle] bzr/chris.powers@oracle.com-20100803213406-rraa5eswlucjg4l6.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-wl4896 branch (chris.powers:3157) | Christopher Powers | 3 Aug |