Commit graph

21 commits

Author SHA1 Message Date
Vladislav Vaintroub
cd35dd73a1 Fix perfschema unittests build on Windows
pthread_t is not defined unless my_pthread.h is included.
2010-04-13 13:48:46 +02:00
Marc Alff
bbf97ab183 Bug#52754 Build break in mysql-trunk, performance schema unit test
Tree cleaup after the last major merges in mysql-trunk:

The files sql/lex_hash.h and sql/sql_yacc.h are automatically
generated, and should not be checked in the configuration management system.
These files are now removed.
No changes are required for .bzrignore, which already listed these files
(and similar files in libmysqld/).

The file storage/perfschema/unittest/pfs_timer-t.cc did not build
after the header files refactoring affecting mysql_priv.h
The file now builds properly using sql_priv.h
2010-04-12 03:31:45 -06:00
Mats Kindahl
e92b3c587c WL#5030: Splitting mysql_priv.h
Adding include to build on Windows.
2010-04-06 23:00:01 +02:00
Mats Kindahl
6791cfc76a WL#5030: Splitting mysql_priv.h
Adding includes of my_global.h that seems to be necessary on Windows.
2010-04-06 16:08:51 +02:00
Mats Kindahl
23d8586dbf WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Marc Alff
8c28d0d1cf local merge 2010-03-07 10:41:51 -07:00
Marc Alff
01b19dbbf4 Bug#51738 Unit test pfs_instr-t crashes
The unit test pfs_instr-t:
- generates a very long (10,000) bytes file name
- calls find_or_create_file.

This leads to a buffer overflow in mysys in my_realpath(),
because my_realpath and mysys file APIs in general do not
test for input parameters: mysys assumes every file name
is less that FN_REFLEN in length.

Calling find_or_create_file with a very long file name is likely
to happen when instrumenting third party code that does not use mysys,
so this test is legitimate.

The fix is to make find_or_create_file in the performance schema
more robust in this case.
2010-03-04 18:36:54 -07:00
Marc Alff
18884b02c0 Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixing
The root cause of the failure is that when
Bug#51447 performance schema evil twin files
was fixed, instrumented file names got normalized.

The pfs-t unit test depends on this file normalization,
but it was not updated.

This fix aligns pfs-t.cc lookup_file_by_name()
with the logic in pfs_instr.cc find_or_create_file().
2010-03-04 18:10:27 -07:00
Marc Alff
77385a9136 Bug#51612 Un initialized locker_lost variable in pfs_instr.cc
Fixed the missing initialization of locker_lost.

This fix is not strictly necessary, but is desirable to re-align the code
from 5.5 and 6.0, and reduce the spurious code differences.

This will facilitate maintenance and help to apply patches cleanly, for merges.
2010-03-01 17:10:01 -07:00
Marc Alff
d6131618bb Bug#51447 performance schema evil twin files
Before this fix, the performance schema file instrumentation would treat:
- a relative path to a file
- an absolute path to the same file
as two different files.

This would lead to:
- separate aggregation counters
- file leaks when a file is removed.

With this fix, a relative and absolute path are resolved to the same file instrument.
2010-02-26 10:39:57 -07:00
Jon Olav Hauglid
e60ef89317 Followup to Bug#45225 Locking: hang if drop table with no timeout
This patch prevents system threads and system table accesses from
using user-specified values for "lock_wait_timeout". Instead all
such accesses are done using the default value (1 year).

This prevents background tasks (such as replication, events, 
accessing stored function definitions, logging, reading time-zone
information, etc.) from failing in cases where the global value
of "lock_wait_timeout" is set very low.

The patch also simplifies the open tables API. Rather than adding
another convenience function for opening and locking system tables,
this patch removes most of the existing convenience functions for
open_and_lock_tables_derived(). Before, open_and_lock_tables() was
a convenience function that enforced derived tables handling, while
open_and_lock_tables_derived() was the main function where derived
tables handling was optional. Now, this convencience function is
gone and the main function is renamed to open_and_lock_tables(). 

No test case added as it would have required the use of --sleep to
check that system threads and system tables have a different timeout
value from the user-specified "lock_wait_timeout" system variable.
2010-02-24 18:04:00 +01:00
Vladislav Vaintroub
5b77604cc2 merge 2010-02-16 23:19:47 +01:00
Alexander Nozdrin
a8ef1bafb1 Manual merge from mysql-next-mr.
Conflicts:
  - sql/log_event.cc
  - sql/sql_class.h
2010-02-15 14:16:49 +03:00
Vladislav Vaintroub
e3a4741d05 merge 2010-02-13 17:01:32 +01:00
Konstantin Osipov
a9e22b5896 Merge next-mr -> next-4284-merge. 2010-02-04 20:34:15 +03:00
Vladislav Vaintroub
da91b8d73e Cleanup casing in MYSQL_ADD_PLUGIN, patch provided by Kent 2010-02-01 23:46:02 +01:00
Marc Alff
a1917ee687 Bug#44210 Performance schema: pool-of-threads threads instrumentation is missing
WL#5136 Pool of threads

Added an explicit delete_thread() API in the instrumentation,
to be used by the pool of threads implementations.
2010-01-26 16:42:54 -07:00
Marc Alff
f62eb05d08 Bug#50478 perfschema.tampered_perfschema_table1 fails sporadically on
Windows and Solaris

Reviewed every call to my_error() using the va_args parameters,
to make sure the arguments type are ok.

Fixed the broken calls to my_error() to pass a strings as 'char *',
not LEX_STRING.
2010-01-22 17:15:16 -07:00
Vladislav Vaintroub
cd45a44180 Post-merge fixes , define HAVE_RWLOCK_T on Solaris define
DISABLE_MYSQL_THREAD_H for strings
Also, enable unittests for perfschema
2010-01-14 18:42:28 +00:00
Vladislav Vaintroub
6b6f0ca461 merge 2010-01-14 16:07:27 +01:00
Marc Alff
e0e0f9e3d4 WL#2360 Performance schema
Part V: performance schema implementation
2010-01-11 18:47:27 -07:00