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.
Problem Statement
=========
Fix various issues when building MySQL with Visual Studio 2015.
Fix:
=======
- Visual Studio 2015 adds support for timespec. Add check and
related code to use this and only use our replacement if
timespec is not defined.
- Rename lfind/lsearch to my* to avoid redefinition problems.
- Set default value for TMPDIR to "" on Windows as P_tmpdir
no longer exists.
- using VS definition of snprintf if available
- tzname are now renamed to _tzname.
wsrep.cmake should be included before cpack_rpm.cmake as it defines
WITH_WSREP, required by cpack_rpm.cmake to conditionally include galera
helper tools in server package's requires list.
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.
including the big commit
commit 305130361bf72726de220f3d2b2787395e10be61
Author: Marc Alff <marc.alff@oracle.com>
Date: Tue Feb 10 11:31:32 2015 +0100
WL#8354 BACKPORT DIGEST IMPROVEMENTS TO MYSQL 5.6
(with the following commits) and related changes in sql/
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS
Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG
Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE
Backport from mysql-5.6 to mysql-5.5
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS
Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG
Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE
Backport from mysql-5.6 to mysql-5.5
1. move cflags/libs cleanup from mysql_config.sh (runtime)
to for_client.cmake (build time). Include/library paths are
still calculated at runtime (they depend on the location of mysql_config)
2. Use cleaned-up cflags/libs to generate mariadb.pc
3. remove obsolete @expansions@ from mysql_config (for variables that are
never set in cmake files)
Merged lp:maria/maria-10.0-galera up to revision 3879.
Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
~40% bugfixed(*) applied
~40$ bugfixed reverted (incorrect or we're not buggy)
~20% bugfixed applied, despite us being not buggy
(*) only changes in the server code, e.g. not cmakefiles
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.
Bug#17894997 CMAKE WARNING WRT INTERFACE_LINK_LIBRARIES
Bug#17905155 CMAKE WARNING WHEN GENERATING MAKEFILE
Bug#71089 CMake warning when generating Makefile
Use old policy for LINK_INTERFACE_LIBRARIES.
Bug#17894997 CMAKE WARNING WRT INTERFACE_LINK_LIBRARIES
Bug#17905155 CMAKE WARNING WHEN GENERATING MAKEFILE
Bug#71089 CMake warning when generating Makefile
Use old policy for LINK_INTERFACE_LIBRARIES.
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
to find header files from the bundled libraries
(jemalloc, yassl, readline, pcre, etc)
before the ones installed in the system.
Bug#68338 RFE: make tmpdir a build-time configurable option
Post-push fix: 'cmake -LH | grep TMP' showed TMPDIR as a BOOL option,
which was a bit confusing: show it as a PATH instead.
Bug#68338 RFE: make tmpdir a build-time configurable option
Post-push fix: 'cmake -LH | grep TMP' showed TMPDIR as a BOOL option,
which was a bit confusing: show it as a PATH instead.
- 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
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
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
Updated information in SHOW AUTHORS and SHOW CONTRIBUTORS
SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore.
CMakeLists.txt:
Install TODO and CREDITS files
CREDITS:
Information about the MariaDB foundation
README:
Updated to include the MariaDB foundation
mysql-test/r/contributors.result:
Updated contributors
mysql-test/r/show_check.result:
SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore.
scripts/make_binary_distribution.sh:
Added TODO and CREDITS
sql/authors.h:
Updated list of active authors
sql/contributors.h:
Updated list of active contributors and members of the MariaDB foundation
sql/sql_show.cc:
Extend comment lengths
sql/sql_yacc.yy:
SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore
* add TokuDB, together with the ft-index library
* cmake support, auto-detecting whether tokudb can be built
* fix packaging - tokudb-engine.rpm, deb
* remove PBXT
* add jemalloc
* the server is built with jemalloc by default even if TokuDB is not built
* documentation files in RPM are installed in the correct location
* support for optional deb packages (tokudb has specific build requirements)
* move plugins from mariadb-server deb to appropriate debs (server/test/libmariadbclient)
* correct mariadb-test.deb to be not architecture-independent
* fix out-of-tree builds to never modify in-tree files
* new handler::prepare_index_scan() method
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
The main reason for he error is misplaced ADD_DIRECTORY in top-level CMakeLists.txt.
ADD_DIRECTORY(win/packaging) was places before win/upgrade_wizard, and MSI was not able to detect that upgrade wizard was built, and thus excluded upgrade wizard entirely.
on the build machine. So put them into the deb packages optionally.
Additionally, fixing cassandra/CMakeLists.txt to work with thrift
installed in /opt/local and /opt. It was supposed to work, but did
not work actually. Only thrift installed in /usr or /usr/local worked.
renamed:
debian/dist/Debian/mariadb-server-10.0.files => debian/dist/Debian/mariadb-server-10.0.files.in
debian/dist/Ubuntu/mariadb-server-10.0.files => debian/dist/Ubuntu/mariadb-server-10.0.files.in
modified:
.bzrignore
CMakeLists.txt
storage/cassandra/CMakeLists.txt
storage/cassandra/cassandra_se.cc
storage/cassandra/gen-cpp/Cassandra.h
storage/cassandra/gen-cpp/cassandra_types.h
storage/oqgraph/CMakeLists.txt
debian/dist/Debian/mariadb-server-10.0.files.in
debian/dist/Ubuntu/mariadb-server-10.0.files.in
Ignore --with-client-ldflags
it's not supported by the cmake scripts anyways.
Ignore --with-mysqld-ldflags
it's only used with --with-mysqld-ldflags=-static
and that doesn't work.
Ignore --with-client-ldflags
it's not supported by the cmake scripts anyways.
Ignore --with-mysqld-ldflags
it's only used with --with-mysqld-ldflags=-static
and that doesn't work.
cmake/maintainer.cmake:
Add -DFORCE_INIT_OF_VARS to not get warnings generated by -Wall
configure.cmake:
Don't add -Wall if we already have it. This is to not enable options that are already turned off.
support-files/compiler_warnings.supp:
Removed suppression that is not needed anymore
from the MySQL 5.5 source tree.
Contrary to the comment, the spec file for these ULN RPMs
was missing in the previous changeset (blame ".bzrignore").
This change now brings said spec file, and it adds cmake
handling for the new files.
Still for internal tool tests only, not yet ready for publishing.
CMakeLists.txt:
Add the subdirectory holding specific stuff
for the RedHat-compatible RPMs for ULN.
cmake/install_layout.cmake:
Explicitly mention my the ULN RPMs are handled.
from the MySQL 5.5 source tree.
Contrary to the comment, the spec file for these ULN RPMs
was missing in the previous changeset (blame ".bzrignore").
This change now brings said spec file, and it adds cmake
handling for the new files.
Still for internal tool tests only, not yet ready for publishing.
mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
* MYSQL_MAINTAINER_MODE and SAFEMALLOC take values ON/OFF/AUTO
(in all builds, in none, only in debug and platform dependent)
* ./configure prefers RelWithDebInfo unless the user overrides
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.
- build executables we have in 5.3 (mysql_install_db.exe, mysq_upgrade_service.exe, upgrade wizard), and MSI
- add some missing headers to windows specific source files.
This needs to be done since 5.5 is using WIN32_LEAN_AND_MEAN preprocessor constant thus windows.h
no more includes whiole Windows
- do not deliver perl scripts (mysql_install_db.pl & friends) -they do not work, are not documented, and we
have native executables for this functionality. do not pack echo.exe, replace.exe into MSI, they
are not needed. Do not build resolveip on Windows, it is not used.
- precache results of of system checks in cmake/os/WindowsCache.cmake (like it is alreay done for majority of tests
to speed up cmake run with VS)
- make feedback plugin DEFAULT on Windows (so MSI works if user enables plugin),
fix null pointer access in PSI_register
Checking for WITH_DEBUG does not work, as described in CMake MySQL wiki
http://forge.mysql.com/wiki/CMake#Debug-only_options
Excluding directory completely for certain build types works for Makefiles only, but not for Visual Studio and not for Xcode.
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
CMakeLists.txt:
1. add -DSAFEMALLOC -DSAFE_MUTEX in the top-level CMakeLists.txt
don't force plugins to copy-paste these lines in their CMakeLists.txt
2.1 search plugin/* for plugins (not only storage/*),
2.2 recognize MYSQL_PLUGIN (not only MYSQL_STORAGE_ENGINE),
2.3 extract library names from the plug.in (don't force library names to
be ha_<engine>.dll and <engine>.lib)
include/mysql/plugin.h:
define MYSQL_PLUGIN_EXPORT appropriately
(backport from 5.5)
libmysqld/CMakeLists.txt:
remove unnecessary workaround
plugin/fulltext/CMakeLists.txt:
build fulltext example plugin on windows
storage/maria/CMakeLists.txt:
The library is called libmaria_s.lib, not maria.lib
storage/maria/unittest/CMakeLists.txt:
The library is called libmaria_s.lib, not maria.lib
storage/myisam/CMakeLists.txt:
The library is called libmyisam_s.lib, not myisam.lib
storage/mysql_storage_engine.cmake:
introduce MYSQL_PLUGIN macro.
don't force library names to be ha_<engine>.dll and <engine>.lib
storage/xtradb/CMakeLists.txt:
remove a condition from include
win/README:
don't use deprecated syntax
win/configure-mariadb.sh:
don't use deprecated syntax
win/configure.js:
1. support MYSQL_PLUGIN in addition to MYSQL_STORAGE_ENGINE.
2. support plugin/* in addition to storage/*
Define USE_MARIA_FOR_TMP_TABLES preprocessor constant by default if Aria engine is compiled in.
Use CMake variable WITH_ARIA_TMP_TABLES to control the temp table engine setting.
Windows native async io is disabled.
The patch uses completion ports for asynchronous IO notification ,
instead of formerly used notification via event . This also removes
the limit of 64 async IOs per background IO thread (this limit was
forced by using WaitForMultipleObjects in previous AIO implementation)
- add version info for the client library, dynamic plugins and some utilities
- do not recompile client library sources 3 times (for mysqlclient , mysqlclient_notls and libmysql)
One time is sufficient, so get rid of mysqlclient_notls, and link static client library to the shared.
- remove incremental linking flag
This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
on Linux machines. It modifies the CMakeLists.txt setting this option
to 'OFF' by default.
Note: The option requires a debug build. For example,
-DCMAKE_BUILD_TYPE:string="Debug"
This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
on Linux machines. It modifies the CMakeLists.txt setting this option
to 'OFF' by default.
Note: The option requires a debug build. For example,
-DCMAKE_BUILD_TYPE:string="Debug"
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
CMakeLists.txt:
For the new files describing the source and the build
("INFO_SRC" and "INFO_BIN"), we need a new file
"cmake/info_macros.cmake.in" with the build rules.
1) This file must be configured with the current variables.
2) "INFO_SRC" can be created during the cmake phase,
but this should be repeated with each "make" to
protect against a developer doing only "make" after
a "bzr pull" (or "bzr commit").
So have it both as a cmake rule and as a custom target.
3) "INFO_BIN" must be created during the make phase
only, because it contains information from files
which will be written at the end of the cmake phase only.
Therefore, it must be a custom target which is included
in all "make" targets.
4) The resulting "INFO_*" files must be included in packages.
cmake/info_bin.cmake:
This is the file to create "INFO_BIN",
by calling the "CREATE_INFO_BIN()" macro.
It must be a separate file, so that the macro
definitions can be included in other cmake scripts
without that file inclusion causing a side effect,
the macro call.
That call would modify the source tree which should
be trated read-only.
cmake/info_macros.cmake.in:
This new file contains the macros to create the
"INFO_*" files during various steps of the build,
the calls will be at other places.
1) For source: If running from a BZR tree, always create
(update) "INFO_SRC" by running "bzr version-info".
Outside a BZR tree, try to take it from exported
sources, and create it only if missing, in that
case put the three level version number into it.
2) "INFO_BIN" contains
- date/time and host name of the build host,
- information about the platform,
- information about the C and CXX compiler
and the options given to them (Unix only),
- the feature flags as reported by "cmake -L".
cmake/info_src.cmake:
This is the file to create "INFO_SRC",
by calling the "CREATE_INFO_SRC()" macro.
It must be a separate file, so that the macro
definitions can be included in other cmake scripts
without that file inclusion causing a side effect,
the macro call.
That call would modify the source tree which should
be trated read-only.
cmake/make_dist.cmake.in:
Create a "VERSION_src" file during "make dist".
In case it already exists from a preceding "cmake" run
or tree export (which is quite likely), a new
"make dist" must not modify it.
mysql-test/r/file_contents.result:
Result of test for bug#42969.
mysql-test/t/file_contents.test:
Perl test scriptlet for bug#42969.
support-files/mysql.spec.sh:
Add "INFO_SRC" and "INFO_BIN" to the RPM contents.
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
option for specific compilers
Reorganize the maintainer mode cmake code to allow options
for specific compilers. For now, enable -Wcheck for ICC,
but do not turn warnings into errors.
CMakeLists.txt:
Move the code that sets options to cmake/maintainer.cmake
cmake/maintainer.cmake:
Add macros for each specific compiler.
option for specific compilers
Reorganize the maintainer mode cmake code to allow options
for specific compilers. For now, enable -Wcheck for ICC,
but do not turn warnings into errors.
Reason: inconsistent compilation, federatedx is compiled without SAFEMALLOC
flag, while anything else is compiled with SAFEMALLOC.
As a consequence, my_hash_init used inside federatedx initialization does not
provide correct caller info parameters (file, line) , so they are initialized with
whatever is on stack. When info about allocated memory is output in
COM_DEBUG command, the server crashes trying to output string starting at
0xcccccccccccccccc.
The fix is to remove SAFEMALLOC preprocessor flags
from every CMakeLists.txt, except the top-level one.
Also, SAFEMALLOC is not defined by default now, instead
there is WITH_DEBUG_FULL CMake option which adds
-DSAFEMALLOC to C and C++ flags in debug compilation.
This option is off by default, because
1) Debug C runtime already has heap debugging builtin with
overwrite and leak detection
2)safemalloc considerably slows down the tests.
Note also that
- SAFEMALLOC is gone in MySQL5.5
- On Windows, heap related overflows can also be found using free pageheap utility
(that is also part of application verifier). This is even more efficient if there are no other layers
on top of Windows heap allocator, e.g it is most efficient with release version.
- Remove all mentioning of /MAP /MAPINFO link options (does not work in VS2010).
Remove map files from packaging.
- Fix warning about ETIMEDOUT being redefined.
- Fix warning about FSP_EXTENT_SIZE in xtradb (32/64 bit right shift mismatch)
- Silence warnings coming from generated code (flex/bison) in xtradb/innodb_plugin.
- Be nice to people without cygwin (me) and add win/configure-mariadb.bat with options suitable for quick compilation, e.g no embedded