Loading BitKeeper/etc/logging_ok +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ miguel@hegel.txg.br miguel@light. miguel@light.local miguel@sartre.local mikael@mc04.(none) mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se mikron@mikael-ronstr-ms-dator.local mleich@mysql.com Loading Loading @@ -132,6 +133,7 @@ mwagner@here.mwagner.org mwagner@work.mysql.com mydev@mysql.com mysql@home.(none) mysql@mc04.(none) mysqldev@build.mysql2.com mysqldev@melody.local mysqldev@mysql.com Loading Loading @@ -161,6 +163,7 @@ ram@ram.(none) ranger@regul.home.lan rburnett@build.mysql.com root@home.(none) root@mc04.(none) root@x3.internalnet salle@banica.(none) salle@geopard.(none) Loading acinclude.m4 +32 −18 Original line number Diff line number Diff line Loading @@ -1548,16 +1548,43 @@ dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used dnl --------------------------------------------------------------------------- AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ AC_ARG_WITH([ndb-sci], AC_HELP_STRING([--with-ndb-sci=DIR], [Provide MySQL with a custom location of sci library. Given DIR, sci library is assumed to be in $DIR/lib and header files in $DIR/include.]), [mysql_sci_dir=${withval}], [mysql_sci_dir=""]) case "$mysql_sci_dir" in "no" ) have_ndb_sci=no AC_MSG_RESULT([-- not including sci transporter]) ;; * ) if test -f "$mysql_sci_dir/lib/libsisci.a" -a \ -f "$mysql_sci_dir/include/sisci_api.h"; then NDB_SCI_INCLUDES="-I$mysql_sci_dir/include" NDB_SCI_LIBS="-L$mysql_sci_dir/lib -lsisci" AC_MSG_RESULT([-- including sci transporter]) AC_DEFINE([NDB_SCI_TRANSPORTER], [1], [Including Ndb Cluster DB sci transporter]) AC_SUBST(NDB_SCI_INCLUDES) AC_SUBST(NDB_SCI_LIBS) have_ndb_sci="yes" AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}]) else AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}]) fi ;; esac AC_ARG_WITH([ndb-shm], [ --with-ndb-shm Include the NDB Cluster shared memory transporter], [ndb_shm="$withval"], [ndb_shm=no]) AC_ARG_WITH([ndb-sci], [ --with-ndb-sci Include the NDB Cluster sci transporter], [ndb_sci="$withval"], [ndb_sci=no]) AC_ARG_WITH([ndb-test], [ --with-ndb-test Include the NDB Cluster ndbapi test programs], Loading Loading @@ -1590,19 +1617,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ;; esac have_ndb_sci=no case "$ndb_sci" in yes ) AC_MSG_RESULT([-- including sci transporter]) AC_DEFINE([NDB_SCI_TRANSPORTER], [1], [Including Ndb Cluster DB sci transporter]) have_ndb_sci="yes" ;; * ) AC_MSG_RESULT([-- not including sci transporter]) ;; esac have_ndb_test=no case "$ndb_test" in yes ) Loading client/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqltest_SOURCES= mysqltest.c mysqltest_SOURCES= mysqltest.c ../mysys/my_getsystime.c mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) Loading client/mysqltest.c +99 −9 Original line number Diff line number Diff line Loading @@ -58,6 +58,13 @@ #include <stdarg.h> #include <sys/stat.h> #include <violite.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif #ifndef MAXPATHLEN #define MAXPATHLEN 256 #endif #define MAX_QUERY 131072 #define MAX_VAR_NAME 256 Loading @@ -75,7 +82,7 @@ #ifndef MYSQL_MANAGER_PORT #define MYSQL_MANAGER_PORT 23546 #endif #define MAX_SERVER_ARGS 20 #define MAX_SERVER_ARGS 64 /* Sometimes in a test the client starts before Loading Loading @@ -132,6 +139,13 @@ static char *embedded_server_args[MAX_SERVER_ARGS]; static my_bool display_result_vertically= FALSE, display_metadata= FALSE; /* See the timer_output() definition for details */ static char *timer_file = NULL; static ulonglong timer_start; static int got_end_timer= FALSE; static void timer_output(void); static ulonglong timer_now(void); static const char *embedded_server_groups[] = { "server", "embedded", Loading Loading @@ -230,6 +244,7 @@ Q_ENABLE_METADATA, Q_DISABLE_METADATA, Q_EXEC, Q_DELIMITER, Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_START_TIMER, Q_END_TIMER, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Loading Loading @@ -308,6 +323,8 @@ const char *command_names[]= "horizontal_results", "query_vertical", "query_horizontal", "start_timer", "end_timer", 0 }; Loading Loading @@ -844,10 +861,10 @@ int do_source(struct st_query* q) 1 error */ int do_exec(struct st_query* q) static void do_exec(struct st_query* q) { int error= 0; DYNAMIC_STRING *ds; int error; DYNAMIC_STRING *ds= NULL; /* Assign just to avoid warning */ DYNAMIC_STRING ds_tmp; char buf[1024]; FILE *res_file; Loading Loading @@ -884,7 +901,15 @@ int do_exec(struct st_query* q) while (fgets(buf, sizeof(buf), res_file)) replace_dynstr_append_mem(ds, buf, strlen(buf)); } error= pclose(res_file); if (error != 0) die("command \"%s\" failed", cmd); if (!disable_result_log) { if (glob_replace) free_replace(); Loading @@ -902,9 +927,6 @@ int do_exec(struct st_query* q) if (ds == &ds_tmp) dynstr_free(&ds_tmp); } pclose(res_file); DBUG_RETURN(error); } Loading Loading @@ -1986,6 +2008,8 @@ static struct my_option my_long_options[] = #include "sslopt-longopts.h" {"test-file", 'x', "Read test from/in this file (default stdin).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"timer-file", 'm', "File where the timing in micro seconds is stored.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tmpdir", 't', "Temporary directory where sockets are put.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"user", 'u', "User for login.", (gptr*) &user, (gptr*) &user, 0, GET_STR, Loading Loading @@ -2047,6 +2071,19 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), die("Could not open %s: errno = %d", argument, errno); break; } case 'm': { static char buff[FN_REFLEN]; if (!test_if_hard_path(argument)) { strxmov(buff, opt_basedir, argument, NullS); argument= buff; } fn_format(buff, argument, "", "", 4); timer_file= buff; unlink(timer_file); /* Ignore error, may not exist */ break; } case 'p': if (argument) { Loading Loading @@ -2128,7 +2165,7 @@ char* safe_str_append(char* buf, const char* str, int size) void str_to_file(const char* fname, char* str, int size) { int fd; char buff[FN_REFLEN]; char buff[MAXPATHLEN]; if (!test_if_hard_path(fname)) { strxmov(buff, opt_basedir, fname, NullS); Loading Loading @@ -2599,6 +2636,9 @@ int main(int argc, char **argv) DBUG_ENTER("main"); DBUG_PROCESS(argv[0]); /* Use all time until exit if no explicit 'start_timer' */ timer_start= timer_now(); save_file[0]=0; TMPDIR[0]=0; memset(cons, 0, sizeof(cons)); Loading Loading @@ -2811,7 +2851,16 @@ int main(int argc, char **argv) (void) mysql_ping(&cur_con->mysql); break; case Q_EXEC: (void) do_exec(q); do_exec(q); break; case Q_START_TIMER: /* Overwrite possible earlier start of timer */ timer_start= timer_now(); break; case Q_END_TIMER: /* End timer before ending mysqltest */ timer_output(); got_end_timer= TRUE; break; default: processed = 0; break; } Loading Loading @@ -2847,6 +2896,8 @@ int main(int argc, char **argv) printf("ok\n"); } if (!got_end_timer) timer_output(); /* No end_timer cmd, end it */ free_used_memory(); exit(error ? 1 : 0); return error ? 1 : 0; /* Keep compiler happy */ Loading Loading @@ -2900,6 +2951,45 @@ static int read_server_arguments(const char *name) return 0; } /****************************************************************************\ * * A primitive timer that give results in milliseconds if the * --timer-file=<filename> is given. The timer result is written * to that file when the result is available. To not confuse * mysql-test-run with an old obsolete result, we remove the file * before executing any commands. The time we measure is * * - If no explicit 'start_timer' or 'end_timer' is given in the * test case, the timer measure how long we execute in mysqltest. * * - If only 'start_timer' is given we measure how long we execute * from that point until we terminate mysqltest. * * - If only 'end_timer' is given we measure how long we execute * from that we enter mysqltest to the 'end_timer' is command is * executed. * * - If both 'start_timer' and 'end_timer' are given we measure * the time between executing the two commands. * \****************************************************************************/ static void timer_output(void) { if (timer_file) { char buf[1024]; ulonglong timer= timer_now() - timer_start; sprintf(buf,"%llu",timer); str_to_file(timer_file,buf,strlen(buf)); } } static ulonglong timer_now(void) { return my_getsystime() / 10000; } /**************************************************************************** * Handle replacement of strings ****************************************************************************/ Loading configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -3024,11 +3024,11 @@ AC_SUBST([ndb_port_base]) ndb_transporter_opt_objs="" if test X"$have_ndb_shm" = Xyes then ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SHM_Transporter.lo SHM_Transporter.unix.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo" fi if test X"$have_ndb_sci" = Xyes then ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SCI_Transporter.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo" fi AC_SUBST([ndb_transporter_opt_objs]) Loading Loading
BitKeeper/etc/logging_ok +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ miguel@hegel.txg.br miguel@light. miguel@light.local miguel@sartre.local mikael@mc04.(none) mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se mikron@mikael-ronstr-ms-dator.local mleich@mysql.com Loading Loading @@ -132,6 +133,7 @@ mwagner@here.mwagner.org mwagner@work.mysql.com mydev@mysql.com mysql@home.(none) mysql@mc04.(none) mysqldev@build.mysql2.com mysqldev@melody.local mysqldev@mysql.com Loading Loading @@ -161,6 +163,7 @@ ram@ram.(none) ranger@regul.home.lan rburnett@build.mysql.com root@home.(none) root@mc04.(none) root@x3.internalnet salle@banica.(none) salle@geopard.(none) Loading
acinclude.m4 +32 −18 Original line number Diff line number Diff line Loading @@ -1548,16 +1548,43 @@ dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used dnl --------------------------------------------------------------------------- AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ AC_ARG_WITH([ndb-sci], AC_HELP_STRING([--with-ndb-sci=DIR], [Provide MySQL with a custom location of sci library. Given DIR, sci library is assumed to be in $DIR/lib and header files in $DIR/include.]), [mysql_sci_dir=${withval}], [mysql_sci_dir=""]) case "$mysql_sci_dir" in "no" ) have_ndb_sci=no AC_MSG_RESULT([-- not including sci transporter]) ;; * ) if test -f "$mysql_sci_dir/lib/libsisci.a" -a \ -f "$mysql_sci_dir/include/sisci_api.h"; then NDB_SCI_INCLUDES="-I$mysql_sci_dir/include" NDB_SCI_LIBS="-L$mysql_sci_dir/lib -lsisci" AC_MSG_RESULT([-- including sci transporter]) AC_DEFINE([NDB_SCI_TRANSPORTER], [1], [Including Ndb Cluster DB sci transporter]) AC_SUBST(NDB_SCI_INCLUDES) AC_SUBST(NDB_SCI_LIBS) have_ndb_sci="yes" AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}]) else AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}]) fi ;; esac AC_ARG_WITH([ndb-shm], [ --with-ndb-shm Include the NDB Cluster shared memory transporter], [ndb_shm="$withval"], [ndb_shm=no]) AC_ARG_WITH([ndb-sci], [ --with-ndb-sci Include the NDB Cluster sci transporter], [ndb_sci="$withval"], [ndb_sci=no]) AC_ARG_WITH([ndb-test], [ --with-ndb-test Include the NDB Cluster ndbapi test programs], Loading Loading @@ -1590,19 +1617,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ;; esac have_ndb_sci=no case "$ndb_sci" in yes ) AC_MSG_RESULT([-- including sci transporter]) AC_DEFINE([NDB_SCI_TRANSPORTER], [1], [Including Ndb Cluster DB sci transporter]) have_ndb_sci="yes" ;; * ) AC_MSG_RESULT([-- not including sci transporter]) ;; esac have_ndb_test=no case "$ndb_test" in yes ) Loading
client/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqltest_SOURCES= mysqltest.c mysqltest_SOURCES= mysqltest.c ../mysys/my_getsystime.c mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB) Loading
client/mysqltest.c +99 −9 Original line number Diff line number Diff line Loading @@ -58,6 +58,13 @@ #include <stdarg.h> #include <sys/stat.h> #include <violite.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif #ifndef MAXPATHLEN #define MAXPATHLEN 256 #endif #define MAX_QUERY 131072 #define MAX_VAR_NAME 256 Loading @@ -75,7 +82,7 @@ #ifndef MYSQL_MANAGER_PORT #define MYSQL_MANAGER_PORT 23546 #endif #define MAX_SERVER_ARGS 20 #define MAX_SERVER_ARGS 64 /* Sometimes in a test the client starts before Loading Loading @@ -132,6 +139,13 @@ static char *embedded_server_args[MAX_SERVER_ARGS]; static my_bool display_result_vertically= FALSE, display_metadata= FALSE; /* See the timer_output() definition for details */ static char *timer_file = NULL; static ulonglong timer_start; static int got_end_timer= FALSE; static void timer_output(void); static ulonglong timer_now(void); static const char *embedded_server_groups[] = { "server", "embedded", Loading Loading @@ -230,6 +244,7 @@ Q_ENABLE_METADATA, Q_DISABLE_METADATA, Q_EXEC, Q_DELIMITER, Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_START_TIMER, Q_END_TIMER, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Loading Loading @@ -308,6 +323,8 @@ const char *command_names[]= "horizontal_results", "query_vertical", "query_horizontal", "start_timer", "end_timer", 0 }; Loading Loading @@ -844,10 +861,10 @@ int do_source(struct st_query* q) 1 error */ int do_exec(struct st_query* q) static void do_exec(struct st_query* q) { int error= 0; DYNAMIC_STRING *ds; int error; DYNAMIC_STRING *ds= NULL; /* Assign just to avoid warning */ DYNAMIC_STRING ds_tmp; char buf[1024]; FILE *res_file; Loading Loading @@ -884,7 +901,15 @@ int do_exec(struct st_query* q) while (fgets(buf, sizeof(buf), res_file)) replace_dynstr_append_mem(ds, buf, strlen(buf)); } error= pclose(res_file); if (error != 0) die("command \"%s\" failed", cmd); if (!disable_result_log) { if (glob_replace) free_replace(); Loading @@ -902,9 +927,6 @@ int do_exec(struct st_query* q) if (ds == &ds_tmp) dynstr_free(&ds_tmp); } pclose(res_file); DBUG_RETURN(error); } Loading Loading @@ -1986,6 +2008,8 @@ static struct my_option my_long_options[] = #include "sslopt-longopts.h" {"test-file", 'x', "Read test from/in this file (default stdin).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"timer-file", 'm', "File where the timing in micro seconds is stored.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tmpdir", 't', "Temporary directory where sockets are put.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"user", 'u', "User for login.", (gptr*) &user, (gptr*) &user, 0, GET_STR, Loading Loading @@ -2047,6 +2071,19 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), die("Could not open %s: errno = %d", argument, errno); break; } case 'm': { static char buff[FN_REFLEN]; if (!test_if_hard_path(argument)) { strxmov(buff, opt_basedir, argument, NullS); argument= buff; } fn_format(buff, argument, "", "", 4); timer_file= buff; unlink(timer_file); /* Ignore error, may not exist */ break; } case 'p': if (argument) { Loading Loading @@ -2128,7 +2165,7 @@ char* safe_str_append(char* buf, const char* str, int size) void str_to_file(const char* fname, char* str, int size) { int fd; char buff[FN_REFLEN]; char buff[MAXPATHLEN]; if (!test_if_hard_path(fname)) { strxmov(buff, opt_basedir, fname, NullS); Loading Loading @@ -2599,6 +2636,9 @@ int main(int argc, char **argv) DBUG_ENTER("main"); DBUG_PROCESS(argv[0]); /* Use all time until exit if no explicit 'start_timer' */ timer_start= timer_now(); save_file[0]=0; TMPDIR[0]=0; memset(cons, 0, sizeof(cons)); Loading Loading @@ -2811,7 +2851,16 @@ int main(int argc, char **argv) (void) mysql_ping(&cur_con->mysql); break; case Q_EXEC: (void) do_exec(q); do_exec(q); break; case Q_START_TIMER: /* Overwrite possible earlier start of timer */ timer_start= timer_now(); break; case Q_END_TIMER: /* End timer before ending mysqltest */ timer_output(); got_end_timer= TRUE; break; default: processed = 0; break; } Loading Loading @@ -2847,6 +2896,8 @@ int main(int argc, char **argv) printf("ok\n"); } if (!got_end_timer) timer_output(); /* No end_timer cmd, end it */ free_used_memory(); exit(error ? 1 : 0); return error ? 1 : 0; /* Keep compiler happy */ Loading Loading @@ -2900,6 +2951,45 @@ static int read_server_arguments(const char *name) return 0; } /****************************************************************************\ * * A primitive timer that give results in milliseconds if the * --timer-file=<filename> is given. The timer result is written * to that file when the result is available. To not confuse * mysql-test-run with an old obsolete result, we remove the file * before executing any commands. The time we measure is * * - If no explicit 'start_timer' or 'end_timer' is given in the * test case, the timer measure how long we execute in mysqltest. * * - If only 'start_timer' is given we measure how long we execute * from that point until we terminate mysqltest. * * - If only 'end_timer' is given we measure how long we execute * from that we enter mysqltest to the 'end_timer' is command is * executed. * * - If both 'start_timer' and 'end_timer' are given we measure * the time between executing the two commands. * \****************************************************************************/ static void timer_output(void) { if (timer_file) { char buf[1024]; ulonglong timer= timer_now() - timer_start; sprintf(buf,"%llu",timer); str_to_file(timer_file,buf,strlen(buf)); } } static ulonglong timer_now(void) { return my_getsystime() / 10000; } /**************************************************************************** * Handle replacement of strings ****************************************************************************/ Loading
configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -3024,11 +3024,11 @@ AC_SUBST([ndb_port_base]) ndb_transporter_opt_objs="" if test X"$have_ndb_shm" = Xyes then ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SHM_Transporter.lo SHM_Transporter.unix.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo" fi if test X"$have_ndb_sci" = Xyes then ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SCI_Transporter.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo" fi AC_SUBST([ndb_transporter_opt_objs]) Loading