mariadb/cmake
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
..
build_configurations
os
abi_check.cmake
bison.cmake
bzip2.cmake
cat.cmake
character_sets.cmake
check_compiler_flag.cmake
check_minimal_version.cmake
cmake_parse_arguments.cmake
compile_flags.cmake
configurable_file_content.in
configure.pl
cpack_deb.cmake
cpack_rpm.cmake
cpack_source_ignore_files.cmake
CPackRPM.cmake
cpu_info.cmake
create_initial_db.cmake.in
ctest.cmake
do_abi_check.cmake
dtrace.cmake
dtrace_prelink.cmake
for_clients.cmake
info_bin.cmake
info_macros.cmake.in
info_src.cmake
install_layout.cmake
install_macros.cmake
jemalloc.cmake
libutils.cmake
lz4.cmake
lzma.cmake
lzo.cmake
maintainer.cmake
make_dist.cmake.in
merge_archives_unix.cmake.in
mysql_add_executable.cmake
mysql_version.cmake
package_name.cmake
pcre.cmake
plugin.cmake
readline.cmake
snappy.cmake
ssl.cmake
stack_direction.c
systemd.cmake
tags.cmake
versioninfo.rc.in
wsrep.cmake
zlib.cmake