Commit graph

81 commits

Author SHA1 Message Date
Sergei Golubchik
d3935adf7a mysql-5.5.29 merge 2013-01-15 19:13:32 +01:00
Marc Alff
3d7d345620 Local merge 2012-09-07 19:38:04 +02:00
Marc Alff
e5f925b066 Bug#14100113 - PERFSCHEMA.FUNC_MUTEX FAILS WITH RESULT CONTENT MISMATCH OCCASIONALLY ON PB2
Improved the robustness of the func_mutex test.
2012-09-07 11:09:22 +02:00
Marc Alff
8a2aa03bff Bug#14072995 - PERFSCHEMA.FUNC_FILE_IO FAILS WITH RESULT CONTENT MISMATCH OCASSIONALLY ON PB2
Improved the robustness of the func_file_io tests.
2012-09-07 11:07:20 +02:00
Marc Alff
9bc328a41a Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
WARNING

This patch is for mysql-5.5 only,
to be null-merged to mysql-5.6 and mysql-trunk.

This is a partial rollback of the file io instrumentation,
removing the instrumentation for mysql_file_stat in the archive engine.

See the bug comments for details.
2012-08-24 10:01:59 +02:00
Sergei Golubchik
d11829654c merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
2012-08-09 17:22:00 +02:00
Mayank Prasad
608c2c018e Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Modified test case to make sure its run for all and not only
   for archive Storage Engine.
2012-07-03 09:55:51 +05:30
Tor Didriksen
6e2ce8739c Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Followup patch: wrong result unless archive storage engine is available.
2012-06-05 12:27:20 +02:00
Mayank Prasad
b2888adb70 PB2 Failure Fix : Disabled the test case in correct manner. 2012-05-25 15:44:27 +05:30
Mayank Prasad
efe42792b3 Bug#13417440 : 63340: ARCHIVE FILE IO NOT INSTRUMENTED
Details:
 - Archive storage engine file access were not instrumented and thus
   were not shown in PS tables.
      
Fix:
 - Added instrumentation code by using PS Apis for I/O.
2012-05-24 23:00:32 +05:30
Marc Alff
be7a6d93cc Improved the test performance_schema.func_file_io,
so that investigating test failures is easier.

Detect cases when @before_count / @after_count is NULL.
2012-05-23 10:21:35 +02:00
Sergei Golubchik
c39877071a overlay support for mysql-test-run and mysqltest
mysql-test-run auto-disables all optional plugins.


mysql-test/include/default_client.cnf:
  no @OPT.plugindir anymore
mysql-test/include/default_mysqld.cnf:
  don't disable plugins manually - mtr can do it better
mysql-test/suite/innodb/t/innodb_bug47167.test:
  mtr now uses suite-dir as an include path
mysql-test/suite/innodb/t/innodb_file_format.test:
  mtr now uses suite-dir as an include path
mysql-test/t/partition_binlog.test:
  this test uses partitions
storage/example/mysql-test/mtr/t/source.result:
  update results. as mysqltest includes the correct overlayed include
storage/innobase/handler/ha_innodb.cc:
  the assert is wrong
2012-02-23 07:50:11 +01:00
Sergei Golubchik
2bcb4184ef remove few obscure, unused, or misused mtr features 2012-02-06 18:42:18 +01:00
Vladislav Vaintroub
02724621ca merge from 5.5 2012-02-16 17:33:37 +01:00
unknown
6e9b06d90b Fix a number of problems in the test suite (no code bugs):
- mysql-test-run.pl --valgrind complains when all tests succeed.

 - perfschema.all_instances fail on non-linux, where ENABLE_TEMP_POOL
   is not set and therefore BITMAP mutex is not used.

 - MDEV-132: main.mysqldump fails because it depends on exact size of stdio
   buffers.

 - MDEV-99: rpl.rpl_cant_read_event_incident fails due to a race where the
   slave manages to connect while the test case is in the middle of setting up
   the master, causing the slave to replicate extra/wrong events.

 - MDEV-133: rpl.rpl_rotate_purge_deadlock fails because it issues a
   DEBUG_SYNC SIGNAL immediately followed by RESET; this means that sometimes
   the intended receipient has no time to see the signal before it is cleared
   by the RESET, causing wait to timeout.
2012-02-09 13:10:47 +01:00
Vladislav Vaintroub
8877fe7359 merge 2012-02-08 11:18:55 +01:00
unknown
d7f765cfe7 Make perfschema.all_instances work with OpenSSL, which has an extra rwlock_instance. 2012-01-28 11:05:47 +01:00
Vladislav Vaintroub
777c915600 Disable perfschema/all_instances for the threadpool (because of new mutexes and conditions) 2012-01-26 19:25:22 +01:00
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Vladislav Vaintroub
d261734391 Fix some failing tests on Windows
- ensure that mtr supressions table is flushed before doing controlled crash and restart
- use DBUG_SUICIDE() rather than abort() in partition tests - avoids a crash message/warning
- disable  perfschema all_instances test on Windows- there are  legitimate reasons  for output to be different on  Unix (some different threads, some different locks), the differences are expected to grow in the future, e.g with threadpool.
2012-01-06 13:07:20 +01:00
Sergei Golubchik
6edd76785c merge 2011-11-03 23:39:53 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
unknown
5da52cd108 Some after-merge fixes for 5.5 merge. 2011-10-25 12:53:40 +02:00
Bjorn Munch
bf456a8772 Removing copyright headers from test files 2011-10-19 23:44:17 +02:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Sergei Golubchik
a844635637 use PSI wrappers in aria and other non-MySQL code 2011-07-13 21:10:18 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Marc Alff
88eb572c25 Bug#12603341 - PERFSCHEMA.RELAYLOG FAILS SPORADICALLY IN PB2
Before this fix, the test performance_schema.relaylog would fail
with sporadic failures related to statistics on update_cond.

The reason for these failures is that thread scheduling makes
impossible to predict if instrumented conditions will be used on not.

The fix is to relax the test case, to not collect statistics about:
- wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond
- wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
2011-06-29 22:18:07 +02:00
Matthias Leich
699f0c067f Fix for
Bug 12430414 - THE TEST PERFSCHEMA.SELECTS.TEST CAN AFFECT SUCCEEDING TESTS
Bug 12430599 - THE TEST PERFSCHEMA.ONE_THREAD_PER_CON. CAN AFFECT SUCCEEDING TESTS
Bug 12431153 - THE TEST PERFSCHEMA.PFS_UPGRADE CAN AFFECT SUCCEEDING TEST
2011-06-16 22:35:01 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Mikael Ronström
70ed67e1cc Merge 5.5 2011-04-15 15:46:11 +02:00
Marc Alff
258e3bfc30 Test cleanup 2011-03-11 11:45:16 +01:00
Marc Alff
70fd13346d Reworked the test case to be more robust. 2011-03-10 13:02:28 +01:00
Marc Alff
caee7f416f Implemented code review comments,
improved the result file readability.
2011-03-10 09:00:43 +01:00
Marc Alff
5ee9001844 Bug#11766528 PERFORMANCE_SCHEMA TRACKS BOTH BINARY AND RELAY LOGS IN THE SAME EVENTS
Before this fix, all the performance schema instrumentation for both the binary log
and the relay log would use the following instruments:
- wait/io/file/sql/binlog
- wait/io/file/sql/binlog_index
- wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index
- wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond

This instrumentation is too general and can be more specific.

With this fix, the binlog instrumentation is identical,
and the relay log instrumentation is changed to:
- wait/io/file/sql/relaylog
- wait/io/file/sql/relaylog_index
- wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index
- wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond

With this change, the performance instrumentation for the binary log and the relay log,
which share the same structure but have different uses, is more detailed.
This is especially important for hosts in the middle of a replication chain,
that are both masters (binlog) and slaves (relaylog).
2011-03-01 17:39:28 +01:00
Mikael Ronstrom
45d9801696 merge to mysql-5.5 2011-01-14 09:58:21 +01:00
Davi Arnaut
eb58939395 Bug#42054: SELECT CURDATE() is returning bad value
The problem from a user point of view was that on Solaris the
time related functions (e.g. NOW(), SYSDATE(), etc) would always
return a fixed time.

This bug was happening due to a logic in the time retrieving
wrapper function which would only call the time() function every
half second. This interval between calls would be calculated
using the gethrtime() and the logic relied on the fact that time
returned by it is monotonic.

Unfortunately, due to bugs in the gethrtime() implementation,
there are some cases where the time returned by it can drift
(See Solaris bug id 6600939), potentially causing the interval
calculation logic to fail.

Since newer versions of Solaris (10+) have alleviated the
performance degradation associated with time(2), the solution is
to simply directly rely on time() at each invocation.

This simplification has an upside that it allows us to eliminate
a lock which was used to control access to the variables used
to track the half second interval, thus improving the overall
scalability of timekeeping related functions (e.g. NOW()).

Benchmarks runs have shown no significant degradation associated
with this change. With this, there are actually improvements in
performance for cases involving many connections.

In summary, the changes introduced by this patch are:

a) my_time() and my_micro_time_and_time() no longer use gethrtime().
   Instead, time() and gettimeofdate() are used correspondingly.

b) my_micro_time() is changed to not use gethrtime() so as to
   have the same time source as my_micro_time_and_time().
   There shouldn't be any performance impact from this change
   since this function is used only a few times during statement
   execution and, on Solaris, gettimeofday() shows acceptable
   performance.

mysys/my_getsystime.c:
  Use time() even if gethrtime() is available. Remove logic which
  relied on gethrtime() to only call time() every half second.
  Since gethrtime() is not used anymore, also remove it from
  my_micro_time() to keep a common time source.
  
  Also, function comments are cleaned up (fixed typos and wrong
  information) and converted to doxygen.
mysys/my_thr_init.c:
  Remove mutex which is no longer used.
mysys/mysys_priv.h:
  Remove mutex which is no longer used.
2011-01-12 18:36:39 -02:00
Mikael Ronstrom
773267552f merge 2011-01-12 14:43:03 +01:00
Mikael Ronstrom
6e7752d557 merge 2011-01-04 18:46:01 +01:00
Marc Alff
630483d497 Bug#59091 perfschema.binlog_mix and perfschema.binlog_row tests fail with openssl
Fixed the test case to be independent of build options used.
Removed the lowercase-table-names constraint, since performance schema tables are now in lowercase.
2011-01-04 10:04:02 +01:00
Marc Alff
c2a655f02d Local merge 2010-12-01 19:07:57 +01:00
Marc Alff
4b86f39953 Local merge 2010-12-01 18:56:46 +01:00
Marc Alff
989e682bb0 Local merge 2010-12-01 18:48:23 +01:00
Marc Alff
4372875aa1 Bug#53696 Performance schema engine violates the PSEA API by calling my_error()
This is a code cleanup.

The implementation of a storage engine (subclasses of handler) is not supposed
to call my_error() directly inside the engine implementation, 
but only return error codes, and report errors later at the demand
of the sql layer only (if needed), using handler::print_error().

This fix removes misplaced calls to my_error(),
and provide an implementation of print_error() instead.

Given that the sql layer implementation of create table, ha_create_table(),
does not use print_error() but returns ER_CANT_CREATE_TABLE directly,
the return code for create table statements using the performance schema
has changed to ER_CANT_CREATE_TABLE.

Adjusted the test suite accordingly.
2010-12-01 13:06:41 +01:00
Marc Alff
ea35bf7a71 Bug#56618 Thread_ID is not assigned in ascending sequence (after disconnect)
Before this fix, the test thread_cache failed with spurious failures.

The test used:
-- disconnect X
-- connect Y

while assuming that connection Y would reuse connection X slot in the thread cache.

For this to happen, the disconnect X operation must be given enough time to complete,
otherwise connect Y can be executed in the server before X actually finishes.

This fix uses wait conditions to make the test execution more controlled,
and more reproductible.
2010-12-01 11:10:15 +01:00
Marc Alff
639b25982b Bug#58512 Performance_schema.myisam_file_io fails sporadically in PB2
Before this fix, the test myisam_file_io executed:
- (a) an update on setup_instrument to disable non myisam file io instruments
- (b) a truncate on events_waits_history_long
and later
- (c) a select on events_waits_history_long

Surprisingly, events that were supposed to be disabled in (a) and removed in (b)
still were found in (c).

This happened for events such as 
  wait/io/file/innodb/innodb_data_file fil0fil.c: sync  
because the sync was started before (a) and completed after (b),
and as a consequence was added in the performance schema history, as expected.

Presence of these records in the history made the test fail. 

This fix makes the test script more robust to account for extra spill waits records in (c).
2010-12-01 10:24:16 +01:00
Marc Alff
b1f25ee9f7 Bug#58621 perfschema.dml_ews_by_thread_by_event_name test failure
This fix affects the test suite only.

Before this fix, performance schema tests dml_*.test could
fail with spurious failure, depending on the table content.

This fix simplifies the SELECT tests in the dml_*.test scripts,
to only verify that the SELECT operation passed the security checks
and succeeded, which was the original intent of the test.

Usage of 
  --replace_column 1 # 2 # 3 # 4 # ...
to discard the test output was replaced by a simpler and more maintainable 
  --disable_result_log
which also work for empty tables.
2010-12-01 09:01:04 +01:00
Mikael Ronstrom
d0182e61a1 Disabled a number of tests when using thread pool 2010-11-19 14:43:13 +01:00