Commit ee896803 authored by unknown's avatar unknown

Force close of sockets on HPUX 10.20

Support option lines longer than 256 chars.
Close the slow log at shutdown.
Always allow debug options to mysqld.
Change some DBUG_PRINT tags.


Docs/manual.texi:
  Small cleanups
configure.in:
  Force close of sockets on HPUX 10.20
mysql-test/t/merge.test:
  Remove used tables
mysys/default.c:
  Support option lines longer than 256 chars.
mysys/mf_keycache.c:
  Split check_keycache tags
sql/mysqld.cc:
  Move things to 'cleanup'.
  Close the slow log at shutdown.
  Always allow debug options
sql/violite.c:
  Change the error tag to vio_error
parent 5ee5f0db
......@@ -10265,9 +10265,10 @@ the priority of only one query, or by
thread. @xref{Table locking}.
@item --memlock
Lock the @code{mysqld} process in memory. This works only if your system
supports the @code{mlockall()} system call. This may help if you have
a problem where the operating system is causing @code{mysqld} to swap on disk.
Lock the @code{mysqld} process in memory. This works only if your
system supports the @code{mlockall()} system call (like Solaris). This
may help if you have a problem where the operating system is causing
@code{mysqld} to swap on disk.
@item --myisam-recover [=option[,option...]]] where option is one of DEFAULT, BACKUP, FORCE or QUICK.
If this option is used, @code{mysqld} will on open check if the table is
......@@ -33010,10 +33011,10 @@ Flush logs once all tables are locked.
Temporary directory (instead of /tmp).
@end table
You can use 'perldoc mysqlhotcopy' to get a more complete documentation for
@code{mysqlhotcopy}.
You can use @code{perldoc mysqlhotcopy} to get a more complete
documentation for @code{mysqlhotcopy}.
@code{mysqlhotcopy} reads the groups @code[client] and @code{[mysqlhotcopy]}
@code{mysqlhotcopy} reads the groups @code{client} and @code{mysqlhotcopy}
from the option files.
To be able to execute @code{mysqlhotcopy} you need write access to the
......@@ -44400,6 +44401,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.39
@itemize @bullet
@item
Extended argument length in option files from 256 to 512 chars.
@item
Fixed problem with shutdown when @code{INSERT DELAYED} was waiting for
a @code{LOCK TABLE}.
@item
......@@ -50385,10 +50388,7 @@ On some operating systems, the error log will contain a stack trace if
@code{mysqld} dies unexpectedly. You can use this to find out where (and
maybe why) @code{mysqld} died. @xref{Error log}. To get a stack trace,
you should NOT compile @code{mysqld} with the @code{-fomit-frame-pointer}
option to gcc. On Linux-x86 you can use
@code{-fomit-frame-pointer -ffixed-ebp} to get both speed and a reasonable
accurate stack trace.
@xref{Compiling for debugging}.
option to gcc. @xref{Compiling for debugging}.
If the error file contains something like the following:
......@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 3.23.38)
AM_INIT_AUTOMAKE(mysql, 3.23.39)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
......@@ -751,8 +751,8 @@ case $SYSTEM_TYPE in
;;
*hpux10.20*)
echo "Enabling snprintf workaround for hpux 10.20"
CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF"
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG"
CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ"
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ"
;;
*hpux11.*)
echo "Enabling pread/pwrite workaround for hpux 11"
......@@ -806,8 +806,8 @@ case $SYSTEM_TYPE in
;;
*aix4.3*)
echo "Adding defines for AIX"
CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
;;
dnl Is this the right match for DEC OSF on alpha?
*dec-osf*)
......
......@@ -109,3 +109,4 @@ insert into t1 values (1,2),(2,1),(0,0),(4,4),(5,5),(6,6);
insert into t2 values (1,1),(2,2),(0,0),(4,4),(5,5),(6,6);
flush tables;
select * from t3 where a=1 order by b limit 2;
drop table t1,t2,t3;
......@@ -222,7 +222,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
const char *dir, const char *config_file,
const char *ext, TYPELIB *group)
{
char name[FN_REFLEN+10],buff[257],*ptr,*end,*value,*tmp;
char name[FN_REFLEN+10],buff[FN_REFLEN+1],*ptr,*end,*value,*tmp;
FILE *fp;
uint line=0;
my_bool read_values=0,found_group=0;
......
......@@ -381,7 +381,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
reg1 SEC_LINK *next,**start;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache",test_key_cache("start of find_key_block",0););
DBUG_EXECUTE("check_keycache2",test_key_cache("start of find_key_block",0););
#endif
*error=0;
......@@ -459,7 +459,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
}
_my_used_last=next;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache",test_key_cache("end of find_key_block",0););
DBUG_EXECUTE("check_keycache2",test_key_cache("end of find_key_block",0););
#endif
return next;
} /* find_key_block */
......
......@@ -429,7 +429,7 @@ static void close_connections(void)
if (error != 0 && !count++)
sql_print_error("Got error %d from pthread_cond_timedwait",error);
#endif
#if defined(AIX_3_2) || defined(HAVE_DEC_3_2_THREADS)
#if defined(HAVE_DEC_3_2_THREADS) || defined(SIGNALS_DONT_BREAK_READ)
if (ip_sock != INVALID_SOCKET)
{
DBUG_PRINT("error",("closing TCP/IP and socket files"));
......@@ -544,9 +544,9 @@ static void close_connections(void)
(void) pthread_mutex_unlock(&LOCK_thread_count);
mysql_log.close(1);
mysql_slow_log.close(1);
mysql_update_log.close(1);
mysql_bin_log.close(1);
my_free(charsets_list, MYF(0));
DBUG_PRINT("quit",("close_connections thread"));
DBUG_VOID_RETURN;
}
......@@ -680,6 +680,7 @@ void clean_up(bool print_message)
end_raid();
#endif
free_defaults(defaults_argv);
my_free(charsets_list, MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql_tmpdir,MYF(0));
x_free(opt_bin_logname);
bitmap_free(&temp_pool);
......@@ -2487,9 +2488,7 @@ static struct option long_options[] = {
{"chroot", required_argument, 0, 'r'},
{"character-sets-dir", required_argument, 0, (int) OPT_CHARSETS_DIR},
{"datadir", required_argument, 0, 'h'},
#ifndef DBUG_OFF
{"debug", optional_argument, 0, '#'},
#endif
{"default-character-set", required_argument, 0, 'C'},
{"default-table-type", required_argument, 0, (int) OPT_TABLE_TYPE},
{"delay-key-write-for-all-tables",
......@@ -2544,10 +2543,8 @@ static struct option long_options[] = {
(int) OPT_DISCONNECT_SLAVE_EVENT_COUNT},
{"abort-slave-event-count", required_argument, 0,
(int) OPT_ABORT_SLAVE_EVENT_COUNT},
#if !defined(DBUG_OFF) && defined(SAFEMALLOC)
{"safemalloc-mem-limit", required_argument, 0, (int)
OPT_SAFEMALLOC_MEM_LIMIT},
#endif
{"new", no_argument, 0, 'n'},
{"old-protocol", no_argument, 0, 'o'},
#ifdef ONE_THREAD
......@@ -3165,12 +3162,12 @@ static void get_options(int argc,char **argv)
long_options, &option_index)) != EOF)
{
switch(c) {
#ifndef DBUG_OFF
case '#':
#ifndef DBUG_OFF
DBUG_PUSH(optarg ? optarg : default_dbug_option);
#endif
opt_endinfo=1; /* unireg: memory allocation */
break;
#endif
case 'a':
opt_ansi_mode=1;
thd_startup_options|=OPTION_ANSI_MODE;
......@@ -3205,11 +3202,11 @@ static void get_options(int argc,char **argv)
case 'P':
mysql_port= (unsigned int) atoi(optarg);
break;
#if !defined(DBUG_OFF) && defined(SAFEMALLOC)
case OPT_SAFEMALLOC_MEM_LIMIT:
#if !defined(DBUG_OFF) && defined(SAFEMALLOC)
safemalloc_mem_limit = atoi(optarg);
break;
#endif
break;
case OPT_SOCKET:
mysql_unix_port= optarg;
break;
......
......@@ -179,7 +179,7 @@ int vio_read(Vio * vio, gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
DBUG_PRINT("error", ("Got error %d during read",errno));
DBUG_PRINT("vio_error", ("Got error %d during read",errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
......@@ -207,7 +207,7 @@ int vio_write(Vio * vio, const gptr buf, int size)
#ifndef DBUG_OFF
if (r < 0)
{
DBUG_PRINT("error", ("Got error on write: %d",errno));
DBUG_PRINT("vio_error", ("Got error on write: %d",errno));
}
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", r));
......@@ -346,7 +346,7 @@ int vio_close(Vio * vio)
}
if (r)
{
DBUG_PRINT("error", ("close() failed, error: %d",errno));
DBUG_PRINT("vio_error", ("close() failed, error: %d",errno));
/* FIXME: error handling (not critical for MySQL) */
}
vio->type= VIO_CLOSED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment