| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
PFS_events_waits::m_wait_class
This is a performance improvement fix.
Removed the "volatile" property of PFS_events_waits::m_wait_class.
Simplified the code accordingly.
|
|
|
|
|
|
|
| |
Remove workarounds for ancient systems.
mysys/default.c:
Make cast more explicit to ensure a correct offset.
|
|
|
|
| |
Remove unused variables.
|
|
|
|
|
| |
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
|
|
|
|
|
|
|
| |
at startup
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
|
|
|
|
| |
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
|
|
|
|
|
|
|
| |
wrong name
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
|
|
|
|
|
|
|
| |
really used
Backporting the fix from myql-next-mr (5.6) to mysql-trunk (5.5)
|
|
|
|
|
|
| |
This fix is for cleanup, to resolve a remaining code review item.
Backport from mysql-next-mr (5.6) to mysql-trunk (5.5).
|
|
|
|
|
| |
Fixed minor merge issues with #includes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is for performance optimization.
Fixed the performance schema instrumentation interface as follows:
- simplified mysql_unlock_mutex()
- simplified mysql_unlock_rwlock()
- simplified mysql_cond_signal()
- simplified mysql_cond_broadcast()
Changed the get_thread_XXX_locker apis to have one extra parameter,
to provide memory to the instrumentation implementation.
This API change allows to use memory provided by the caller,
to avoid having to use thread local storage.
Using this extra parameter will be done in a separate fix,
this change is for the interface only.
Adjusted all the code and unit tests accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix various mismatches between function's language linkage. Any
particular function that is declared in C++ but should be callable
from C must have C linkage. Note that function types with different
linkages are also distinct. Thus, if a function type is declared in
C code, it will have C linkage (same if declared in a extern "C"
block).
client/mysql.cc:
Mismatch between prototype and declaration.
client/mysqltest.cc:
mysqltest used to be C code. Use C linkage where appropriate.
cmd-line-utils/readline/input.c:
Isolate unreachable code.
include/my_alloc.h:
Function type must have C linkage.
include/my_base.h:
Function type must have C linkage.
include/my_global.h:
Add helper macros to avoid spurious namespace indentation.
include/mysql.h.pp:
Update ABI file.
mysys/my_gethwaddr.c:
Remove stray carriage return and fix coding style.
plugin/semisync/semisync_master_plugin.cc:
Callback function types have C linkage.
plugin/semisync/semisync_slave_plugin.cc:
Callback function types have C linkage.
sql/derror.cc:
Expected function type has C linkage.
sql/field.cc:
Use helper macro and fix indentation.
sql/handler.cc:
Expected function type has C linkage.
sql/item_sum.cc:
Correct function linkages. Remove now unnecessary cast.
sql/item_sum.h:
Add prototypes with the appropriate linkage as otherwise they
are distinct.
sql/mysqld.cc:
Wrap functions in C linkage mode.
sql/opt_range.cc:
C language linkage is ignored for class member functions.
sql/partition_info.cc:
Add wrapper functions with C linkage for class member functions.
sql/rpl_utility.h:
Use helper macro and fix indentation.
sql/sql_class.cc:
Change type of thd argument -- THD is a class.
Use helper macro and fix indentation.
sql/sql_class.h:
Change type of thd argument -- THD is a class.
sql/sql_select.cc:
Expected function type has C linkage.
sql/sql_select.h:
Move prototype to sql_test.h
sql/sql_show.cc:
Expected function type has C linkage.
sql/sql_test.cc:
Fix required function prototype and fix coding style.
sql/sql_test.h:
Removed unnecessary export and add another.
storage/myisammrg/ha_myisammrg.cc:
Expected function type has C linkage.
storage/perfschema/pfs.cc:
PSI headers are declared with C language linkage, which also
applies to function types.
|
|
|
|
| |
pthread_t is not defined unless my_pthread.h is included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Adding include to build on Windows.
|
|
|
|
| |
Adding includes of my_global.h that seems to be necessary on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
- sql/log_event.cc
- sql/sql_class.h
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
WL#5136 Pool of threads
Added an explicit delete_thread() API in the instrumentation,
to be used by the pool of threads implementations.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
DISABLE_MYSQL_THREAD_H for strings
Also, enable unittests for perfschema
|
|/ |
|
|
Part V: performance schema implementation
|