diff options
-rw-r--r-- | cmd-line-utils/libedit/el.c | 10 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | sql/mysqld.cc | 27 |
3 files changed, 27 insertions, 33 deletions
diff --git a/cmd-line-utils/libedit/el.c b/cmd-line-utils/libedit/el.c index d436d113419..76b17aba0cf 100644 --- a/cmd-line-utils/libedit/el.c +++ b/cmd-line-utils/libedit/el.c @@ -369,6 +369,14 @@ el_line(EditLine *el) static const char elpath[] = "/.editrc"; +#if defined(MAXPATHLEN) +#define LIBEDIT_MAXPATHLEN MAXPATHLEN +#elif defined(PATH_MAX) +#define LIBEDIT_MAXPATHLEN PATH_MAX +#else +#define LIBEDIT_MAXPATHLEN 1024 +#endif + /* el_source(): * Source a file */ @@ -377,7 +385,7 @@ el_source(EditLine *el, const char *fname) { FILE *fp; size_t len; - char *ptr, path[MAXPATHLEN]; + char *ptr, path[LIBEDIT_MAXPATHLEN]; fp = NULL; if (fname == NULL) { diff --git a/configure.in b/configure.in index 7a694db2b69..0fdd962956d 100644 --- a/configure.in +++ b/configure.in @@ -701,11 +701,8 @@ AC_SUBST(MYSQLD_USER) # If we should allow LOAD DATA LOCAL AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default) AC_ARG_ENABLE(local-infile, - Enable LOAD DATA LOCAL INFILE (default: disabled)], - [ - ENABLED_LOCAL_INFILE=$enableval - AC_DEFINE(ENABLED_LOCAL_INFILE) - ], + [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], + [ ENABLED_LOCAL_INFILE=$enableval ], [ ENABLED_LOCAL_INFILE=no ] ) if test "$ENABLED_LOCAL_INFILE" = "yes" @@ -1734,26 +1731,14 @@ MYSQL_PTHREAD_YIELD # For readline/libedit (We simply move the mimimum amount of stuff from # the readline/libedit configure.in here) -dnl Checks for programs. -AC_PROG_CC -AC_PROG_AWK -AC_PROG_INSTALL - dnl Checks for header files. -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(limits.h malloc.h sys/ioctl.h unistd.h sys/cdefs.h sys/types.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T +AC_CHECK_HEADERS(malloc.h sys/cdefs.h) dnl Checks for library functions. AC_FUNC_ALLOCA AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL -AC_CHECK_FUNCS(re_comp regcomp strdup strerror strstr strtol) +AC_CHECK_FUNCS(re_comp regcomp strdup) AC_CHECK_HEADERS(vis.h) AC_CHECK_FUNCS(strlcat strlcpy) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 85cde682c58..2afe04f90b4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2039,6 +2039,20 @@ static int init_common_variables(const char *conf_file_name, int argc, DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname, server_version, SYSTEM_TYPE,MACHINE_TYPE)); +#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE + { + /* Retrieve used stack size; Needed for checking stack overflows */ + size_t stack_size; + pthread_attr_getstacksize(&connection_attrib, &stack_size); + if (global_system_variables.log_warnings && stack_size != thread_stack) + { + sql_print_error("Warning: Asked for %ld thread stack, but got %ld", + thread_stack, stack_size); + thread_stack= stack_size; + } + } +#endif + #if defined( SET_RLIMIT_NOFILE) || defined( OS2) /* connections and databases needs lots of files */ { @@ -2349,19 +2363,6 @@ int main(int argc, char **argv) if (!(opt_specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(),CONNECT_PRIOR); pthread_attr_setstacksize(&connection_attrib,thread_stack); -#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE - { - /* Retrieve used stack size; Needed for checking stack overflows */ - size_t stack_size; - pthread_attr_getstacksize(&connection_attrib, &stack_size); - if (global_system_variables.log_warnings && stack_size != thread_stack) - { - sql_print_error("Warning: Asked for %ld thread stack, but got %ld", - thread_stack, stack_size); - thread_stack= stack_size; - } - } -#endif (void) thr_setconcurrency(concurrency); // 10 by default select_thread=pthread_self(); |