Loading acconfig.h +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ /* Do we have FIONREAD */ #undef FIONREAD_IN_SYS_IOCTL /* Do we need to define _GNU_SOURCE */ #undef _GNU_SOURCE /* atomic_add() from <asm/atomic.h> (Linux only) */ #undef HAVE_ATOMIC_ADD Loading acinclude.m4 +8 −4 Original line number Diff line number Diff line Loading @@ -904,9 +904,13 @@ AC_DEFUN(AC_SYS_LARGEFILE, AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.]) if test "$IS_LINUX" = "true"; then AC_DEFINE(_GNU_SOURCE) else AC_SYS_LARGEFILE_MACRO_VALUE(_XOPEN_SOURCE, 500, ac_cv_sys_xopen_source, [Define to make ftello visible on some hosts (e.g. glibc 2.1.3).], [#include <stdio.h>], [return !ftello;]) fi fi ]) include/global.h +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ /* Fix problem with S_ISLNK() on Linux */ #if defined(HAVE_LINUXTHREADS) #undef _GNU_SOURCE #define _GNU_SOURCE 1 #endif Loading sql/mysqld.cc +27 −23 Original line number Diff line number Diff line Loading @@ -612,6 +612,7 @@ void clean_up(void) my_free(mysql_tmpdir,MYF(0)); x_free(opt_bin_logname); #ifndef __WIN__ if (!opt_bootstrap) (void) my_delete(pidfile_name,MYF(0)); // This may not always exist #endif end_slave(); Loading Loading @@ -1150,13 +1151,15 @@ static void *signal_hand(void *arg __attribute__((unused))) (void) sigaddset(&set,SIGTSTP); /* Save pid to this process (or thread on Linux) */ if (!opt_bootstrap) { FILE *pidFile; if ((pidFile = my_fopen(pidfile_name,O_WRONLY,MYF(MY_WME)))) File pidFile; if ((pidFile = my_create(pidfile_name,0664, O_WRONLY, MYF(MY_WME))) >= 0) { fprintf(pidFile,"%lu",(ulong) getpid()); (void) my_fclose(pidFile,MYF(0)); (void) chmod(pidfile_name,0644); char buff[21]; sprintf(buff,"%lu",(ulong) getpid()); (void) my_write(pidFile, buff,sizeof(buff),MYF(MY_WME)); (void) my_close(pidFile,MYF(0)); } } Loading Loading @@ -1508,16 +1511,16 @@ int main(int argc, char **argv) if (opt_bin_log && !server_id) { server_id= !master_host ? 1 : 2; switch(server_id) { switch (server_id) { case 1: sql_print_error("Warning: one should set \ server_id to a non-0 value if log-bin is enabled. Will log updates to \ binary log, but will not accept connections from slaves"); sql_print_error("\ Warning: one should set server_id to a non-0 value if log-bin is enabled.\n\ Will log updates to binary log, but will not accept connections from slaves"); break; default: sql_print_error("Warning: one should set server_id to a non-0 value\ if master_host is set. The server will not act as a slave"); sql_print_error("\ Warning: one should set server_id to a non-0 value if master_host is set.\n\ The server will not act as a slave"); break; } } Loading Loading @@ -1589,6 +1592,7 @@ if master_host is set. The server will not act as a slave"); select_thread_in_use=0; (void) pthread_kill(signal_thread,MYSQL_KILL_SIGNAL); #ifndef __WIN__ if (!opt_bootstrap) (void) my_delete(pidfile_name,MYF(MY_WME)); // Not neaded anymore #endif exit(1); Loading Loading @@ -2249,7 +2253,7 @@ static struct option long_options[] = { {"bdb-logdir", required_argument, 0, (int) OPT_BDB_LOG}, {"bdb-recover", no_argument, 0, (int) OPT_BDB_RECOVER}, {"bdb-no-sync", no_argument, 0, (int) OPT_BDB_NOSYNC}, {"bdb-shared-data", required_argument, 0, (int) OPT_BDB_SHARED}, {"bdb-shared-data", no_argument, 0, (int) OPT_BDB_SHARED}, {"bdb-tmpdir", required_argument, 0, (int) OPT_BDB_TMP}, #endif {"big-tables", no_argument, 0, (int) OPT_BIG_TABLES}, Loading Loading @@ -2909,7 +2913,7 @@ static void get_options(int argc,char **argv) usage(); exit(0); case 'T': test_flags= optarg ? (uint) atoi(optarg) : (uint) ~0; test_flags= optarg ? (uint) atoi(optarg) : 0; opt_endinfo=1; break; case 'S': Loading Loading
acconfig.h +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ /* Do we have FIONREAD */ #undef FIONREAD_IN_SYS_IOCTL /* Do we need to define _GNU_SOURCE */ #undef _GNU_SOURCE /* atomic_add() from <asm/atomic.h> (Linux only) */ #undef HAVE_ATOMIC_ADD Loading
acinclude.m4 +8 −4 Original line number Diff line number Diff line Loading @@ -904,9 +904,13 @@ AC_DEFUN(AC_SYS_LARGEFILE, AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.]) if test "$IS_LINUX" = "true"; then AC_DEFINE(_GNU_SOURCE) else AC_SYS_LARGEFILE_MACRO_VALUE(_XOPEN_SOURCE, 500, ac_cv_sys_xopen_source, [Define to make ftello visible on some hosts (e.g. glibc 2.1.3).], [#include <stdio.h>], [return !ftello;]) fi fi ])
include/global.h +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ /* Fix problem with S_ISLNK() on Linux */ #if defined(HAVE_LINUXTHREADS) #undef _GNU_SOURCE #define _GNU_SOURCE 1 #endif Loading
sql/mysqld.cc +27 −23 Original line number Diff line number Diff line Loading @@ -612,6 +612,7 @@ void clean_up(void) my_free(mysql_tmpdir,MYF(0)); x_free(opt_bin_logname); #ifndef __WIN__ if (!opt_bootstrap) (void) my_delete(pidfile_name,MYF(0)); // This may not always exist #endif end_slave(); Loading Loading @@ -1150,13 +1151,15 @@ static void *signal_hand(void *arg __attribute__((unused))) (void) sigaddset(&set,SIGTSTP); /* Save pid to this process (or thread on Linux) */ if (!opt_bootstrap) { FILE *pidFile; if ((pidFile = my_fopen(pidfile_name,O_WRONLY,MYF(MY_WME)))) File pidFile; if ((pidFile = my_create(pidfile_name,0664, O_WRONLY, MYF(MY_WME))) >= 0) { fprintf(pidFile,"%lu",(ulong) getpid()); (void) my_fclose(pidFile,MYF(0)); (void) chmod(pidfile_name,0644); char buff[21]; sprintf(buff,"%lu",(ulong) getpid()); (void) my_write(pidFile, buff,sizeof(buff),MYF(MY_WME)); (void) my_close(pidFile,MYF(0)); } } Loading Loading @@ -1508,16 +1511,16 @@ int main(int argc, char **argv) if (opt_bin_log && !server_id) { server_id= !master_host ? 1 : 2; switch(server_id) { switch (server_id) { case 1: sql_print_error("Warning: one should set \ server_id to a non-0 value if log-bin is enabled. Will log updates to \ binary log, but will not accept connections from slaves"); sql_print_error("\ Warning: one should set server_id to a non-0 value if log-bin is enabled.\n\ Will log updates to binary log, but will not accept connections from slaves"); break; default: sql_print_error("Warning: one should set server_id to a non-0 value\ if master_host is set. The server will not act as a slave"); sql_print_error("\ Warning: one should set server_id to a non-0 value if master_host is set.\n\ The server will not act as a slave"); break; } } Loading Loading @@ -1589,6 +1592,7 @@ if master_host is set. The server will not act as a slave"); select_thread_in_use=0; (void) pthread_kill(signal_thread,MYSQL_KILL_SIGNAL); #ifndef __WIN__ if (!opt_bootstrap) (void) my_delete(pidfile_name,MYF(MY_WME)); // Not neaded anymore #endif exit(1); Loading Loading @@ -2249,7 +2253,7 @@ static struct option long_options[] = { {"bdb-logdir", required_argument, 0, (int) OPT_BDB_LOG}, {"bdb-recover", no_argument, 0, (int) OPT_BDB_RECOVER}, {"bdb-no-sync", no_argument, 0, (int) OPT_BDB_NOSYNC}, {"bdb-shared-data", required_argument, 0, (int) OPT_BDB_SHARED}, {"bdb-shared-data", no_argument, 0, (int) OPT_BDB_SHARED}, {"bdb-tmpdir", required_argument, 0, (int) OPT_BDB_TMP}, #endif {"big-tables", no_argument, 0, (int) OPT_BIG_TABLES}, Loading Loading @@ -2909,7 +2913,7 @@ static void get_options(int argc,char **argv) usage(); exit(0); case 'T': test_flags= optarg ? (uint) atoi(optarg) : (uint) ~0; test_flags= optarg ? (uint) atoi(optarg) : 0; opt_endinfo=1; break; case 'S': Loading