Commit graph

101 commits

Author SHA1 Message Date
unknown
da728f8b81 Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/greenman/workspace-mysql/mysql/pending/bug-5.0-18979
2006-06-28 08:36:01 -07:00
unknown
799c5935f0 Small fix for test suite:
- fix for IM stopping routine;
  - polishing.


mysql-test/lib/mtr_process.pl:
  Polishing: make mtr_kill_process() more verbose in debug mode.
mysql-test/mysql-test-run.pl:
  1. Fix stopping of IM running as a daemon -- after death of the main IM
  process, we should wait for the IM angel to die.
  2. Polishing -- be more verbose in debug mode.
2006-06-19 14:15:26 +04:00
unknown
2ce5e54e0a Merge mysql.com:/opt/local/work/mysql-5.0-root
into  mysql.com:/opt/local/work/mysql-5.0-runtime-merge


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_options_set.result:
  Auto merged
mysql-test/r/im_options_unset.result:
  Auto merged
mysql-test/r/trigger-grant.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-05-15 00:51:12 +04:00
unknown
f4d209b015 Partial fix for BUG#14106: IM: im_life_cycle and im_utils
tests fail on FreeBSD.

The patch contains of the following:
  - make Instance Manager, running in the daemon mode, dump
    the pid of angel-process in the special file;
  - default value of angel-pid-file-name is 'mysqlmanager.angel.pid';
  - if ordinary (IM) pid-file-name is specified in the configuration,
    angel-pid-file-name is updated according to the following
    rule: extension of the basename of pid-file-name is replaced by
    '.angel.pid.
    For example:
    - pid-file-name: /tmp/im.pid
      => angel-pid-file-name: /tmp/im.angel.pid
    - pid-file-name: /tmp/im.txt
      => angel-pid-file-name: /tmp/im.angel.pid
    - pid-file-name: /tmp/5.0/im
      => angel-pid-file-name: /tmp/5.0/im.angel.pid
  - add support for configuration option to customize angel
    pid file name;
  - fix test suite to use angel pid to kill Instance Manager
    by all means if something went wrong.

Background
----------

The problem is that on some OSes (FreeBSD for one) Instance
Manager does not get SIGTERM, so can not shutdown gracefully.
Test suite wasn't able to cope with it, so this leads to the
mess in test results.

The problem should be split into two:
  - fix signal handling;
  - fix test suite.

This patch fixes test suite so that it will be able to kill
uncooperative Instance Manager. In order to achieve this,
test suite needs to know PID of IM Angel process.


mysql-test/lib/mtr_process.pl:
  Added a function to send a signal to a process.
mysql-test/mysql-test-run.pl:
  Changed procedure of stopping Instance Manager.
  1. Try to stop IM normally (by sending SIGTERM);
  2. If one of IM-related processes is still alive,
  kill them all by SIGKILL and complain in the log.
server-tools/instance-manager/manager.cc:
  Made create_pid_file() available for the whole project.
server-tools/instance-manager/manager.h:
  Made create_pid_file() available for the whole project.
server-tools/instance-manager/mysqlmanager.cc:
  Dump PID of angel process into file.
server-tools/instance-manager/options.cc:
  Added an option to allow to customize angel pid file name.
server-tools/instance-manager/options.h:
  Added an option to allow to customize angel pid file name.
2006-05-06 13:57:56 +04:00
unknown
afe4715242 Fixed wrong free in sql_view.cc
mysql-test-run now fails in case of warnings


mysql-test/lib/mtr_report.pl:
  Fail if find warnings
mysql-test/mysql-test-run.sh:
  Fail if find warnings
sql/sql_lex.cc:
  Initalize st_lex properly
sql/sql_view.cc:
  Fixed problem with unaligned memory (wrong free)
2006-05-04 22:19:31 +03:00
unknown
185c89c419 Return empty string if file does not exist
Set LD_LIBRARY_PATH and UDF_EXAMPLE_LIB from $lib_udf_example


mysql-test/lib/mtr_misc.pl:
  Return empty string if file does not exist
mysql-test/mysql-test-run.pl:
  Set LD_LIBRARY_PATH and UDF_EXAMPLE_LIB from $lib_udf_example variable
2006-04-27 21:26:24 +02:00
unknown
1bdc15e100 Add test to mysql-test-run.pl to see if the udf_example.so is availble. Set envioronment variable UDF_EXAMPLE_LIB if it is.
Then check in have_udf if that variable is set. Finally use tahe variable when loading the shared library. 


mysql-test/include/have_udf.inc:
  Add check if udf_example.so(or similar) is available
mysql-test/lib/mtr_misc.pl:
  Add funcion "mtr_file_exist" to search for files
mysql-test/mysql-test-run.pl:
  Add checks to find the udf_example.so library
mysql-test/r/udf.result:
  Update result
mysql-test/t/disabled.def:
  Remove udf.test from disabled tests
mysql-test/t/udf.test:
  Use variable UDF_EXAMPLE_LIB when looking for shared library to load
mysql-test/r/have_udf_example.require:
  New BitKeeper file ``mysql-test/r/have_udf_example.require''
2006-04-27 16:32:40 +02:00
unknown
2f4f68be53 Change sleep_until_file_created to sleep 100 millisecond instead of sleeping 1 seconds between each iteration. 2006-04-26 13:22:18 +02:00
unknown
8df792b709 Bug#19084 ./mysql-test-run.pl do not print bootstrap run info
- Log boostratp/install to var/log/boostrap.log
 - Log output from mysqladmin to var/log/mysqladmin.log
 - Remove old manager references


mysql-test/lib/mtr_process.pl:
  Log output from mysqladmin to var/log/mysqladmin.log
mysql-test/mysql-test-run.pl:
  Log output from boostrap/install of db's to var/log/bootstrap.log
  Remove references to old manager
2006-04-24 11:26:41 +02:00
unknown
d7a5eecad8 Move copy_dir to mtr_misc and rename it to mtr_copy_dir 2006-04-24 10:27:13 +02:00
unknown
55198b5489 Remove 5 second sleep for win32 2006-04-24 10:22:26 +02:00
unknown
34c086526c Fix for bug #18979, bad RE in mysql-test-run.pl
mysql-test/lib/mtr_cases.pl:
  Fixed the RE so that backtracking will not occur.
2006-04-17 19:43:19 -07:00
unknown
eb6b2bdc3e Manual merge.
mysql-test/lib/mtr_process.pl:
  Auto merged
2006-04-07 13:16:40 +02:00
unknown
8fc0c48d5e Perl test script: Avoid some aborts, which made the whole build/test process terminate.
mysql-test/lib/mtr_process.pl:
  Change from "mtr_error()" to "mtr_warning()" on some problems,
  because "error" makes the whole suite abort which then makes "Do-compile" terminate,
  so none of the following steps (including other etst suites) will be done.
2006-04-07 13:02:15 +02:00
unknown
636064c0ba Dump result to .log file at test failure
client/mysqltest.c:
  Dump accumulated result upuntil test failure into a <testname>.log file for later examination
mysql-test/lib/mtr_report.pl:
  Inform about the <testname>.log file's existence
2006-03-23 21:48:31 +01:00
unknown
48e23ec862 Merge mysql.com:/usr/local/mysql/mysql-4.1
into  mysql.com:/usr/local/mysql/mysql-5.0


mysql-test/lib/mtr_timer.pl:
  Auto merged
ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
2006-03-16 11:23:09 +01:00
unknown
fd6d45f0b0 Fix bug in mysql-test-run.pl in ^C signal handler.
mysql-test/lib/mtr_timer.pl:
  Fix bug where ^C would trigger cleanup handler in both parent and
  timeout child processes, causing duplicated messages and potential
  conflicts.
2006-03-16 11:21:18 +01:00
unknown
0e6c94e1ea Merge
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
2006-03-09 00:40:52 +01:00
unknown
a3208c0f1f mysql-test-run.pl, mtr_cases.pl
- Back porting of some changes in later releases
  - Corrected valgrind support
  - Removed work around for TZ needed in VisualStudio 6
  - Don't restart master to add special settings from "<testcase>-master.opt",
    if same settngs as running master, feature request in bug#12433
  - With --reorder, keep tests with same *-master.opt content together,
    to save even more master restarts


mysql-test/lib/mtr_misc.pl:
  Added functions to compare lists of options
mysql-test/lib/mtr_cases.pl:
  Removed special code for Windows as in VC6 we unset
  TZ to avoid library bug
mysql-test/mysql-test-run.pl:
  Handle pseudo option --timezone=<spec> that sets TZ
2006-03-08 19:15:56 +01:00
unknown
acb53e4ec4 BUG#17574 Detect cluster start failure and "fail" ndb_* tests
- Fix problems that occur when ndbcluster is not supported


mysql-test/lib/mtr_cases.pl:
  Marked test to be skipped if it is a ndb test but ndb is not supported
mysql-test/mysql-test-run.pl:
  Check "opt_with_ndbcluster" before deciding to stop masters and when dciding if cluster needs to be started.
2006-03-08 16:57:42 +01:00
unknown
329264140a Bug#17574 Detect cluster start failure and "fail" ndb_* tests
mysql-test/lib/mtr_cases.pl:
  Always set "ndb_test" if tets name contains ndb. 
  Set to skipped if "--skip-ndbcluster"
mysql-test/lib/mtr_report.pl:
  Print special error message for ndb_test that are failed due to failure to start or install ndbcluster
mysql-test/mysql-test-run.pl:
  Remove mtr_error call from ndbcluster_install, instead check after ndbcluster_install if test run should continue or if it should be aborted
  Faile ndb test and print special error message if it's a ndb test and flag_ndb_status_ok is not ok
2006-03-07 19:44:58 +01:00
unknown
4e8f2a12bc Merge
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/spatial.cc:
  Auto merged
2006-02-12 04:33:50 +01:00
unknown
0f3d881320 spatial.cc:
Added { ... } around float8get() macro, avoids VC7 error
  message "illegal else without matching if"
mtr_report.pl:
  Parse error logs to create "warnings" file
mtr_cases.pl:
  Added optoion --ignore-disabled-def
  Windows build now let TZ pass, removed
  work around
mysql-test-run.pl, mtr_process.pl:
  Back port of changes from 5.0


mysql-test/lib/mtr_process.pl:
  Back port of changes from 5.0
mysql-test/mysql-test-run.pl:
  Back port of changes from 5.0
mysql-test/lib/mtr_cases.pl:
  Added optoion --ignore-disabled-def
  Windows build now let TZ pass, removed
  work around
mysql-test/lib/mtr_report.pl:
  Parse error logs to create "warnings" file
sql/spatial.cc:
  Added { ... } around float8get() macro, avoids VC7 error
  message "illegal else without matching if"
2006-02-12 04:13:24 +01:00
unknown
fe9663c7df Merge mysql.com:/usr/local/mysql/mysql-4.1-fixrace
into  mysql.com:/usr/local/mysql/mysql-5.0


mysql-test/lib/mtr_process.pl:
  Auto merged
2006-02-12 00:10:43 +01:00
unknown
503193867e Fix a race on some platforms in mysql-test-run.pl, where it would sometimes
errorneously abort reporting failure to kill child processes, where in
reality the problem was merely that the child had become a zombie because
of missing waitpid() call.


mysql-test/lib/mtr_process.pl:
  Fix race (on some platforms) when killing processes.
2006-02-11 22:50:59 +01:00
unknown
406d0ea5ac Start cluster only for testcases that really needs it and stop it when
not needed by the tescases. This will save test time for those testcases
that does not need cluster, but need a restart, as they dont have to wait
the extra time it would take for cluster to restart. It will also save
time for other testcases, as cluster does not 
need to be contacted for each table to be dropped or created.
Backport from 5.1


mysql-test/lib/mtr_cases.pl:
  Mark all test cases where name contains "ndb" as ndbcluster needed
mysql-test/lib/mtr_match.pl:
  Add mtr_match_substring function
mysql-test/lib/mtr_stress.pl:
  Extre param to mysqld_start
mysql-test/mysql-test-run.pl:
  Only start ndbcluster for testcases that needs it.
2006-02-09 09:40:48 +01:00
unknown
b6e0d940d6 Fix QNX test abort in release builds and pushbuild, avoid killing our
parent when we are not the process group leader.
2006-01-04 16:02:41 +01:00
unknown
7c4ada147e Fixed stress parts in shell and perl versions of mysql-test-run script to limit stress testing
with 20 test loops in case when any limit parameter was specified



mysql-test/lib/mtr_stress.pl:
  Limit stress testing with 20 test loops in case when any limit parameter was specified
mysql-test/mysql-test-run.pl:
  Limit stress testing with 20 test loops in case when any limit parameter was specified
mysql-test/mysql-test-run.sh:
  Limit stress testing with 20 test loops in case when any limit parameter was specified
2005-12-16 00:23:55 +02:00
unknown
3fc626a005 Added support of stress mode to mysql-test-run.pl
Corrected function declaration 


mysql-test/lib/mtr_misc.pl:
  Corrected function declaration
mysql-test/mysql-test-run.pl:
  Added support of stress mode
mysql-test/lib/mtr_stress.pl:
  Added support of stress mode
2005-11-22 23:46:54 +02:00
unknown
cced6ea2e2 mysql-test-run.pl:
Added --skip-im option handling
  Don't terminate script if IM fails to create PID file
mtr_cases.pl:
  Added --skip-im option handling
mtr_process.pl:
  Kill left over 'mysqld' processes started by IM


mysql-test/lib/mtr_process.pl:
  Kill left over 'mysqld' processes started by IM
mysql-test/lib/mtr_cases.pl:
  Added --skip-im option handling
mysql-test/mysql-test-run.pl:
  Added --skip-im option handling
  Don't terminate script if IM fails to create PID file
2005-10-16 20:51:19 +02:00
unknown
83afcc9c6a Change the "Password" column type for the Perl suite running the tests. bug#14023
mysql-test/lib/init_db.sql:
  Data type of the "Password" column has been changed in "mysql_create_system_tables",
  this must be reflected here (until they are united). bug#14023
2005-10-14 13:35:36 +02:00
unknown
f0d20c9f71 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/Users/kent/mysql/bk/mysql-5.0


mysql-test/mysql-test-run.pl:
  Auto merged
2005-10-01 18:03:39 +02:00
unknown
c96cf154a8 init_db.sql:
mysql.user.password doesn't need utf8


mysql-test/lib/init_db.sql:
  mysql.user.password doesn't need utf8
2005-10-01 17:21:09 +02:00
unknown
46d8163b1b WL#2789 "Instance Manager: test using mysql-test-run testing framework"
1) Add support to testing Instance Manager in daemon mode;
2) Don't run Instance Manager tests when running with --ps-protocol option;


mysql-test/lib/mtr_cases.pl:
  WL#2789 "Instance Manager: test using mysql-test-run testing framework"
  Skip/disable Instance Manager tests in the following cases:
    - we are testing embedded server;
    - we are running with --ps-protocol;
    - Instance Manager executable does not exist;
  Report about the reason in the standard way.
mysql-test/lib/mtr_process.pl:
  WL#2789 "Instance Manager: test using mysql-test-run testing framework"
  Make several attempts (i.e. send several signals to process) while trying to kill it.
mysql-test/mysql-test-run.pl:
  WL#2789 "Instance Manager: test using mysql-test-run testing framework"
  Add support for testing Instance Manager in daemon mode.
2005-10-01 01:12:14 +04:00
unknown
f3c622356f Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0-release


BUILD/SETUP.sh:
  Auto merged
client/mysql.cc:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/des_key_file.cc:
  Auto merged
2005-09-30 16:37:02 +02:00
unknown
01db6cc24c Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
2005-09-30 02:15:36 +02:00
unknown
3dd066e843 mtr_report.pl:
Text formatting, adjust table header
mysql-test-run.pl:
  Remove requirement for source tree to run embedded server test
mysqldump.test:
  Removed ending ';' from --exec line


mysql-test/t/mysqldump.test:
  Removed ending ';' from --exec line
mysql-test/mysql-test-run.pl:
  Remove requirement for source tree to run embedded server test
mysql-test/lib/mtr_report.pl:
  Text formatting, adjust table header
2005-09-30 00:52:18 +02:00
unknown
14650d4f66 Merge
client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
os2/MySQL-Source.icc:
  Auto merged
regex/Makefile.am:
  Auto merged
regex/engine.c:
  Auto merged
regex/main.c:
  Auto merged
regex/regerror.c:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-09-29 03:20:31 +02:00
unknown
e42572f5f8 mtr_process.pl:
Append to some of the log files, not overwrite


mysql-test/lib/mtr_process.pl:
  Append to some of the log files, not overwrite
2005-09-28 23:53:31 +02:00
unknown
6a683cb765 Merge mysql.com:/M41/upward-4.1 into mysql.com:/M50/merge-5.0
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
2005-09-14 14:34:45 +02:00
unknown
abd4974fd5 Improve error / process handling in the Perl script to run the test suite (patch supplied by Kent).
mysql-test/lib/mtr_process.pl:
  Handle errors in child processes separate from the parent process (patch supplied by Kent).
mysql-test/lib/mtr_report.pl:
  New function to handle errors in child processes separate from the parent process (patch supplied by Kent).
  Expected to avoid HUP signals.
2005-09-14 13:55:53 +02:00
unknown
a5903ed9f3 Minor output format change of the Perl test suite script (align with the shell script).
mysql-test/lib/mtr_report.pl:
  Make the Perl test script output identical to that of the (old) shell script,
  so that reported differences compare as equal strings (for automatic analysis).
2005-09-14 13:12:30 +02:00
unknown
01a693dd29 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0


mysql-test/lib/mtr_process.pl:
  Auto merged
2005-09-01 14:34:33 +02:00
unknown
b63869bd1e mtr_process.pl:
Make sure mtr_kill_processes() is called with an array ref
  Corrected error string for STDERR redirect


mysql-test/lib/mtr_process.pl:
  Make sure mtr_kill_processes() is called with an array ref
2005-09-01 14:32:42 +02:00
unknown
0caa2a61e0 mtr_timer.pl, mtr_report.pl, mtr_process.pl, mysql-test-run.pl:
Backporting from 5.0


mysql-test/mysql-test-run.pl:
  Backporting from 5.0
mysql-test/lib/mtr_process.pl:
  Backporting from 5.0
mysql-test/lib/mtr_report.pl:
  Backporting from 5.0
mysql-test/lib/mtr_timer.pl:
  Backporting from 5.0
2005-08-31 16:28:47 +02:00
unknown
d99d05e987 Implement WL#2789 "Instance Manager: test using mysql-test-run testing framework"
mysql-test/Makefile.am:
  Make installation procedure aware of the Instance Manager tests.
mysql-test/lib/mtr_cases.pl:
  Make collect_one_test_case() aware of the Instance Manager tests.
mysql-test/lib/mtr_process.pl:
  Minor changes:
    - open log files for append, not for overwrite. Append mode is very
      useful for debugging of several tests;
    - extract the code for killing processes into a separate function:
      mtr_kill_processes(). The function is used to stop IM-related processes.
mysql-test/mysql-test-run.pl:
  Added support for the Instance Manager tests.
2005-08-29 22:28:42 +04:00
unknown
7662fc2a12 2005-08-27 01:45:50 +02:00
unknown
857258f108 mtr_timer.pl:
Simplified and corrected mtr_timer_stop_all()


mysql-test/lib/mtr_timer.pl:
  Simplified and corrected mtr_timer_stop_all()
2005-08-27 00:52:52 +02:00
unknown
7e21963621 mysql-test-run.sh, mtr_report.pl:
Corrected typo


mysql-test/lib/mtr_report.pl:
  Corrected typo
mysql-test/mysql-test-run.sh:
  Corrected typo
2005-08-26 12:37:35 +02:00
unknown
d45a682895 mtr_process.pl:
Call mtr_timer_stop_all() at exit
mtr_report.pl, mysql-test-run.pl:
  Added default/ps-protocol/embedded to abort and summary line
mtr_timer.pl:
  Added function mtr_timer_stop_all()


mysql-test/mysql-test-run.pl:
  Added default/ps-protocol/embedded to abort and summary line
mysql-test/lib/mtr_timer.pl:
  Added function mtr_timer_stop_all()
mysql-test/lib/mtr_report.pl:
  Added default/ps-protocol/embedded to abort and summary line
mysql-test/lib/mtr_process.pl:
  Call mtr_timer_stop_all() at exit
2005-08-25 16:25:54 +02:00