| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix safemalloc to compile w/o libbfd.
CMakeLists.txt:
NOT_FOR_DISTRIBUTION option
cmake/readline.cmake:
simplify libedit/readline detection.
never use bundled libedit.
use system readline v6 only if NOT_FOR_DISTRIBUTION=1
configure.cmake:
use libbfd only if NOT_FOR_DISTRIBUTION=1
include/my_stacktrace.h:
link with libbfd even w/o safemalloc.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FUNCTION 'PTHREAD_INIT'
The problem was that compilation would fail with a warning:
Implicit declaration of function 'pthread_init' if MySQL was
compiled on OS X 10.7 (Lion). The reason was that pthread_init()
is now part of an internal OS X pthread library so it was found
by CMake.
This patch fixes the problem by removing HAVE_PTHREAD_INIT and
related code. pthread_init() was specific to MIT-pthreads which
has not been supported since 4.1 and was therefore no longer
relevant.
No test case added.
|
| | |
|
|/
|
|
|
| |
most tests pass.
5.3 merge is next
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cmake/os/SunOS.cmake:
Remove TARGET_OS_SOLARIS
config.h.cmake:
Remove TARGET_OS_SOLARIS
Add PTHREAD_ONCE_INITIALIZER
configure.cmake:
Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT
include/my_pthread.h:
Use PTHREAD_ONCE_INITIALIZER if set by cmake.
include/mysql/psi/mysql_file.h:
Include my_global.h first, to get correct platform definitions.
mysys/ptr_cmp.c:
Hide the unused static functions in #ifdef's on solaris.
Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS
sql/my_decimal.cc:
Include my_global.h first, to get correct platform definitions.
sql/mysqld.cc:
Fix signed/unsigned comparison warning.
sql/sql_audit.h:
Include my_global.h first, to get correct platform definitions.
sql/sql_plugin.h:
Include my_global.h first, to get correct platform definitions.
sql/sql_show.cc:
Fix: warning: cast from pointer to integer of different size
sql/sys_vars.h:
Use reinterpret_cast rather than c-style cast.
storage/perfschema/pfs_instr.cc:
Include my_global.h first, to get correct platform definitions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
detector" that doesn't introduce bug #56715 "Concurrent
transactions + FLUSH result in sporadical unwarranted
deadlock errors".
Deadlock could have occurred when workload containing a mix
of DML, DDL and FLUSH TABLES statements affecting the same
set of tables was executed in a heavily concurrent environment.
This deadlock occurred when several connections tried to
perform deadlock detection in the metadata locking subsystem.
The first connection started traversing wait-for graph,
encountered a sub-graph representing a wait for flush, acquired
LOCK_open and dived into sub-graph inspection. Then it
encountered sub-graph corresponding to wait for metadata lock
and blocked while trying to acquire a rd-lock on
MDL_lock::m_rwlock, since some,other thread had a wr-lock on it.
When this wr-lock was released it could have happened (if there
was another pending wr-lock against this rwlock) that the rd-lock
from the first connection was left unsatisfied but at the same
time the new rd-lock request from the second connection sneaked
in and was satisfied (for this to be possible the second
rd-request should come exactly after the wr-lock is released but
before pending the wr-lock manages to grab rwlock, which is
possible both on Linux and in our own rwlock implementation).
If this second connection continued traversing the wait-for graph
and encountered a sub-graph representing a wait for flush it tried
to acquire LOCK_open and thus the deadlock was created.
The previous patch tried to workaround this problem by not
allowing the deadlock detector to lock LOCK_open mutex if
some other thread doing deadlock detection already owns it
and current search depth is greater than 0. Instead deadlock
was reported. As a result it has introduced bug #56715.
This patch solves this problem in a different way.
It introduces a new rw_pr_lock_t implementation to be used
by MDL subsystem instead of one based on Linux rwlocks or
our own rwlock implementation. This new implementation
never allows situation in which an rwlock is rd-locked and
there is a blocked pending rd-lock. Thus the situation which
has caused this bug becomes impossible with this implementation.
Due to fact that this implementation is optimized for
wr-lock/unlock scenario which is most common in the MDL
subsystem it doesn't introduce noticeable performance
regressions in sysbench tests. Moreover it significantly
improves situation for POINT_SELECT test when many
connections are used.
No test case is provided as this bug is very hard to repeat
in MTR environment but is repeatable with the help of RQG
tests.
This patch also doesn't include a test for bug #56715
"Concurrent transactions + FLUSH result in sporadical
unwarranted deadlock errors" as it takes too much time to
be run as part of normal test-suite runs.
config.h.cmake:
We no longer need to check for presence of
pthread_rwlockattr_setkind_np as we no longer
use Linux-specific implementation of rw_pr_lock_t
which uses this function.
configure.cmake:
We no longer need to check for presence of
pthread_rwlockattr_setkind_np as we no longer
use Linux-specific implementation of rw_pr_lock_t
which uses this function.
configure.in:
We no longer need to check for presence of
pthread_rwlockattr_setkind_np as we no longer
use Linux-specific implementation of rw_pr_lock_t
which uses this function.
include/my_pthread.h:
Introduced new implementation of rw_pr_lock_t.
Since it never allows situation in which rwlock is rd-locked
and there is a blocked pending rd-lock it is not affected by
bug #56405 "Deadlock in the MDL deadlock detector".
This implementation is also optimized for wr-lock/unlock
scenario which is most common in MDL subsystem. So it doesn't
introduce noticiable performance regressions in sysbench tests
(compared to old Linux-specific implementation). Moreover it
significantly improves situation for POINT_SELECT test when
many connections are used.
As part of this change removed try-lock part of API for
this type of lock. It is not used in our code and it would
be hard to implement correctly within constraints of new
implementation.
Finally, removed support of preferring readers from
my_rw_lock_t implementation as the only user of this
feature was old rw_pr_lock_t implementation.
include/mysql/psi/mysql_thread.h:
Removed try-lock part of prlock API.
It is not used in our code and it would be hard
to implement correctly within constraints of new
prlock implementation.
mysys/thr_rwlock.c:
Introduced new implementation of rw_pr_lock_t.
Since it never allows situation in which rwlock is rd-locked
and there is a blocked pending rd-lock it is not affected by
bug #56405 "Deadlock in the MDL deadlock detector".
This implementation is also optimized for wr-lock/unlock
scenario which is most common in MDL subsystem. So it doesn't
introduce noticiable performance regressions in sysbench tests
(compared to old Linux-specific implementation). Moreover it
significantly improves situation for POINT_SELECT test when
many connections are used.
Also removed support of preferring readers from
my_rw_lock_t implementation as the only user of this
feature was old rw_pr_lock_t implementation.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fixed obvious errors (HAVE_BROKEN_PREAD is not true for on any
of systems we use, definitely not on HPUX)
* Remove other junk flags for OSX and HPUX
* Avoid checking type sizes in universal builds on OSX, again
(CMake2.8.0 fails is different architectures return different results)
* Do not compile template instantiation stuff unless
EXPLICIT_TEMPLATE_INSTANTIATION is used.
* Some cleanup (make gen_lex_hash simpler, avoid dependencies)
* Exclude some unused files from compilation (strtol.c etc)
|
|\ \
| |/
| |
| |
| |
| | |
(resolving conflicts in mysql-test/suite/rpl/t/rpl_sync-slave.opt and
configure.cmake)
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
- scripts/CMakeLists.txt
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
cmake/build_configurations/mysql_release.cmake
- Corrected spelling ENABLE_LOCAL_INFILE => ENABLED_LOCAL_INFILE
- In addition to "RelWithDebInfo", set target "Release" and "Debug"
- Set Debug flags
- Enabled SSL on Mac OS X
- For gcc builds, set RELEASE and DEBUG flags as well
- For g++ builds, added "-fno-implicit-templates"
- Use "-O" (gcc -O1) for optimized binaries, as "DEBUG" in out case
is more about enabling trace support to the server, no optimization
makes binaries too slow to be practical to reproduce problems
cmake/os/WindowsCache.cmake
- Removed unused HAVE_SYS_IOCTL
config.h.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- Grouped and uncommented some HAVE_* that are really not
defines, but internal variables used in the CMake setup,
- Added hard coded flags for HP-UX and Mac OS X
configure.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- "sys/dir.h" test needs "sys/types.h"
- Corrected syntax for "sys/ptem.h" test
- Don't exclude test for some types if Mac OS X, harmless
to do the test and we want the HAVE_<type> settings
- Added hard coded flags for HP-UX and Mac OS X
extra/yassl/CMakeLists.txt
extra/yassl/taocrypt/CMakeLists.txt
- Added missing source file "template_instnt.cpp"
|
| |/ |
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Reverted a faulty change of MY_SEARCH_LIBS
- Added the proper change for MY_SEARCH_LIBS and HAVE_<libname>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Set SIZEOF_VOIDP the same way as others
- Unindent the no Mac OS settings, to let the checker scripts find the lines
- Removed duplicate SIZEOF_SIZE_T setting
- Added missing value for HAVE_CHARSET_ascii
configure.cmake
- Added HAVE_ prefix to library names, like HAVE_LIBM
- Set HAVE_CXXABI_H if header is found, HAVE_ABI_CXA_DEMANGLE
controls if useful
- Set SIZEOF_VOIDP the same way as others
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Added missing HAVE_SYS_TIMES_H, HAVE_SYS_TIME_H, HAVE_TIME_H,
HAVE_TIME and HAVE_TIMES
- Removed most #if constructs, keep logic in "configure.cmake"
- Use space after # if inside #if, for consistency
configure.cmake
- Added MY_CHECK_TYPE_SIZE function that sets both SIZEOF_* and HAVE_*
- If "sys/stream.h" exists, include it before "sys/ptem.h" in test
- Set VOID_SIGHANDLER if RETSIGTYPE is set to "void"
|
|/ /
| |
| |
| | |
Implement WITH_VALGRIND for the CMake build.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Post-push fix: -Wall implies -Wunused on some platforms,
which will generate thousands of warnings about unused parameters.
configure.cmake:
Do not warn about unused parameters in C++
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
cmd-line-utils/libedit/filecomplete.c:
Remove unused auto variables.
configure.cmake:
Add -Wall to gcc.
extra/comp_err.c:
Cast to correct type.
extra/perror.c:
Fix segfault (but warnings about deprecated features remain)
extra/yassl/taocrypt/include/runtime.hpp:
Comparing two literals was reported as undefined behaviour.
include/my_global.h:
Add a template for aligning character buffers.
mysys/lf_alloc-pin.c:
Initialize pointer.
sql/mysqld.cc:
Use UNINIT_VAR rather than LINT_INIT.
sql/partition_info.cc:
Use UNINIT_VAR rather than LINT_INIT.
sql/rpl_handler.cc:
Use char[] rather than unsigned long[] array for placement buffer.
sql/spatial.cc:
Use char[] rather than unsigned void*[] array for placement buffer.
sql/spatial.h:
Use char[] rather than unsigned void*[] array for placement buffer.
sql/sql_partition.cc:
Initialize auto variable.
sql/sql_table.cc:
Initialize auto variables.
Add parens around assignment within if()
sql/sys_vars.cc:
Use UNINIT_VAR.
storage/innobase/os/os0file.c:
Init first slot in auto variable.
storage/myisam/mi_create.c:
Use UNINIT_VAR rather than LINT_INIT.
storage/myisam/mi_open.c:
Remove (wrong) casting.
storage/myisam/mi_page.c:
Remove (wrong) casting.
storage/myisam/mi_search.c:
Cast to uchar* rather than char*.
strings/ctype-ucs2.c:
Use UNINIT_VAR rather than LINT_INIT.
Add (uchar*) casting.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
address" error).
The thing is that on some platforms (e.g. Mac OS X) sockaddr_in / sockaddr_in6
contain a non-standard field (sin_len / sin6_len), that must be set.
The problem was that only standard fields were set, thus getnameinfo() returned
EAI_SYSTEM instead of EAI_NONAME.
The fix is to introduce configure-time checks (for GNU auto-tools and CMake) for
those additional fields and to set them if they are available.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
linux x86_64 max
Rpl tests were surprisingly taking too long when server was built
using cmake on linux. This was because cmake counter part of
patch for WL#4949 was not defining SIGNAL_WITH_VIO_CLOSE flag,
which had negative impact on the time needed to stop the slave IO
thread on STOP SLAVE command.
We fix this by deploy the missing SET command on configure.cmake.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on Windows".
On platforms where read-write lock implementation does not
prefer readers by default (Windows, Solaris) server might
have deadlocked while detecting MDL deadlock.
MDL deadlock detector relies on the fact that read-write
locks which are used in its implementation prefer readers
(see new comment for MDL_lock::m_rwlock for details).
So far MDL code assumed that default implementation of
read/write locks for the system has this property.
Indeed, this turned out ot be wrong, for example, for
Windows or Solaris. Thus MDL deadlock detector might have
deadlocked on these systems.
This fix simply adds portable implementation of read/write
lock which prefer readers and changes MDL code to use this
new type of synchronization primitive.
No test case is added as existing rqg_mdl_stability test can
serve as one.
config.h.cmake:
Check for presence of pthread_rwlockattr_setkind_np to be
able to determine if system natively supports read-write
locks for which we can specify if readers or writers should
be preferred.
configure.cmake:
Check for presence of pthread_rwlockattr_setkind_np to be
able to determine if system natively supports read-write
locks for which we can specify if readers or writers should
be preferred.
configure.in:
Check for presence of pthread_rwlockattr_setkind_np to be
able to determine if system natively supports read-write
locks for which we can specify if readers or writers should
be preferred.
include/my_pthread.h:
Added support for portable read-write locks which prefer
readers.
To do so extended existing my_rw_lock_t implementation to
support selection of whom to prefer depending on a flag.
mysys/thr_rwlock.c:
Extended existing my_rw_lock_t implementation to support
selection of whom to prefer depending on a flag.
Added rw_pr_init() function implementing initialization of
read-write locks preferring readers.
sql/mdl.cc:
Use portable read-write locks which prefer readers instead of
relying on that system implementation of read-write locks has
this property (this was true for Linux/NPTL but was false,
for example, for Windows and Solaris).
Added comment explaining why preferring readers is important
for MDL deadlock detector (thanks to Serg for example!).
sql/mdl.h:
Use portable read-write locks which prefer readers instead of
relying on that system implementation of read-write locks has
this property (this was true for Linux/NPTL but was false,
for example, for Windows and Solaris).
|
| |
|
| |
|
|
|
|
|
|
|
| |
irrelevant anyway
Add cached variable WITH_XXX_STORAGE_ENGINE for dynamic plugins that can be static or
dynamic.
|
|
|
|
|
| |
This finishes of moving code from configure.cmake IF()'s to platform specific files
|
|
|
|
| |
compilng, add HPUX.cmake
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
cmake/os/SunOS.cmake
cmake/os/SunOS.cmake:
WL#5161: Moved Solaris specific workaround to cmake/os/SunOS.cmake
|
|
|
|
| |
under cmake/os. This patch does it for Linux
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specific files, instead of
polluting code with IF(CMAKE_SYSTEM_NAME MATCHES...), first on Windows.
cmake/libutils.cmake:
Fix the case in MERGE_LIBRARIES, where there is no dependency on OS libraries.
cmake/os/Windows.cmake:
Move windows specific code to cmake/os/Windows.cmake
configure.cmake:
Move some Windows code to cmake/os/Windows.cmake
|
|
|
|
| |
WORDS_BIGENDIAN was wrongly defined to 1
|
|
|
|
|
|
| |
pointer to function is expected).
This also has generated warnings on all other platforms
|
| |
|
|
|
|
|
|
| |
-lm is sometimes not linked, which causes errors about undefined rint()
- FreeBSD embedded library does not link with the flags returned by mysql_config
(added -lcrypt to LIBS, whereby causing overlinking in case of normal non-embedded client)
|
|
|
|
|
| |
DISABLE_MYSQL_THREAD_H for strings
Also, enable unittests for perfschema
|