Commit graph

175 commits

Author SHA1 Message Date
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Marko Mäkelä
ad0c218a44 Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:

recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).

Report progress also via systemd using sd_notifyf().
2017-03-09 08:53:08 +02:00
Vicențiu Ciorbaru
1acfa942ed Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
Sergei Golubchik
831b531895 MDEV-10788 Not able to compile source with -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Debug
It's too plainful to require <my_config.h> to be included first
for third-party storage engines. And anyway, some source files
might not include <my_config.h> at all, so there is no guarantee
that all parts of the binary will see identical definitions of system
structures (e.g. struct stat).

Define _FILE_OFFSET_BITS on the compiler's command line instead.
2017-02-27 12:35:10 +01:00
Sergey Vojtovich
8ff3b892ae MDEV-11212 - Clean-up MariaDB atomic operations
Removed MY_ATOMIC_MODE_DUMMY and WITH_ATOMIC_OPS: MariaDB is not functional
without atomic operations anymore.
2016-12-13 16:38:20 +04:00
Daniel Black
ab0e5031e4 MDEV-11195: Correct enablement of NUMA in innodb/xtradb
No -DHAVE_LIBNUMA=1 was passed to the source compile (and the
global include/my_config.h wasn't used).

This also is Linux only so corrected the cmake macro.

Fixed indenting in cmake macro.

Removed NUMA defination from include/my_config.h as its only
in the storage engine.

Thanks Elena Stepanova and Vladislav Vaintroub for the detailed
list of bugs/questions.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-11-01 11:09:47 +11:00
Daniel Black
8103f6f223 MDEV-10829: Enable Innodb NUMA interleave
Code was already existing within the innobase/xtradb storage engines
however without this cmake code it was never enabled.

num.cmake heavily based off work by Annamalai Gurusami <annamalai.gurusami@oracle.com>

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-09-23 08:33:38 +10:00
Sergey Vojtovich
9c2215e022 MDEV-9872 - Add common optimized CRC32 function interface
Move crc32-vpmsum to extra.
Compile static crc32-vpmsum instead of adding sources directly.
Make use of crc32-vpmsum via my_checksum().

Based on contribution by Daniel Black.
2016-08-04 10:45:20 +04:00
Monty
9c846373f0 Merge commit 'd5822a3ad0657040114cdc185c6387b9eb3a12b2' into 10.2 2016-04-28 16:59:33 +03:00
Yasufumi Kinoshita
d4ba50477e Some POWER specific optimizations
Bug#18842925 : SET THREAD PRIORITY IN INNODB MUTEX SPINLOOP
Like "pause" instruction for hyper-threading at Intel CPUs,
POWER has special instructions only for hinting priority of hardware-threads.

Approved by Sunny in rb#6256

Backport of the 5.7 fix - c92102a6ef
(excluded cache line size patch)

Suggestion by Stewart Smith
2016-03-31 16:34:56 +11:00
Sergei Golubchik
c4cb240061 MDEV-9024 Build fails with VS2015
cherry-pick f1daf9ce from 10.0 branch
-------------------------------------

Fix build failures caused by new C runtime library
- isnan, snprintf, struct timespec are now defined, attempt to
redefine them leads
- P_tmpdir, tzname are no more defined
-  lfind() and lsearch() in lf_hash.c had to be renamed,  declaration
conflicts with some C runtime functions with the same name declared in
a header included by stdlib.h

 Also fix couple of annoying warnings :
- remove #define NOMINMAX from config.h to avoid "redefined" compiler
warnings(NOMINMAX is already in compile flags)

- disable incremental linker in Debug as well (feature not used much
and compiler crashes often)

Also simplify package building with Wix, require Wix 3.9 or later
(VS2015 is not compatible with old Wix 3.5/3.6)
2016-02-06 22:41:58 +01:00
Sergei Golubchik
2ebc2eef8a cleanup: remove a couple of unused cmake checks and defines 2016-02-06 18:07:54 +01:00
Monty
b2f8d7b410 Merge branch '10.1' into 10.2
Conflicts:
	VERSION
	cmake/plugin.cmake
	config.h.cmake
	configure.cmake
	plugin/server_audit/server_audit.c
	sql/sql_yacc.yy
2016-02-06 18:14:54 +02:00
Kristian Nielsen
91ff017297 Merge MDEV-9112 into 10.1
Conflicts:
	config.h.cmake
	configure.cmake
2016-02-01 16:40:20 +01:00
Kristian Nielsen
955126e31d Merge MDEV-9112 into 10.0
Conflicts:
	configure.cmake
2016-02-01 16:29:00 +01:00
Georg Richter
8cf1f50967 MDEV-9112: Non-blocking client API missing on non-x86 platforms
The check for UCONTEXT in cmake was somehow become broken, disabling the
fallback to ucontext. This caused the non-blocking client API to not be
available for non-x86 platforms, on which no hand-crafted assembler
implementation of my_context is available.
2016-02-01 16:12:00 +01:00
Alexander Barkov
2ba7ed77aa Merge remote-tracking branch 'origin/10.1' into 10.2 2015-12-29 19:37:11 +04:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Sergei Golubchik
05dc86c09f Merge branch '5.5' into 10.0 2015-12-21 16:36:10 +01:00
Sergei Golubchik
e126baafbc MDEV-9249 MariaDB un-buildable on linux64: fails @ "error: ‘ERR_remove_state’ was not declared in this scope" when linking against OpenSSL 1.0.2e
ERR_remove_state is deprecated, use ERR_remove_thread_state
if possible
2015-12-21 12:17:31 +01:00
Monty
f813a00029 Fixed failing test cases and compiler warnings found by buildbot
- Added some extra command to rpl_start_stop to ensure that the
  IO thread has connected to the master before we shut down the server.
- if signal returns signalhandler_t, use this with the alarm code
- Added missing tests to sys_vars
- Fixed some possible overflow bugs in tabxml.cpp
2015-11-24 20:04:12 +02:00
Sergei Golubchik
65d69c84cf cmake: remove unused checks, options, and symbols 2015-11-23 16:02:56 +01:00
Sergei Golubchik
beded7d9c9 Merge branch '10.0' into 10.1 2015-11-19 15:52:14 +01:00
Monty
c2ec897745 Fixed buildbot failures on Solaris 64 bit
rpl/rpl_mdev382     ; Wrong replace in show_binlog_events2.inc
binlog/database     ; Different error on Solaris if file exists
mroonga/repair_table_no_index_file ; Different system error on Solaris
partition_not_blackhole ; Different error on Solaris
partition_myisam     ; Different error on Solaris

Some other failures in mroonga was because have_32bit.inc didn't correctly
detect 64 bits on Solaris. Fixed using DEFAULT_MACHINE instead of MACHINE_TYPE
for Sys_version_compile_machine.
2015-11-18 17:42:39 +02:00
Sergei Golubchik
29dd634a4c dbug: correct trace for DBUG_RETURN(func()); -- gcc only
when func1 calls func2 from DBUG_RETURN, dbug shows the trace as
| > func1
| < func1
| > func2
| < func2
because DBUG_LEAVE happens before func2(). Change that to invoke
DBUG_LEAVE when the local variable goes out of scope. This uses
gcc specific __attribute__((cleanup)).
2015-11-16 07:55:55 +01:00
Nirbhay Choubey
7ec6558503 MDEV-9021: MYSQLD SEGFAULTS WHEN BUILT USING --WITH-MAX-INDEXES=128
The bitmap implementation defines two template Bitmap classes. One
optimized for 64-bit (default) wide bitmaps while the other is used for
all other widths.

In order to optimize the computations, Bitmap<64> class has defined its
own member functions for bitmap operations, the other one, however,
relies on mysys' bitmap implementation (mysys/my_bitmap.c).

Issue 1:
In case of non 64-bit Bitmap class, intersect() wrongly reset the
received bitmap while initialising a new local bitmap structure
(bitmap_init() clears the bitmap buffer) thus, the received bitmap was
getting cleared.

Fixed by initializing the local bitmap structure by using a temporary
buffer and later copying the received bitmap to the initialised bitmap
structure.

Issue 2:
The non 64-bit Bitmap class had the Iterator missing which caused
compilation failure.

Also added a cmake variable to hold the MAX_INDEXES value when supplied
from the command prompt. (eg. cmake .. -DMAX_INDEXES=128U). Checks have
been put in place to trigger build failure if MAX_INDEXES value is
greater than 128.

Test modifications:
* Introduced include/have_max_indexes_[64|128].inc to facilitate
skipping of tests for which the output differs with different
MAX_INDEXES.

* Introduced include/max_indexes.inc which would get modified by cmake
to reflect the MAX_INDEXES value used to build the server. This file
simply sets an mtr variable '$max_indexes' to show the MAX_INDEXES
value, which will then be consumed by the above introduced include file.

* Some tests (portions), dependent on MAX_INDEXES value, have been moved
to separate test files.
2015-11-09 09:28:00 -05:00
Vladislav Vaintroub
f1daf9ced4 MDEV-9024 Build fails with VS2015
Fix build failures caused by new C runtime library
- isnan, snprintf, struct timespec are now defined, attempt to
redefine them leads
- P_tmpdir, tzname are no more defined
-  lfind() and lsearch() in lf_hash.c had to be renamed,  declaration
conflicts with some C runtime functions with the same name declared in
a header included by stdlib.h

 Also fix couple of annoying warnings :
- remove #define NOMINMAX from config.h to avoid "redefined" compiler
warnings(NOMINMAX is already in compile flags)

- disable incremental linker in Debug as well (feature not used much
and compiler crashes often)


Also simplify package building with Wix, require Wix 3.9 or later
(VS2015 is not compatible with old Wix 3.5/3.6)
2015-11-06 17:27:24 +01:00
Daniel Black
20c2ae39db MDEV-427/MDEV-5713 Add systemd script with notify functionality 2015-10-12 17:51:49 +02:00
Jan Lindström
21adad000a MDEV-8901: InnoDB: Punch hole is incorrecty done also to log files causing assertion and database corruption
Analysis: Problem is that punch hole does not know the actual page size
of the page and does the page belong to an data file or to a log file.

Fix: Pass down the file type and page size to os layer to be used
when trim is called. Also fix unsafe null pointer access to
actual write_size.
2015-10-06 15:40:26 +03:00
Oleksandr Byelkin
7dd137c4ac MDEV-6756: map a linux pid (child pid) to a connection id shown in the output of SHOW PROCESSLIST
Added tid (thread ID) for system where it is present.

 ps -eL -o tid,pid,command

shows the thread on Linux
2015-09-17 14:30:58 +02:00
Sergei Golubchik
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Sergei Golubchik
66fd45afce MDEV-7398 mysqld segfaults on FreeBSD 10.1 i386 when built with clang 3.4
in cmake tests let's treat clang like gcc (same options,
same builtins) in many cases.

* don't check the compiler when
  * testing for -fvisibility=hidden support
  * testing for HAVE_ABI_CXA_DEMANGLE
  * testing for HAVE_GCC_ATOMIC_BUILTINS
  * when removing options with string(replace)
  * when running ${CC} --version (ignore the error instead)
* run ABI checks for clang
* use "canonical" gcc flags for clang
* fix groonga too

Also:

* add cmake detection for gcc __atomic_* builtins. they might be
  supported (__ATOMIC_SEQ_CST is defined), but not for all operand
  sizes. In particular, 64-bit atomic load is problematic on i386
* cache check results for Windows
* remove the test for HAVE_CXXABI_H (HAVE_ABI_CXA_DEMANGLE is
  suffifient)
2015-06-16 23:58:21 +02:00
Sergei Golubchik
810cf362ea Merge branch '5.5' into 10.0 2015-06-11 20:20:35 +02:00
Alexander Barkov
1ff423dfc0 MDEV-8243 configure defines to empty string, not 1 2015-06-04 21:12:29 +04:00
Sergei Golubchik
0f0092720f my_aes_encrypt_gcm() and my_aes_decrypt_gcm() 2015-06-02 19:00:23 +02:00
Sergei Golubchik
c78f594bbc MDEV-6479 stack traces in 10.1
Take into account that PIE binaries are loaded at some offset, so
addresses cannot be directly resolved with addr2line. Find this
offset and subtract it before resolving an address.
2015-02-28 19:48:22 +01:00
Sergei Golubchik
f3da18f635 cmake-time detection for EVP_aes_128_ctr()
because old openssl versions (e.g. on labrador) don't have it
2015-02-10 10:21:18 +01:00
Sergei Golubchik
e695db0f2d MDEV-7437 remove suport for "atomics" with rwlocks 2015-01-13 10:15:21 +01:00
Sergei Golubchik
ec4137c62b Merge branch '10.1' into bb-10.1-merge 2014-12-03 11:37:26 +01:00
Jan Lindström
d4aef382fd Fix compiler failure on fallocate function and used flags. 2014-12-03 10:41:52 +02:00
Sergei Golubchik
853077ad7e Merge branch '10.0' into bb-10.1-merge
Conflicts:
	.bzrignore
	VERSION
	cmake/plugin.cmake
	debian/dist/Debian/control
	debian/dist/Ubuntu/control
	mysql-test/r/join_outer.result
	mysql-test/r/join_outer_jcl6.result
	mysql-test/r/null.result
	mysql-test/r/old-mode.result
	mysql-test/r/union.result
	mysql-test/t/join_outer.test
	mysql-test/t/null.test
	mysql-test/t/old-mode.test
	mysql-test/t/union.test
	packaging/rpm-oel/mysql.spec.in
	scripts/mysql_config.sh
	sql/ha_ndbcluster.cc
	sql/ha_ndbcluster_binlog.cc
	sql/ha_ndbcluster_cond.cc
	sql/item_cmpfunc.h
	sql/lock.cc
	sql/sql_select.cc
	sql/sql_show.cc
	sql/sql_update.cc
	sql/sql_yacc.yy
	storage/innobase/buf/buf0flu.cc
	storage/innobase/fil/fil0fil.cc
	storage/innobase/include/srv0srv.h
	storage/innobase/lock/lock0lock.cc
	storage/tokudb/CMakeLists.txt
	storage/xtradb/buf/buf0flu.cc
	storage/xtradb/fil/fil0fil.cc
	storage/xtradb/include/srv0srv.h
	storage/xtradb/lock/lock0lock.cc
	support-files/mysql.spec.sh
2014-12-02 22:25:16 +01:00
Sergei Golubchik
3495801e2e 5.5 merge 2014-11-19 17:23:39 +01:00
Sergei Golubchik
c4598ce300 MDEV-6862 "#error <my_config.h>" and third-party libraries
only enforce the include order if SAFE_MUTEX is defined
(that is, in MariaDB source builds in debug mode)
2014-11-10 19:17:39 +01:00
Jan Lindström
b96697d286 MDEV-6648: InnoDB: Add support for 4K sector size if supported
New generation hard drives, SSDs and NVM devices support 4K
sector size. Supported sector size can be found using fstatvfs()
or GetDiskFreeSpace() functions.
2014-10-29 11:07:11 +02:00
Sergei Golubchik
f62c12b405 Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
Sergei Golubchik
7f5e51b940 MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove:
* NDB from everywhere
* IM from mtr-v1
* packaging/rpm-oel and packaging/rpm-uln
* few unused spec files
* plug.in file
* .bzrignore
2014-10-11 18:53:06 +02:00
Sergei Golubchik
1b75bed00f 5.5.40+ merge 2014-10-09 10:30:11 +02:00
Sergei Golubchik
aa36d9e742 MDEV-5120 Test suite test maria-no-logging fails
stat structure (from <sys/stat.h>) is conditionally defined
to have different layout and size depending on the defined macros.
The correct macro is defined in my_config.h, which means it MUST be
included first (or, at least before <features.h> - so, practically,
before including any system headers).
2014-10-02 11:57:40 +02:00
Sergei Golubchik
2156f62d2e portability: use getifaddrs()
instead of exec'ing /usr/sbin/ifconfig|grep|sed|awk
2014-10-01 23:48:36 +02:00
Sergei Golubchik
3620910eea cleanup: galera merge, simple changes 2014-10-01 23:38:27 +02:00
Sergei Golubchik
9fffe990c4 buildbot found failures
config.h.cmake:
  define NOMINMAX, otherwise Windows system headers define min() and max() macros
sql/slave.cc:
  mi->report() has one more argument in MariaDB
storage/xtradb/buf/buf0flu.cc:
  xtradb fixes for windows, again
2014-08-08 13:53:43 +02:00
Sergei Golubchik
da9bb66b02 cmake GUI cleanup
mark path-related variables (AIO_LIBRARY, ODBC_LIBRARY, ODBC_INCLUDE_DIR,
Thrift_LIBS, Thrift_INCLUDE_DIRS, CRYPTO_LIBRARY, OPENSSL_LIBRARIES,
OPENSSL_ROOT_DIR, OPENSSL_INCLUDE_DIR) as advanced - paths are
automatically discovered by cmake.

mark few choice variables (ENABLED_LOCAL_INFILE, WITHOUT_SERVER,
DISABLE_SHARED) as not advanced - they are user choices, not automatically
configured values.

remove unused BACKUP_TEST variable.
2014-06-23 17:39:13 +02:00
Alexander Barkov
5fffa449ed Fixing compilation problem on AIX. 2014-04-10 15:26:05 +04:00
Sergei Golubchik
0dc23679c8 10.0-base merge 2014-02-26 15:28:07 +01:00
Sergei Golubchik
0b9a0a3517 5.5 merge 2014-02-25 16:04:35 +01:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Michael Widenius
273078c5fa Fixes to get valgrind to work with jemalloc
- Added MALLOC_LIBRARY variable to hold name of malloc library
- Back ported valgrind related fixes from jemalloc 3.4.1 to the included jemalloc 3.3.1
- Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
- Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
- Show version related variables in mysqld --help
  -- Added SHOW_VALUE_IN_HELP marker

Increased back_log to 150 as the original value was a bit too small


CMakeLists.txt:
  Added MALLOC_LIBRARY variable to hold name of malloc library
cmake/jemalloc.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
config.h.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
extra/jemalloc/ChangeLog:
  Updates changelog
extra/jemalloc/include/jemalloc/internal/arena.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/private_namespace.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/tcache.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/src/arena.c:
  Backported valgrind fixes from jemalloc 3.4.1
include/my_bitmap.h:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
mysql-test/mysql-test-run.pl:
  Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
mysql-test/valgrind.supp:
  Supression of memory leak in OpenSuse 12.3
mysys/my_bitmap.c:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free()
sql/ha_ndbcluster_binlog.cc:
  Renames
sql/ha_ndbcluster_cond.h:
  Renames
sql/ha_partition.cc:
  Renames
sql/handler.cc:
  Renames
sql/item_subselect.cc:
  Renames
sql/log_event.cc:
  Renames
sql/log_event_old.cc:
  Renames
sql/mysqld.cc:
  Renames
  Show version related variables in mysqld --help
sql/opt_range.cc:
  Renames
sql/opt_table_elimination.cc:
  Renames
sql/partition_info.cc:
  Renames
sql/rpl_injector.h:
  Renames
sql/set_var.h:
  Renames
sql/slave.cc:
  Renames
sql/sql_bitmap.h:
  Renames
sql/sql_insert.cc:
  Renames
sql/sql_lex.h:
  Renames
sql/sql_parse.cc:
  Renames
sql/sql_partition.cc:
  Renames
sql/sql_select.cc:
  Renames
sql/sql_show.cc:
  Renames
sql/sql_update.cc:
  Renames
sql/sys_vars.cc:
  Show version related variables in mysqld --help
sql/sys_vars.h:
  Added SHOW_VALUE_IN_HELP marker for variables that should be shown in --help
sql/table.cc:
  Renames
sql/table.h:
  Removed not used bitmap_init_value
storage/connect/ha_connect.cc:
  Removed compiler warning
storage/maria/ma_open.c:
  Renames
unittest/mysys/bitmap-t.c:
  Renames
2014-01-02 11:19:19 +02:00
Tor Didriksen
ba22c3f29a Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION
Bug#68338    RFE: make tmpdir a build-time configurable option

Background: Some distributions use tmpfs for mounting /tmp by
default, which has some advantages, but brings also new
issues. Fedora started using tmpfs on /tmp in version 18 for
example. If not configured otherwise in my.cnf, MySQL uses
system's constant P_tmpdir expanded to /tmp on Linux. This can
introduce some problems with limited space in /tmp and also some
data loss in case of replication slave [1].

In case distributions would like to use /var/tmp, which should be
better for MySQL purposes, then we have to patch the source or
change tmpdir option in my.cnf, which is however not updated in
case it has already existed.

Thus, it would be useful to be able to specify default tmpdir
path using a configure option, while using P_tmpdir in case it is
not defined explicitly.

Based on a contribution from Honza Horak
2013-12-18 11:05:18 +01:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergei Golubchik
4ec2e9d7ed 5.5 merge and fixes for compiler/test errors 2013-09-18 13:07:31 +02:00
Sergei Golubchik
c06eaf21b7 MDEV-4165 [PATCH] RFE: make tmpdir a build-time configurable option
support -DTMPDIR=/path in CMakeLists.txt

Patch by Honza Horak.
2013-08-17 17:20:09 +04:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00
Vladislav Vaintroub
4b058643cd MDEV-4601 : Allow MariaDB to be build without non-blocking client.
Non-blocking client currently can be build on Windows, GCC on i386 and x64, or any OS wth ucontext.h header. Prior to this patch, build failed if neither of these conditions is true.
Fix to avoid compiler errors in these case - non-blocking API would not be useful on , but otherwise everything will work as before.
2013-06-15 14:22:03 +02:00
Sergei Golubchik
a9035be5b7 10.0-base merge 2013-04-15 15:09:22 +02:00
Sergei Golubchik
cc28eda62e MDEV-4273 MYSQL_VERSION_MAJOR.MYSQL_VERSION_MINOR not replaced
rename s/MYSQL_MAJOR_VERSION/MYSQL_VERSION_MAJOR/ and
s/MYSQL_MINOR_VERSION/MYSQL_VERSION_MINOR/ to match 5.6
2013-04-03 16:40:47 +02:00
Sergei Golubchik
993ea79f2d 5.5 merge 2013-03-27 23:41:02 +01:00
Vladislav Vaintroub
2c37ace131 MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants than just FreeBSD
or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
2013-02-19 23:46:52 +01:00
unknown
701419b02f Merge MariaDB 10.0-base to MariaDB 10.0 2012-12-18 15:01:58 +01:00
Sergei Golubchik
a058974440 remove HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 2012-12-17 10:56:26 +01:00
Sergei Golubchik
d73e04588b fix innodb plugin versions 2012-10-27 17:24:25 +02:00
Sergei Golubchik
0117a92fed MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake
remove dead code and unused HAVE_xxx constants from the sources
2012-07-31 19:29:07 +02:00
Sergei Golubchik
7368ef56c6 MDEV-418 Feedback plugin statisics problem
Add the check for sys/utsname.h to configure.cmake
2012-07-31 11:31:26 +02:00
unknown
cb6109cde1 MDEV-329: MariaDB 5.5 does not use fdatasync().
The --debug-no-sync incorrectly defaulted to ON, disabling sync calls
by default which can loose data or cause corruption. Also, the code
used fsync() instead of the sometimes more efficient fdatasync().
2012-06-08 11:18:56 +02:00
Sergei Golubchik
edfcb97a61 MDEV-220 MariaDB server 5.5 GA candidate has default storage engine MyISAM 2012-04-19 04:02:28 +02:00
Sergei Golubchik
db39910f08 disable safemalloc for valgrind builds.
always try to use valgrind headers in debug builds.
define HAVE_valgrind for --with-valgrind
fix valgrind check in my_valgrind.h
2012-02-23 15:31:24 +01:00
Sergei Golubchik
37c81d81b3 another backtrace resolver that prints source file name and line number 2011-12-11 09:00:12 +01:00
Sergei Golubchik
48b6861198 compilation failure on Solaris 2011-11-28 17:45:17 +01:00
Sergei Golubchik
dfc1901e80 compilation fixes
cmake/maintainer.cmake:
  don't do -Werror just yet
config.h.cmake:
  according to MSDN PSAPI_VERSION should be 1 in a portable application
mysys/my_thr_init.c:
  first, reset THR_KEY_mysys, and then free dbug data,
  because dbug data are automacially created on the next dbug call,
  unless THR_KEY_mysys is null.
2011-11-27 17:50:08 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Jon Olav Hauglid
aee88a4cc6 Bug#12779790 COMPILATION FAILS OS X 10.7 - IMPLICIT DECLARATION OF
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.
2011-07-21 17:45:38 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Nirbhay Choubey
51721df03a Merge of fix for bug#11757855 from mysql-5.1 -> mysql-5.5. 2011-04-30 10:54:38 +05:30
Davi Arnaut
5f49c7d6b7 FIONREAD is located in sys/filio.h on Solaris. 2011-04-29 18:48:23 -03:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Magne Mahre
b71c5d51c6 Bug#11766320 MYSQL SYMBOLIC LINKS NOT WORKING
When MySQL converted from autotools to CMake, the
preprocessor symbol USE_SYMDIR was omitted by mistake.

Without this symbol, the code for checking .sym files
is not built.

This patch defines USE_SYMDIR when built on MS Windows.
2011-04-14 10:08:12 +02:00
Davi Arnaut
8aadfb4065 Remove some leftovers from the removal of the gethostbyname wrappers. 2011-04-13 16:05:26 -03:00
Georgi Kodinov
fe145b0900 merge 2011-02-02 20:13:28 +02:00
Tor Didriksen
7f3decd9b2 Bug #58991 DEFAULT_CHARSET and DEFAULT_COLLATION does not work with CMake.
cmake/character_sets.cmake:
  Fix typo in variable name.
  Some cosmetics.
config.h.cmake:
  Do not use hard-coded defaults for charset and collation.
2011-01-04 11:23:45 +01:00
Magne Mahre
8ede0759c3 Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Vasil Dimov
57c910ff6c Merge mysql-5.5-bugteam -> mysql-5.5-innodb 2010-12-27 19:24:05 +02:00
Tor Didriksen
029a5df870 Bug #58699 cannot build with gcc dbg on solaris
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.
2010-12-21 13:00:26 +01:00
Vasil Dimov
8903bae21a Define MYSQL_(MAJOR|MINOR)_VERSION the way things are defined in CMake
instead of hacking a custom ADD_DEFINITIONS().

Approved by:	Kent Boortz (via IRC)
2010-12-02 12:04:10 +02:00
Georgi Kodinov
8789c79723 merge 2010-10-04 15:42:16 +03:00
Dmitry Lenev
0afd0a18fe A better fix for bug #56405 "Deadlock in the MDL deadlock
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.
2010-09-29 16:09:07 +04:00
Georgi Kodinov
9705711596 WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Vasil Dimov
ca090321bf Merge mysql-trunk-bugfixing -> mysql-trunk-innodb 2010-07-29 12:42:55 +03:00
Vladislav Vaintroub
568c26631c Cleanup after bild team push.
* 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)
2010-07-25 19:30:18 +02:00
Vasil Dimov
5ba3936517 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(resolving conflicts in mysql-test/suite/rpl/t/rpl_sync-slave.opt and
configure.cmake)
2010-07-21 17:22:29 +03:00
Alexander Nozdrin
b5eac2b2ce Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00