summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/field.h1
-rw-r--r--sql/mysqld.cc17
-rw-r--r--sql/net_serv.cc2
-rw-r--r--sql/sql_parse.cc7
-rw-r--r--sql/table.h1
5 files changed, 16 insertions, 12 deletions
diff --git a/sql/field.h b/sql/field.h
index 433f5c6bfbf..ebfea3a79b2 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1360,7 +1360,6 @@ public:
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
- void reset() { bzero(ptr,packlength); }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 40e24fb5800..de94c37c27e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1056,9 +1056,6 @@ static void __cdecl kill_server(int sig_ptr)
}
#endif
-#if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__))
- my_thread_init(); // If this is a new thread
-#endif
close_connections();
if (sig != MYSQL_KILL_SIGNAL &&
#ifdef __WIN__
@@ -1069,16 +1066,15 @@ static void __cdecl kill_server(int sig_ptr)
else
unireg_end();
+ /* purecov: begin deadcode */
#ifdef __NETWARE__
if (!event_flag)
pthread_join(select_thread, NULL); // wait for main thread
#endif /* __NETWARE__ */
-#if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2))
my_thread_end();
-#endif
-
- pthread_exit(0); /* purecov: deadcode */
+ pthread_exit(0);
+ /* purecov: end */
#endif /* EMBEDDED_LIBRARY */
RETURN_FROM_KILL_SERVER;
@@ -1090,11 +1086,15 @@ pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
{
my_thread_init(); // Initialize new thread
kill_server(0);
- my_thread_end(); // Normally never reached
+ /* purecov: begin deadcode */
+ my_thread_end();
+ pthread_exit(0);
return 0;
+ /* purecov: end */
}
#endif
+
extern "C" sig_handler print_signal_warning(int sig)
{
if (global_system_variables.log_warnings)
@@ -7151,7 +7151,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
switch(optid) {
case '#':
#ifndef DBUG_OFF
- DBUG_SET(argument ? argument : default_dbug_option);
DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
#endif
opt_endinfo=1; /* unireg: memory allocation */
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index ec4c4675e76..2dfef14fd60 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -294,7 +294,7 @@ void net_clear(NET *net)
DBUG_PRINT("info",("skipped %d bytes from file: %s",
count, vio_description(net->vio)));
#ifdef EXTRA_DEBUG
- fprintf(stderr,"skipped %d bytes from file: %s\n",
+ fprintf(stderr,"MySQL: net_clear() skipped %d bytes from file: %s\n",
count, vio_description(net->vio));
#endif
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 5d7fdcae3f7..e6dbd7cb510 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2093,7 +2093,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
#ifdef __WIN__
sleep(1); // must wait after eof()
#endif
- send_eof(thd); // This is for 'quit request'
+ /*
+ The client is next going to send a COM_QUIT request (as part of
+ mysql_close()). Make the life simpler for the client by sending
+ the response for the coming COM_QUIT in advance
+ */
+ send_eof(thd);
close_connection(thd, 0, 1);
close_thread_tables(thd); // Free before kill
kill_mysql();
diff --git a/sql/table.h b/sql/table.h
index 434fb5a4d11..4c7ae7b3018 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -112,6 +112,7 @@ class Table_triggers_list;
typedef struct st_table_share
{
+ st_table_share() {} /* Remove gcc warning */
/* hash of field names (contains pointers to elements of field array) */
HASH name_hash; /* hash of field names */
MEM_ROOT mem_root;