From 4ef7be4c329bb1257888280440cbf11758d53518 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jun 2006 15:56:08 +0200 Subject: [PATCH 1/7] Set default valgrind options to "-v --show-reachable=yes" and make it possible to override that with --valgrind-options mysql-test/mysql-test-run.pl: Make --valgrind-all a synonym for --valgrind. Set "-v --show-reachable=yes" as our default valgrind options. Make --valgrind-options override the default options Update usage. Turn on valgrinding also when user specified --valgrind-path or --valgrind-options without --valgrind --- mysql-test/mysql-test-run.pl | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 92407380ac2..bfd1f7de059 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -286,7 +286,7 @@ our $opt_user_test; our $opt_valgrind= 0; our $opt_valgrind_mysqld= 0; our $opt_valgrind_mysqltest= 0; -our $opt_valgrind_all= 0; +our $default_valgrind_options= "-v --show-reachable=yes"; our $opt_valgrind_options; our $opt_valgrind_path; @@ -597,10 +597,9 @@ sub command_line_setup () { # Coverage, profiling etc 'gcov' => \$opt_gcov, 'gprof' => \$opt_gprof, - 'valgrind' => \$opt_valgrind, + 'valgrind|valgrind-all' => \$opt_valgrind, 'valgrind-mysqltest' => \$opt_valgrind_mysqltest, 'valgrind-mysqld' => \$opt_valgrind_mysqld, - 'valgrind-all' => \$opt_valgrind_all, 'valgrind-options=s' => \$opt_valgrind_options, 'valgrind-path=s' => \$opt_valgrind_path, @@ -807,20 +806,32 @@ sub command_line_setup () { $opt_with_ndbcluster= 0; } - # Turn on valgrinding of all executables if "valgrind" or "valgrind-all" - if ( $opt_valgrind or $opt_valgrind_all ) + # Check valgrind arguments + if ( $opt_valgrind or $opt_valgrind_path or defined $opt_valgrind_options) { mtr_report("Turning on valgrind for all executables"); $opt_valgrind= 1; $opt_valgrind_mysqld= 1; $opt_valgrind_mysqltest= 1; } - elsif ( $opt_valgrind_mysqld or $opt_valgrind_mysqltest ) + elsif ( $opt_valgrind_mysqld ) { - # If test's are run for a specific executable, turn on - # verbose and show-reachable + mtr_report("Turning on valgrind for mysqld(s) only"); $opt_valgrind= 1; - $opt_valgrind_all= 1; + } + elsif ( $opt_valgrind_mysqltest ) + { + mtr_report("Turning on valgrind for mysqltest only"); + $opt_valgrind= 1; + } + + if ( $opt_valgrind ) + { + # Set valgrind_options to default unless already defined + $opt_valgrind_options=$default_valgrind_options + unless defined $opt_valgrind_options; + + mtr_report("Running valgrind with options \"$opt_valgrind_options\""); } if ( ! $opt_testcase_timeout ) @@ -3409,17 +3420,8 @@ sub valgrind_arguments { mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) if -f "$glob_mysql_test_dir/valgrind.supp"; - if ( $opt_valgrind_all ) - { - mtr_add_arg($args, "-v"); - mtr_add_arg($args, "--show-reachable=yes"); - } - - if ( $opt_valgrind_options ) - { - mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options)); - } - + # Add valgrind options, can be overriden by user + mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options)); mtr_add_arg($args, $$exe); @@ -3519,12 +3521,12 @@ Options for coverage, profiling etc gcov FIXME gprof FIXME - valgrind Run the "mysqltest" and "mysqld" executables using valgrind - valgrind-all Same as "valgrind" but will also add "verbose" and "--show-reachable" - flags to valgrind + valgrind Run the "mysqltest" and "mysqld" executables using + valgrind with options($default_valgrind_options) + valgrind-all Synonym for --valgrind valgrind-mysqltest Run the "mysqltest" executable with valgrind valgrind-mysqld Run the "mysqld" executable with valgrind - valgrind-options=ARGS Extra options to give valgrind + valgrind-options=ARGS Options to give valgrind, replaces default options valgrind-path=[EXE] Path to the valgrind executable Misc options From e2d3943c6a33870b68f8f1b9384e2869baf99ec3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jun 2006 22:29:52 +0200 Subject: [PATCH 2/7] .del-mysql_install.def~8da659e7c0f7e571: Delete: netware/mysql_install.def Makefile.am: Removed obsolete "mysql_install.def" netware/Makefile.am: Removed obsolete "mysql_install.def" BitKeeper/deleted/.del-mysql_install.def~8da659e7c0f7e571: Delete: netware/mysql_install.def --- netware/Makefile.am | 4 ++-- netware/mysql_install.def | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 netware/mysql_install.def diff --git a/netware/Makefile.am b/netware/Makefile.am index 0588e6b1ade..527425d3207 100644 --- a/netware/Makefile.am +++ b/netware/Makefile.am @@ -29,7 +29,7 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ client/mysqlbinlog.def client/mysqlcheck.def \ client/mysqldump.def client/mysqlimport.def \ client/mysqlshow.def client/mysqltest.def \ - extra/mysql_install.def extra/my_print_defaults.def \ + extra/my_print_defaults.def \ extra/perror.def extra/replace.def \ extra/resolveip.def extra/comp_err.def \ isam/isamchk.def \ @@ -52,7 +52,7 @@ EXTRA_DIST= comp_err.def init_db.sql install_test_db.ncf \ libmysqlmain.c my_manage.c my_manage.h \ my_print_defaults.def myisam_ftdump.def myisamchk.def \ myisamlog.def myisampack.def mysql.def mysql.xdc \ - mysql_fix_privilege_tables.pl mysql_install.def \ + mysql_fix_privilege_tables.pl \ mysql_install_db.c mysql_install_db.def \ mysql_secure_installation.pl mysql_test_run.c \ mysql_test_run.def mysql_waitpid.def mysqladmin.def \ diff --git a/netware/mysql_install.def b/netware/mysql_install.def deleted file mode 100644 index 3392afb7298..00000000000 --- a/netware/mysql_install.def +++ /dev/null @@ -1,10 +0,0 @@ -#------------------------------------------------------------------------------ -# My Print Defaults -#------------------------------------------------------------------------------ -MODULE libc.nlm -COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." -DESCRIPTION "MySQL Install Tool" -VERSION 4, 0 -XDCDATA ../netware/mysql.xdc -#DEBUG - From 91fb831076504e4760eb9bdfb1683d5221e1aeae Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Jun 2006 00:30:02 +0200 Subject: [PATCH 3/7] configure.in, net_serv.cc, compile-netware-END: Changes for Netware sql/net_serv.cc: Netware needs configure.in: Call of "comp_err" has moved, changed code for Netware that edits make files to reflect this netware/BUILD/compile-netware-END: After correcting "configure.in" to edit make files correctly, removed obsolete "sed" of "extra/Makefile.am" for Netware --- configure.in | 6 +++--- netware/BUILD/compile-netware-END | 5 ----- sql/net_serv.cc | 4 ++++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 3c335089688..fd2cf3baf97 100644 --- a/configure.in +++ b/configure.in @@ -1137,7 +1137,7 @@ dnl Is this the right match for DEC OSF on alpha? # Edit Makefile.in files. # echo -n "configuring Makefile.in files for NetWare... " - for file in sql/Makefile.in libmysql/Makefile.in libmysql_r/Makefile.in sql/share/Makefile.in strings/Makefile.in client/Makefile.in + for file in sql/Makefile.in libmysql/Makefile.in libmysql_r/Makefile.in extra/Makefile.in strings/Makefile.in client/Makefile.in do # echo "#### $file ####" filedir="`dirname $file`" @@ -1163,9 +1163,9 @@ s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux, s%\(mysqld_DEPENDENCIES = \) %\1$lib_DEPENDENCIES % EOF ;; - sql/share/Makefile.in) + extra/Makefile.in) cat > $filesed << EOF -s,\(extra/comp_err\),\1.linux, +s,\(extra/comp_err\)\$(EXEEXT),\1.linux, EOF ;; libmysql/Makefile.in) diff --git a/netware/BUILD/compile-netware-END b/netware/BUILD/compile-netware-END index f7da0d9596e..c5c08cea908 100755 --- a/netware/BUILD/compile-netware-END +++ b/netware/BUILD/compile-netware-END @@ -21,11 +21,6 @@ rm -rf Makefile.in.bk # run auto tools . $path/compile-AUTOTOOLS -# For NetWare there is no comp_err but comp_err.linux -sed -e "s/comp_err/comp_err.linux/g" extra/Makefile.am > extra/Makefile.am.$$ -sed -e "s/replace comp_err.linux/replace comp_err/g" extra/Makefile.am.$$ > extra/Makefile.am -rm extra/Makefile.am.$$ - # configure ./configure $base_configs $extra_configs diff --git a/sql/net_serv.cc b/sql/net_serv.cc index c80bb8bad9a..cf9dc6e3f60 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -52,6 +52,10 @@ #include #include +#ifdef __NETWARE__ +#include +#endif + #ifdef EMBEDDED_LIBRARY #undef MYSQL_SERVER #undef MYSQL_CLIENT From 4a4a82a4a844b7727c3ec3d2b44a801fe2dfcc3f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Jun 2006 03:04:43 +0200 Subject: [PATCH 4/7] make_win_src_distribution.sh: Include "sql_yacc.yy" for completeness (bug#20387) scripts/make_win_src_distribution.sh: Include "sql_yacc.yy" for completeness (bug#20387) Improved error handling Don't list all files packed with tar/zip unless debugging --- scripts/make_win_src_distribution.sh | 49 +++++++++++++++++++--------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index b9b39f1b02f..028986b1fe3 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -1,11 +1,14 @@ #!/bin/sh +# Terminate loudly on error, we don't want partial package +set -e +trap "echo '*** script failed ***'" 0 + # # Script to create a Windows src package # version=@VERSION@ -export version CP="cp -p" DEBUG=0 @@ -199,7 +202,7 @@ copy_dir_files() print_debug "Creating directory '$arg'" mkdir $BASE/$arg fi - for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp \ + for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp *.yy \ README INSTALL* LICENSE AUTHORS NEWS ChangeLog \ *.inc *.test *.result *.pem Moscow_leap des_key_file \ *.vcproj *.sln *.dat *.000001 *.require *.opt @@ -260,7 +263,7 @@ done # # Create project files for ndb # -make -C $SOURCE/ndb windoze +make -C $SOURCE/ndb windoze || true # # Input directories to be copied recursively @@ -334,8 +337,17 @@ done # Fix some windows files to avoid compiler warnings # -./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new -mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp +if [ -x extra/replace ] ; then + ./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | \ + sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' \ + > $BASE/sql/sql_yacc.cpp-new + mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp +else + if [ "$SILENT" = "0" ] ; then + echo 'WARNING: "extra/replace" not built, can not filter "sql_yacc.ccp"' + echo 'WARNING: to reduce the number of warnings when building' + fi +fi # # Search the tree for plain text files and adapt the line end marker @@ -349,8 +361,6 @@ find $BASE \( -name "*.cnf" -o -name "*.ini" \ do unix_to_dos $v done -# File extension '.txt' matches too many other files, error messages etc. -unix_to_dos $BASE/Docs/*.txt mv $BASE/README $BASE/README.txt @@ -358,19 +368,23 @@ mv $BASE/README $BASE/README.txt # Clean up if we did this from a bk tree # -if [ -d $BASE/SSL/SCCS ] -then - find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f -fi -find $BASE/ -type d -name .deps -printf " \"%p\"" | xargs rm -r -f -find $BASE/ -type d -name .libs -printf " \"%p\"" | xargs rm -r -f +find $BASE -type d \( -name SCCS -o -name .deps -o -name .libs \) -print0 | \ +xargs -0 rm -r -f rm -r -f "$BASE/mysql-test/var" # # Initialize the initial data directory # -if [ -f scripts/mysql_install_db ]; then +if [ ! -f scripts/mysql_install_db ] ; then + if [ "$SILENT" = "0" ] ; then + echo 'WARNING: "scripts/mysql_install_db" is not built, can not initiate databases' + fi +elif [ ! -f extra/my_print_defaults ]; then + if [ "$SILENT" = "0" ] ; then + echo 'WARNING: "extra/my_print_defaults" is not built, can not initiate databases' + fi +else print_debug "Initializing the 'data' directory" scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data if test "$?" = 1 @@ -451,7 +465,7 @@ set_tarzip_options() OPT=cvf EXT=".tar" NEED_COMPRESS=1 - if [ "$SILENT" = "1" ] ; then + if [ "$DEBUG" = "0" ] ; then OPT=cf fi else @@ -460,7 +474,7 @@ set_tarzip_options() OPT="-r" EXT=".zip" NEED_COMPRESS=0 - if [ "$SILENT" = "1" ] ; then + if [ "$DEBUG" = "0" ] ; then OPT="$OPT -q" fi fi @@ -523,4 +537,7 @@ fi print_debug "Removing temporary directory" rm -r -f $BASE +# No need to report anything if we got here +trap "" 0 + # End of script From 2aa2db7a87a8c99a7441f5343d023c308691a1eb Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Jun 2006 10:44:52 +0200 Subject: [PATCH 5/7] make_win_src_distribution.sh: Don't try copy non existing extra/{sql_state,mysqld_error}.h scripts/make_win_src_distribution.sh: Don't try copy non existing extra/{sql_state,mysqld_error}.h --- scripts/make_win_src_distribution.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 9c3aa6c9b4c..6ad8d4f1f9b 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -301,8 +301,6 @@ do fi done -cp extra/sql_state.h extra/mysqld_error.h $BASE/include - # # support files # From d1e21c2c204c3a5b9106b2041862aa02119b40d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Jun 2006 11:33:34 +0200 Subject: [PATCH 6/7] make_win_src_distribution.sh: Make output less verbose Make temporary directory name unique Remove temporary directory on interrupt scripts/make_win_src_distribution.sh: Make output less verbose Make temporary directory name unique Remove temporary directory on interrupt --- scripts/make_win_src_distribution.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 028986b1fe3..4e5cc2ada46 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -77,7 +77,7 @@ show_usage() echo " --tmp Specify the temporary location" echo " --suffix Suffix name for the package" echo " --dirname Directory name to copy files (intermediate)" - echo " --silent Do not list verbosely files processed" + echo " --silent Show no progress information" echo " --tar Create tar.gz package" echo " --zip Create zip package" echo " --help Show this help message" @@ -143,10 +143,11 @@ unix_to_dos() # Create a tmp dest directory to copy files # -BASE=$TMP/my_win_dist$SUFFIX +BASE=$TMP/my_win_dist$SUFFIX.$$ +trap "rm -r -f $BASE; echo '*** interrupted ***'; exit 1" 1 2 3 13 15 if [ -d $BASE ] ; then - print_debug "Destination directory '$BASE' already exists, deleting it" + echo "WARNING: Destination directory '$BASE' already exists, deleting it" rm -r -f $BASE fi @@ -462,21 +463,15 @@ set_tarzip_options() if [ "$arg" = "tar" ]; then ZIPFILE1=gnutar ZIPFILE2=gtar - OPT=cvf + OPT=cf EXT=".tar" NEED_COMPRESS=1 - if [ "$DEBUG" = "0" ] ; then - OPT=cf - fi else ZIPFILE1=zip ZIPFILE2="" - OPT="-r" + OPT="-r -q" EXT=".zip" NEED_COMPRESS=0 - if [ "$DEBUG" = "0" ] ; then - OPT="$OPT -q" - fi fi done } From 4d366600b87451881d64b027e6efe849adf29c42 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Jun 2006 15:37:23 +0200 Subject: [PATCH 7/7] Makefile.am: Avoid error message trying 'windoze-dsp' in obsolete directory compile-dist: Avoid error message for target 'distclean' and no Makefile BUILD/compile-dist: Avoid error message for target 'distclean' and no Makefile ndb/Makefile.am: Avoid error message trying 'windoze-dsp' in obsolete directory --- BUILD/compile-dist | 2 +- ndb/Makefile.am | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 39095f59ffa..613f2643c56 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -6,7 +6,7 @@ # tree can then be picked up by "make dist" to create the "pristine source # package" that is used as the basis for all other binary builds. # -make distclean +test -f Makefile && make distclean aclocal autoheader libtoolize --automake --force --copy diff --git a/ndb/Makefile.am b/ndb/Makefile.am index 32c821383e6..7162253f24b 100644 --- a/ndb/Makefile.am +++ b/ndb/Makefile.am @@ -19,7 +19,8 @@ dist-hook: done windoze: - for i in `find . -name 'Makefile.am'`; do make -C `dirname $$i` windoze-dsp; done + for i in `find . -name 'old_dirs' -prune -o -name 'Makefile.am' -print`; \ + do make -C `dirname $$i` windoze-dsp; done windoze-dsp: