Commit graph

1331 commits

Author SHA1 Message Date
Bjorn Munch
0777ef567d merge 48149 2009-10-20 12:05:28 +02:00
Bjorn Munch
e6bc01d170 Bug #48149 MTR should automatically skip SSL tests if SSL not supported
Knowledge of no SSL support is not used
Skip tests the same way e.g. innodb tests are
Does not refer to have_ssl_communication.inc, 
     will add this when merging to 6.0-codebase
2009-10-19 15:51:47 +02:00
Bjorn Munch
2f36bc160a merge 48130 and 48133 2009-10-19 15:33:34 +02:00
Bjorn Munch
c6533f9eb3 Bug #48133 MTR should not dump entire history of mysqld log when failing to start server
Don't print entire log, but use extract_server_log() introduced by 46007
2009-10-18 13:01:46 +02:00
Bjorn Munch
dcf6aae407 Bug #48130 Expected failures should not count towards max-test-fail
Test batches may be terminated too early
Avoid counting exp-fail tests
2009-10-17 18:34:56 +02:00
Bjorn Munch
72c96cbd0e merge from 5.1 main 2009-10-16 23:25:05 +02:00
Bjorn Munch
972e938dac Bug #46007 Tests fail due to a crash while running 'check testcase before test'
Difficult to debug due to lacking report
This does not solve the real issue, but extracts server log when it happens
Forst commit was incomplete, didn't cover all cases
2009-10-14 09:31:34 +02:00
Bjorn Munch
052d9bef83 avoid regexp warning after 46625 2009-10-09 15:16:36 +02:00
Bjorn Munch
79060e12ee Remove obsolete comments after fixing 42408 2009-10-08 14:31:39 +02:00
Bjorn Munch
b1b958ffab Bug #47716 mtr2 prints obscure error when started with -gdb and xterm is missing
Tried to use an expression inside ""
Go via variable, and add $exe to the output
2009-10-08 11:23:04 +02:00
Bjorn Munch
0aca4f0011 Bug #46625 Pushbuild2: does not notice test failure in "Innodb Plugin" mode
Disallow (and don't use) space in combination names
2009-10-08 11:14:42 +02:00
Magnus Blåudd
fabde82dbd Bug#47801 The plugin test fails with the Embedded Server on Windows
- Remove the "hack" from mtr.pl that skipped searching for the .dll files
  when embedded and windows. Now the variables will be preoperly initialized.
 - Make the tests detect that they can't run on windows+embedded
2009-10-08 10:39:15 +02:00
Magnus Blåudd
7a633b68d2 Merge 2009-10-08 10:32:43 +02:00
Bjorn Munch
3141528ea8 Bug #47811 ./mysql-test-run.pl --valgrind uses old (too narrow) allignment
Remove the alignment option, let valgrind use its default
2009-10-06 10:42:05 +02:00
Bjorn Munch
109ae607fb Bug #46327 MTR2 prevents gcov data accumulation
mysqladmin fails on Linux in 6.0 without --character-sets-dir
Also added timeout for server shutdown, hope this will solve it
2009-10-06 10:35:35 +02:00
Bjorn Munch
861cf983fc Bug #47243 Allow MTR to read max auto setting for --parallel from env. variable
In stead of hard-coded 8, read from $MTR_MAX_PARALLEL if set
2009-10-05 13:08:10 +02:00
Ingo Struewing
91178418a2 auto-merge 2009-10-02 13:27:48 +02:00
Ingo Struewing
4d57b851a0 WL#4259 - Debug Sync Facility
Backport from 6.0 to 5.1.
Only those sync points are included, which are used in debug_sync.test.

  The Debug Sync Facility allows to place synchronization points
  in the code:
  
  open_tables(...)
  
  DEBUG_SYNC(thd, "after_open_tables");
  
  lock_tables(...)
  
  When activated, a sync point can
  
  - Send a signal and/or
  - Wait for a signal
  
  Nomenclature:
  
  - signal:            A value of a global variable that persists
                       until overwritten by a new signal. The global
                       variable can also be seen as a "signal post"
                       or "flag mast". Then the signal is what is
                       attached to the "signal post" or "flag mast".
  
  - send a signal:     Assign the value (the signal) to the global
                       variable ("set a flag") and broadcast a
                       global condition to wake those waiting for
                       a signal.
  
  - wait for a signal: Loop over waiting for the global condition until
                       the global value matches the wait-for signal.
  
  Please find more information in the top comment in debug_sync.cc
  or in the worklog entry.


.bzrignore:
  WL#4259 - Debug Sync Facility
  Added the symbolic link libmysqld/debug_sync.cc.
CMakeLists.txt:
  WL#4259 - Debug Sync Facility
  Added definition for ENABLED_DEBUG_SYNC.
configure.in:
  WL#4259 - Debug Sync Facility
  Added definition for ENABLED_DEBUG_SYNC.
include/my_sys.h:
  WL#4259 - Debug Sync Facility
  Added definition for the DEBUG_SYNC_C macro.
libmysqld/CMakeLists.txt:
  WL#4259 - Debug Sync Facility
  Added sql/debug_sync.cc.
libmysqld/Makefile.am:
  WL#4259 - Debug Sync Facility
  Added sql/debug_sync.cc.
mysql-test/include/have_debug_sync.inc:
  WL#4259 - Debug Sync Facility
  New include file.
mysql-test/mysql-test-run.pl:
  WL#4259 - Debug Sync Facility
  Added option --debug_sync_timeout.
mysql-test/r/debug_sync.result:
  WL#4259 - Debug Sync Facility
  New test result.
mysql-test/r/have_debug_sync.require:
  WL#4259 - Debug Sync Facility
  New require file.
mysql-test/t/debug_sync.test:
  WL#4259 - Debug Sync Facility
  New test file.
mysys/my_static.c:
  WL#4259 - Debug Sync Facility
  Added definition for debug_sync_C_callback_ptr.
mysys/thr_lock.c:
  WL#4259 - Debug Sync Facility
  Added sync point "wait_for_lock".
sql/CMakeLists.txt:
  WL#4259 - Debug Sync Facility
  Added debug_sync.cc and debug_sync.h.
sql/Makefile.am:
  WL#4259 - Debug Sync Facility
  Added debug_sync.cc and debug_sync.h.
sql/debug_sync.cc:
  WL#4259 - Debug Sync Facility
  New source file.
sql/debug_sync.h:
  WL#4259 - Debug Sync Facility
  New header file.
sql/mysqld.cc:
  WL#4259 - Debug Sync Facility
  Added opt_debug_sync_timeout.
  Added calls to debug_sync_init() and debug_sync_end().
  Fixed a purecov comment (unrelated).
sql/set_var.cc:
  WL#4259 - Debug Sync Facility
  Added server variable "debug_sync".
sql/set_var.h:
  WL#4259 - Debug Sync Facility
  Added declaration for server variable "debug_sync".
sql/share/errmsg.txt:
  WL#4259 - Debug Sync Facility
  Added error messages ER_DEBUG_SYNC_TIMEOUT and ER_DEBUG_SYNC_HIT_LIMIT.
sql/sql_base.cc:
  WL#4259 - Debug Sync Facility
  Added sync points "after_flush_unlock" and "before_lock_tables_takes_lock".
sql/sql_class.cc:
  WL#4259 - Debug Sync Facility
  Added initialization for debug_sync_control to THD::THD.
  Added calls to debug_sync_init_thread() and debug_sync_end_thread().
sql/sql_class.h:
  WL#4259 - Debug Sync Facility
  Added element debug_sync_control to THD.
storage/myisam/myisamchk.c:
  Fixed a typo in an error message string (unrelated).
2009-09-29 17:38:40 +02:00
Davi Arnaut
88365681af Don't use the semicolon character as a argument separator as it
can be interpreted as a shell metacharacter in some circumstances.
For example, it is interpreted as a command separator when invoking
a debugger.

mysql-test/lib/mtr_cases.pm:
  Use ':' as the separator on non-Windows platforms.
mysql-test/mysql-test-run.pl:
  Remove unnecessary use of the separator.
2009-09-29 11:11:46 -03:00
Magnus Blåudd
ec7e213b12 Bug#47612 mtr - improving the report for valgrind erorrs
- Improve the report produced when a valgrind error is detected
2009-09-24 16:09:11 +02:00
Bjorn Munch
a829604260 first merge from main 2009-09-02 18:58:17 +02:00
Bjorn Munch
de5ab42de6 Bug #46973 MTR: extract_warning_lines does not check it's extracting lines for current test
Rewrote logic (first commit was incomplete, sorry)
2009-08-28 15:02:48 +02:00
Bjorn Munch
9a8ef8f7a4 Bug #46322 Sporadic timeout in mysql_upgrade.test
Apparently caused by logging to table
Turn on logging to file only, add to .opt file for tests needing log to table
2009-08-27 15:17:09 +02:00
Bjorn Munch
3a76649291 Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log
Enabled proper pattern for Warnings and ERRORs
Added some suppressions
2009-08-25 15:56:50 +02:00
Bjorn Munch
ca7bf9fad5 Bug #44222 mysql-test-run --start analyses which tests it would skip. This is redundant.
Quicker test collection and better output with --start[-dirty]
2009-08-18 09:38:18 +02:00
Bjorn Munch
2000cef72a Bug #44979 Enhance MTR --experimental to support platform qualifier
Adding @<platform> syntax
2009-08-13 15:29:19 +02:00
Bjorn Munch
1d99f9eae5 Bug #45847 make --gdb disable all the timeouts by default
Set to one week for testcase and suite timeout
Also set one day timeout for PID file creation (not currently needed in 5.1 but might become, and is needed in azalea)
2009-08-11 15:59:05 +02:00
Bjorn Munch
013717d110 Bug #44479 mysql-test-run does not detect that external server has Innodb support
Variable name mismatch
Map variable have_innodb=YES to innodb=ON
2009-08-11 12:59:43 +02:00
Sergey Vojtovich
b4ac7f8c15 This patch implements testing InnoDB plugin milestone.
mysql-test/lib/mtr_cases.pm:
  Expand test cases list with test cases to test
  InnoDB plugin.
mysql-test/mysql-test-run.pl:
  Added "innodb" suite to default list of suites.
mysql-test/suite/innodb/include/have_innodb_plugin.inc:
  This file determines if innodb plugin is available.
mysql-test/suite/innodb/my.cnf:
  Removed temporary my.cnf, which was added for testing. Not
  needed anymore - options are substituted by mtr.
mysql-test/suite/innodb/t/innodb-analyze.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb-timeout.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt:
  Use "loose" prefix with mysqld options. This makes this
  test skipped properly when no innodb is available.
mysql-test/suite/innodb/t/innodb-use-sys-malloc.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb-zip.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb_bug36169.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb_bug36172.test:
  This test can only be run with InnoDB plugin.
mysql-test/suite/innodb/t/innodb_information_schema.test:
  This test can only be run with InnoDB plugin.
2009-06-24 22:18:58 +05:00
Bjorn Munch
47fa03abe7 Bug #45532 MTR displays wrong option name 'print_testcases' in usage text
Fix the name....
2009-06-22 16:29:02 +02:00
Bjorn Munch
54dcbf2cbe Bug #45298 plugin.test is skipped in PB2 on UNIX platforms
Added search for example plugin in lib/mysql/plugin
2009-06-16 15:26:17 +02:00
Vladislav Vaintroub
768bbae90e Backport WL#3653 to 5.1 to enable bundled innodb plugin.
Remove custom DLL loader code from innodb plugin code, use 
symbols exported from mysqld.


storage/innodb_plugin/handler/ha_innodb.cc:
  Remove a Win32 workaround for current_thd.
  The original  problem that innodb plugin used
  value of TLS variable across DLL boundaries is 
  solved in MySQL server (current_thd is a function
  not TLS variable now)
storage/innodb_plugin/handler/handler0alter.cc:
  Remove custom delay loader
storage/innodb_plugin/handler/handler0vars.h:
  Remove custom delay loader
storage/innodb_plugin/handler/i_s.cc:
  Remove custom delay loader
storage/innodb_plugin/handler/win_delay_loader.cc:
  Remove custom delay loader
storage/innodb_plugin/plug.in:
  Remove commented out MYSQL_PLUGIN_STATIC, 
  CMake would not parse that correctly
2009-06-10 10:59:49 +02:00
Bjorn Munch
92773bfc11 Bug #45256 Enable 'auto' for mtr --parallel
Let the user specify 'auto' for parallel value
Also set --parallel=auto in default.push so we can get this tested.
2009-06-03 12:46:04 +02:00
Bjorn Munch
ad365a5c07 Bug #45190 mtr should report some statistics even if aborting after too many tests fail
Added calls to mtr_report_stats() also after timeout or too many failures
2009-06-02 10:00:45 +02:00
Bjorn Munch
4404b6a915 Bug #43659 MTR2 should report worker data for tests when using --parallel > 1
Adding "w# " before the test result
Also enable --parallel=2 so this can be tested.
2009-05-28 13:02:03 +02:00
Bjorn Munch
2f9155296d Bug #42988 MTR2's --help output does not document --parallel
Several options were not documented
Added missing options and removed a few
Fixed use of --skip-combinations
2009-05-12 14:53:46 +02:00
Bjorn Munch
83b103936a merge from main 2009-05-11 12:18:20 +02:00
Bjorn Munch
cf1845f4da Bug #44561 mtr2 --start-dirty is broken
start-dirty would remove stored procs etc.
Skip the copying back from stored system dir if using --start-dirty
2009-04-30 13:23:36 +02:00
Bjorn Munch
261066e251 Bug #44511 MTR2: add an option not to kill other servers when one from the group exits
MTR would die as soon as one server terminates
Implemented --wait-all option and associated subroutine
2009-04-29 16:13:38 +02:00
Vladislav Vaintroub
ca0e746d3b Bug #44530 mtr v2 startup very slow on Windows.
MTR is stuck for about 20 seconds checking for free ports.
The reason is that perl's connect()  takes 1 second on windows
if port is not opened.

This patch fixes the mtr_ping_port implementation on Windows
to use Net::Ping for the port checking with small (0.1sec) timeout.

This patch also removes pointless second call to check_ports_free() 
in case of auto build thread.
2009-04-28 23:06:36 +02:00
Vladislav Vaintroub
2943d2b7e9 Bug #42804 --parallel option does not work for MTR under ActiveState
perl 

The problem here was the method how MTR gets its unique thread ids.
Prior to this patch, the method to do it was to maintain a global 
table of pid,mtr_unique_id) pairs. The table was backed by a text 
file. The table was cleaned up one in a while and dead processes leaking
unique_ids were determined with with kill(0) or with scripting tasklist
on Windows.

This method is flawed specifically on native Windows Perl. fork() is 
implemented with starting a new thread, give it a syntetic negative PID
(threadID*(-1)), until this thread creates a new process with exec()
However,  neither tasklist nor any other native Windows tool can cope with
negative perl PIDs. This lead to incorrect determination of dead process 
and reusing already used mtr_unique_id.

The patch introduces alternative portable  method of solving unique-id 
problem. When a process needs a unique id in range [min...max], it just 
starts  to open files named min, min+1,...max in a loop . After file is 
opened, we do non-blocking flock(). When flock() succeeds, process has 
allocated the ID. When process dies, file is unlocked . Checks for zombies 
are not necessary.

Since the change would create a co-existence problems with older version
of MTR, because of different way to calculate IDs, the default ID range
is changed from 250-299 to 300-349.

Another fix that was necessary enable --parallel option was to serialize 
spawn() calls on Windows. specifically, IO redirects needed to be protected.

This patch also fixes hanging CRTL-C (as described in Bug #38629) for the
"new"  MTR. The fix was already in 6.0 and is now downported.
2009-04-23 13:35:02 +02:00
He Zhenxing
85cff45ef7 Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
Bjorn Munch
c43af0353e Bug #41649 sporadic pb failure: mtr stopped, message "TIMEOUT (1200 seconds), ABORTING."
Potentially infinite loop in check_expected_crash_and_restart 
Replace with finite loop and some additional logic
2009-04-08 14:54:36 +02:00
Bjorn Munch
ba70e8eac7 Bug #43917 MTR2 does not report accurate test statistics when using the 'repeat=n'
option
In practice, only the last run of the test was counted
Add a separate counter rep_failures for failures before last run
2009-04-01 13:58:30 +02:00
Magnus Svensson
068d431d0c Merge 2009-03-31 16:10:44 +02:00
Magnus Svensson
beb0eaa9d1 Bug#43983 Support force restart of all servers after test ended
- Some tests need to modify the server(s) so much that a total restart of all servers are
   necessary after test. Make it possible for a test to signal it want mtr.pl to restart
   all servers.
2009-03-31 15:39:40 +02:00
Bjorn Munch
de34d942d3 Bug #43840 "too many tests failed" includes retries
Only count non-retried tests, and increment before testing
2009-03-31 13:15:52 +02:00
He Zhenxing
51a9116638 BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
When the thread executing a DDL was killed after finished its
execution but before writing the binlog event, the error code in
the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
ER_QUERY_INTERRUPTED.

This patch fixed the problem by ignoring the kill status when
constructing the event for DDL statements.

This patch also included the following changes in order to
provide the test case.

 1) modified mysqltest to support variable for connection command

 2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
    run mysql client against the slave mysqld.
2009-03-27 13:19:50 +08:00
Bjorn Munch
dd6356acca Bug #43074 MTR2 is not accessing core dumps when a path is too long
Executable path is truncated in core
If we see truncated path, try to guess using strings and grep
If that doesn't work either, use known mysqld path
2009-03-20 16:39:06 +01:00
Georgi Kodinov
fb36c97705 merged 5.1-main -> 5.1-bugteam 2009-03-11 15:03:25 +02:00