Commit graph

301 commits

Author SHA1 Message Date
Marko Mäkelä
cc3b5d1fe7 Merge bb-10.2-ext into 10.3 2018-02-15 11:48:30 +02:00
Marko Mäkelä
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
Marko Mäkelä
27ea2963fc Dead code removal: sess_t
The session object is not really needed for anything.
We can directly create and free the dummy purge_sys->query->trx.
2018-02-15 10:01:05 +02:00
Marko Mäkelä
5fe9b4a7ae MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections
Also, allow the MariaDB 10.2 server to link InnoDB dynamically
against ha_innodb.so (which is what mysql-test-run.pl expects
to exist, instead of the default name ha_innobase.so).

wsrep_load_data_split(): Instead of referring to innodb_hton_ptr,
check the handlerton::db_type. This was recently broken by me in
MDEV-11415.

innodb_lock_schedule_algorithm: Define as a weak global symbol,
so that WITH_WSREP will not depend on InnoDB being linked statically.
I tested this manually. Notably, running a test that only does
	SET GLOBAL wsrep_on=1;
with a static or dynamic InnoDB and
	./mtr --mysqld=--loose-innodb-lock-schedule-algorithm=fcfs
will crash with SIGSEGV at shutdown. With the default VATS
combination the wsrep_on is properly refused for both the
static and dynamic InnoDB.

ha_close_connection(): Do invoke the method also for plugins
for which UNINSTALL PLUGIN was deferred due to open connections.
Thanks to @svoj for pointing this out.

thd_to_trx(): Return a pointer, not a reference to a pointer.

check_trx_exists(): Invoke thd_set_ha_data() for assigning a transaction.

log_write_checkpoint_info(): Remove an unused DEBUG_SYNC point
that would cause an assertion failure on shutdown after deferred
UNINSTALL PLUGIN.

This was tested as follows:

cmake -DWITH_WSREP=1 -DPLUGIN_INNOBASE:STRING=DYNAMIC \
-DWITH_MARIABACKUP:BOOL=OFF ...
make
cd mysql-test
./mtr innodb.innodb_uninstall
2018-02-15 09:59:03 +02:00
Sergei Golubchik
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
Vladislav Vaintroub
6c279ad6a7 MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.

This fix excludes rocksdb, spider,spider, sphinx and connect for now.
2018-02-06 12:55:58 +00:00
Sergei Golubchik
d4df7bc9b1 Merge branch 'github/10.0' into 10.1 2018-02-02 10:09:44 +01:00
Vicențiu Ciorbaru
3699a4b5c0 Merge branch 'merge-innodb-5.6' into 10.0 2018-01-24 18:23:25 +02:00
Vicențiu Ciorbaru
3dfe148074 5.6.39 2018-01-23 17:43:37 +02:00
wlad
b6d72ed44d MDEV-14283 : Fix Solaris 10 build.
- introduce system check for posix_memalign (not available on Solaris 10)
- Disable dtrace probes, to fix weird link errors in mariabackup
2017-11-21 21:14:06 +01:00
Aleksey Midenkov
33085349e9 IB, SQL: removed VTQ, added TRT on SQL layer [closes #305] 2017-11-15 00:22:10 +03:00
Aleksey Midenkov
d8d7251019 System Versioning pre0.12
Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
2017-11-07 00:37:49 +03:00
Marko Mäkelä
2c1067166d Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00
Vladislav Vaintroub
7354dc6773 MDEV-13384 - misc Windows warnings fixed 2017-09-28 17:20:46 +00:00
Jan Lindström
016c35a7f2 MDEV-13690: Remove unnecessary innodb_use_mtflush, innodb_mtflush_threads parameters and related code
Users can use innodb-page-cleaners instead.
2017-09-01 18:33:46 +03:00
Vladislav Vaintroub
49f3fb8feb small refactoring o innobase/CMakeLists.txt
allow to build with -DPLUGIN_INNOBASE=NO
2017-08-30 14:43:58 +00:00
Sergei Golubchik
58b56f14a0 cleanup: remove ha_innopart.cc
we'll copy it from 5.7 when we'll need it
2017-08-16 18:14:26 +02:00
Sergei Golubchik
48fe832650 Merge branch '10.0' into 10.1 2017-08-15 09:50:31 +02:00
Sergei Golubchik
7581fb23e2 compilation fix for SLES 11 SP4
also fix innodb
2017-08-14 18:37:53 +02:00
Marko Mäkelä
8c71c6aa8b MDEV-12548 Initial implementation of Mariabackup for MariaDB 10.2
InnoDB I/O and buffer pool interfaces and the redo log format
have been changed between MariaDB 10.1 and 10.2, and the backup
code has to be adjusted accordingly.

The code has been simplified, and many memory leaks have been fixed.
Instead of the file name xtrabackup_logfile, the file name ib_logfile0
is being used for the copy of the redo log. Unnecessary InnoDB startup and
shutdown and some unnecessary threads have been removed.

Some help was provided by Vladislav Vaintroub.

Parameters have been cleaned up and aligned with those of MariaDB 10.2.

The --dbug option has been added, so that in debug builds,
--dbug=d,ib_log can be specified to enable diagnostic messages
for processing redo log entries.

By default, innodb_doublewrite=OFF, so that --prepare works faster.
If more crash-safety for --prepare is needed, double buffering
can be enabled.

The parameter innodb_log_checksums=OFF can be used to ignore redo log
checksums in --backup.

Some messages have been cleaned up.
Unless --export is specified, Mariabackup will not deal with undo log.
The InnoDB mini-transaction redo log is not only about user-level
transactions; it is actually about mini-transactions. To avoid confusion,
call it the redo log, not transaction log.

We disable any undo log processing in --prepare.

Because MariaDB 10.2 supports indexed virtual columns, the
undo log processing would need to be able to evaluate virtual column
expressions. To reduce the amount of code dependencies, we will not
process any undo log in prepare.

This means that the --export option must be disabled for now.

This also means that the following options are redundant
and have been removed:
	xtrabackup --apply-log-only
	innobackupex --redo-only

In addition to disabling any undo log processing, we will disable any
further changes to data pages during --prepare, including the change
buffer merge. This means that restoring incremental backups should
reliably work even when change buffering is being used on the server.
Because of this, preparing a backup will not generate any further
redo log, and the redo log file can be safely deleted. (If the
--export option is enabled in the future, it must generate redo log
when processing undo logs and buffered changes.)

In --prepare, we cannot easily know if a partial backup was used,
especially when restoring a series of incremental backups. So, we
simply warn about any missing files, and ignore the redo log for them.

FIXME: Enable the --export option.

FIXME: Improve the handling of the MLOG_INDEX_LOAD record, and write
a test that initiates a backup while an ALGORITHM=INPLACE operation
is creating indexes or rebuilding a table. An error should be detected
when preparing the backup.

FIXME: In --incremental --prepare, xtrabackup_apply_delta() should
ensure that if FSP_SIZE is modified, the file size will be adjusted
accordingly.
2017-07-05 11:43:28 +03:00
Marko Mäkelä
14c6f00a9f Merge 10.1 into 10.2
Also, include fixes by Vladislav Vaintroub to the
aws_key_management plugin. The AWS C++ SDK specifically depends on
OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
2017-05-06 14:36:46 +03:00
Aleksey Midenkov
afe64a450e IB: moved VTQ funcs to separate file 2017-05-05 20:36:29 +03:00
Aleksey Midenkov
fc7da4dd4f IB, SQL: InnoDB partitioning [closes #118]
* native InnoDB partitioning for BY SYSTEM_TIME partitions.
2017-05-05 20:36:28 +03:00
Sergei Golubchik
6935d66053 MDEV-12591 MariaDB embedded server refuses start with innodb_plugin
innodb calls sd_notify(), it must be linked with libsystemd
2017-04-27 19:12:45 +02:00
Sergei Golubchik
3a3b3d8ba8 cleanup: innodb files in cmake/
moved to storage/innobase/

also removed duplicate checks from storage/innobase/CMakeLists.txt
(they're all in storage/innobase/innodb.cmake)
2017-03-29 00:40:22 +02:00
Marko Mäkelä
4e1116b2c6 MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL
Also, remove empty .ic files that were not removed by my MySQL commit.

Problem:
InnoDB used to support a compilation mode that allowed to choose
whether the function definitions in .ic files are to be inlined or not.
This stopped making sense when InnoDB moved to C++ in MySQL 5.6
(and ha_innodb.cc started to #include .ic files), and more so in
MySQL 5.7 when inline methods and functions were introduced
in .h files.

Solution:
Remove all references to UNIV_NONINL and UNIV_MUST_NOT_INLINE from
all files, assuming that the symbols are never defined.
Remove the files fut0fut.cc and ut0byte.cc which only mattered when
UNIV_NONINL was defined.
2017-03-17 12:42:07 +02:00
Marko Mäkelä
a45866c6db MDEV-12050 Remove unused InnoDB Memcached hooks
Oracle introduced a Memcached plugin interface to the InnoDB
storage engine in MySQL 5.6. That interface is essentially a
fork of Memcached development snapshot 1.6.0-beta1 of an old
development branch 'engine-pu'.

To my knowledge, there have not been any updates to the Memcached code
between MySQL 5.6 and 5.7; only bug fixes and extensions related to
the Oracle modifications.

The Memcached plugin is not part of the MariaDB Server. Therefore it
does not make sense to include the InnoDB interfaces for the Memcached
plugin, or to have any related configuration parameters:

    innodb_api_bk_commit_interval
    innodb_api_disable_rowlock
    innodb_api_enable_binlog
    innodb_api_enable_mdl
    innodb_api_trx_level

Removing this code in one commit makes it possible to easily restore
it, in case it turns out to be needed later.
2017-02-13 11:24:02 +02:00
Daniel Black
58ac8dd255 MDEV-11195: Simplify enablement of NUMA in innodb/xtradb
Move common parts of {innodb,xtradb}/CmakeLists.txt to the macro.
2016-11-02 14:37:43 +11: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
f05dfbebcc Merge 10.2
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-09-23 09:24:22 +10: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
Sergei Golubchik
f9bdc7c01a Merge branch '10.2' into bb-10.2-jan 2016-09-19 09:47:08 +02:00
Jan Lindström
fec844aca8 Merge InnoDB 5.7 from mysql-5.7.14.
Contains also:
       MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan)
       Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       enable tests that were fixed in MDEV-10549

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
2016-09-08 15:49:03 +03:00
Jan Lindström
2e814d4702 Merge InnoDB 5.7 from mysql-5.7.9.
Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
2016-09-02 13:22:28 +03: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
Alexander Barkov
2ba7ed77aa Merge remote-tracking branch 'origin/10.1' into 10.2 2015-12-29 19:37:11 +04:00
Daniel Black
e4e2d9dd3c Do not build optimised power crc32 on bigendian 2015-12-18 17:15:06 +11:00
Daniel Axtens
2538c7cf89 Use POWER8 accelerated crc32
- Make accelerated checksum available to InnoDB and XtraDB.
 - Fall back to slice-by-eight if not available. The mode used is printed on startup.
 - Will only build on POWER systems at the moment until CMakeLists are modified
   to only add the crc32_power8/ files when building on POWER.

running MySQL-5.7 unittest/gunit/innodb/ut0crc32-t

Before:

1..2
Using software crc32 implementation, CPU is little-endian
ok 1
Using software crc32 implementation, CPU is little-endian
    normal CRC32: real    0.148006 sec
    normal CRC32: user    0.148000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.144293 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

After:

1..2
Using POWER8 crc32 implementation, CPU is little-endian
ok 1
Using POWER8 crc32 implementation, CPU is little-endian
    normal CRC32: real    0.008097 sec
    normal CRC32: user    0.008000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.147043 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

Author CRC32 ASM code: Anton Blanchard <anton@au.ibm.com>
ref: https://github.com/antonblanchard/crc32-vpmsum

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2015-12-15 15:11:17 +11: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
Sergei Golubchik
84da1547e6 MDEV-8883 more cross-compiling fixes
use CHECK_C_SOURCE_COMPILES for atomic tests if cross-compiling
(continue to use CHECK_C_SOURCE_RUNS otherwise)
2015-10-24 19:58:34 +02:00
Sergei Golubchik
dfb74dea30 Merge branch '10.0' into 10.1 2015-10-12 00:37:58 +02:00
Sergei Golubchik
04af573d65 Merge branch 'merge-innodb-5.6' into 10.0 2015-10-09 17:47:30 +02:00
Sergei Golubchik
86ff4da14d 5.6.27 2015-10-09 17:21:46 +02:00
Sergei Golubchik
82e9f6d948 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
Shaohua Wang
f59d68eeae BUG#21102971 data corruption on arm64
The root cause is that x86 has a stronger memory model than the ARM
processors. And the GCC builtins didn't issue the correct fences when
setting/unsetting the lock word. In particular during the mutex release.

The solution is rewriting atomic TAS operations: replace '__sync_' by
'__atomic_' if possible.

Reviewed-by: Sunny Bains      <sunny.bains@oracle.com>
Reviewed-by: Bin Su           <bin.x.su@oracle.com>
Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>
Reviewed-by: Krunal Bauskar   <krunal.bauskar@oracle.com>
RB: 9782
RB: 9665
RB: 9783
2015-08-10 16:31:05 +08:00
Sergei Golubchik
ac286a9bc7 Merge branch '5.5' into 10.0 2015-05-08 11:20:43 +02:00
Jan Lindström
3832bda1ba Fix compiler error if compiler does not support c99 style
initializers.
2015-05-07 18:30:42 +03:00
Jan Lindström
8350ea0514 Fix compiler error if compiler does not support c99 style
initializers.
2015-05-07 13:04:03 +03:00
Sergei Golubchik
6d06fbbd1d move to storage/innobase 2015-05-04 19:17:21 +02:00
Sergei Golubchik
6a7ee5a5a5 encryption cleanup: small changes
* comments
* move my_bytes_to_key() and my_aes_hex2uint() into file_key_management_plugin
* rename HA_INSERT_ORDER -> HA_PRESERVE_INSERT_ORDER
* remove unused variables and declarations
* fix casts
* don't link innodb with pcre
* remove redundant entries from aria's TARGET_LINK_LIBRARIES
2015-04-05 13:14:37 +02:00
Jan Lindström
9152b83973 Merged from 10.0-FusionIO:
Added support for compression method snappy for page compression.
2015-02-19 17:42:18 +02:00
Sergei Golubchik
985ef1d42a Don't link plugins with libmysys.a or libmysys_ssl.a
we don't want mysys static data structures to be overwritten
when a dynamic plugin is loaded.
2015-02-15 22:14:33 +01:00
Monty
d7d589dc01 Push for testing of encryption 2015-02-10 10:21:17 +01:00
Sergei Golubchik
a978bdda1e mysql-5.5.41 merge 2014-12-19 11:35:44 +01:00
Sergei Golubchik
f62c12b405 Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
Jon Olav Hauglid
57eec7bc29 Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG
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
2014-10-13 09:52:28 +02:00
Jon Olav Hauglid
8b64f82505 Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG
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
2014-10-13 09:52:28 +02:00
Sergei Golubchik
c6b95222c3 use MD5 service in innodb/xtradb 2014-10-01 23:38:28 +02:00
Sergei Golubchik
75796d9ecb InnoDB 5.6.20 2014-09-11 16:42:54 +02:00
Jan Lindström
ab150128ce MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3880.

    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.
2014-08-27 13:15:37 +03:00
Jan Lindström
df4dd593f2 MDEV-6247: Merge 10.0-galera to 10.1.
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.
2014-08-26 15:43:46 +03:00
Michael Widenius
5569132ffe MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.

- Added memory syncronization for innodb & xtradb for power8.
- Added HAVE_WINDOWS_MM_FENCE to CMakeList.txt
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_monitor_thread to ensur
  if log mutex is locked.

All changes done both for InnoDB and Xtradb
2014-08-19 19:28:35 +03:00
Jan Lindström
6dad23f04a MDEV-5834: Merge Kakao Defragmentation implementation to MariaDB 10.1
Merge https://github.com/kakao/mariadb-10.0 that contains Facebook's
    implementation for defragmentation

    facebook/mysql-5.6@a2d3a74
    facebook/mysql-5.6@def96c8
    facebook/mysql-5.6@9c67c5d
    facebook/mysql-5.6@921a81b
    facebook/mysql-5.6@aa519bd
    facebook/mysql-5.6@fea7d13
    facebook/mysql-5.6@09b29d3
    facebook/mysql-5.6@9284abb
    facebook/mysql-5.6@dbd623d
    facebook/mysql-5.6@aed55dc
    facebook/mysql-5.6@aad5c82

    This version does not add new SQL-syntax and new handler API function.
    Instead optimize table is mapped to defragment table if
    innodb_defragment=ON, by default the feature is off.

    Contains changes authored by Sunguck Lee (Kakao).
2014-08-06 15:28:58 +03:00
Jan Lindström
dbc79ce055 MDEV-6354: Implement a way to read MySQL 5.7.4-labs-tplc page
compression format (Fusion-IO).

Addeed LZMA and BZIP2 compression methods.
2014-07-22 06:56:50 +03:00
Michael Widenius
bd2117d154 Automatic merge from 5.5
Fixed 2 failing tests by replacing result files
2014-08-19 21:35:14 +03:00
Jan Lindström
d12dbe77e2 MDEV-6246: Merge 10.0.10-FusionIO to 10.1. 2014-05-22 14:24:00 +03:00
Sergei Golubchik
dc23a9501a Solaris compilation failure: xtradb is linked in statically, ha_innodb.so needs
the linker script.
2014-05-01 14:05:52 +02:00
Jan Lindström
13c73c31c3 Added support for LZO compression method.
Removed: innodb_use_lz4 configuration parameter

Added: innodb_compression_algorithm configuration parameter
0 = no compression, 1 = ZLIB, 2 = LZ4, 3 = LZO

Fixed issue with incorrect trim calculations
2014-04-15 14:28:25 +03:00
Jan Lindström
e7df30b8dd Merge lp:maria/10.0 up to revision 4040 = MariaDB 10.0.9 RC 2014-03-11 07:57:54 +02:00
Sergei Golubchik
68916bcab3 workaround for xtradb on gcc 4.1.2 RHEL5/x86, gcc atomic ops only work under -march=i686 2014-03-07 17:47:47 +01:00
Sergei Golubchik
a5fdd75980 XtraDB made the default 2014-03-07 15:21:07 +01:00
Jan Lindström
96100d6652 Merge: lp:maria/10.0 latest. 2014-03-03 14:27:56 +02:00
Jan Lindström
fa9f5f63e9 Removed unnecessary files and set lz4 under HAVE_LZ4 compiler
option using cmake find_library. Fixed bunch of compiler
warnings.
2014-02-11 20:05:09 +02:00
Jan Lindström
7f3950a2ae Moved mt-flush code to buf0mtflu.[cc|h] and cleaned it up. This is for
InnoDB.
2014-02-06 17:25:26 +02:00
Sergei Golubchik
342b098cfb ha_xtradb.so fix for solaris, gcc 3.4.3 2014-02-04 19:29:58 +01:00
Jan Lindström
8c5d5bc5de Fixed merge error on InnoDB page compression level handling.
Merged page compression feature to XtraDB storage engine.

Added feature where page compression can use lz4 compression
method (innodb_use_lz4, default OFF).
2014-02-03 10:08:15 +02:00
Jan Lindström
5e55d1ced5 Changes for Fusion-io multi-threaded flush, page compressed tables and
tables using atomic write/table.

This is work in progress and some parts are at most POC quality.
2013-12-19 14:36:38 +02:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Michael Widenius
1d0f70c2f8 Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6 2012-08-01 17:27:34 +03:00
Vladislav Vaintroub
2451628923 Fixed some simple warnings on Windows. 2012-04-13 19:44:22 +02:00
Vladislav Vaintroub
24e7faa54f Various fixes for Solaris compiler.
Also, restrict symbol visibility in statically
built plugins, to minimize the chance for symbol 
name clashes with dynamic plugins.
2012-02-03 11:46:40 +01:00
Vladislav Vaintroub
d8751d283c MDEV-100 : innodb_plugin tests fail on Solaris.
The reason for the failure is that the loaded library has the same exported symbols
as the builtin one. So the plugin uses innodb functions e.g srv_boot from mysqld
rather than plugin's own. This causes the crash.

On Unix systems with gcc4 later this error was so far worked around using GCC's
visibility attribute. However, in our case, we're using gcc3.

See related MySQL bug http://bugs.mysql.com/bug.php?id=48524 and
http://bugs.mysql.com/bug.php?id=52263

The fix is to restrict symbol visibility in the plugin using version script 
(called map file on Solaris).
2012-02-02 21:12:49 +01:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Marko Mäkelä
85dbe88d2f Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 4 of 4]
ibuf_inside(), ibuf_enter(), ibuf_exit(): Add the parameter mtr. The
flag is no longer kept in the thread-local storage but in the
mini-transaction (mtr->inside_ibuf).

mtr_start(): Clean up the comment and remove the unused return value.
mtr_commit(): Assert !ibuf_inside(mtr) in debug builds.

ibuf_mtr_start(): Like mtr_start(), but sets the flag.
ibuf_mtr_commit(), ibuf_btr_pcur_commit_specify_mtr(): Wrappers that
assert ibuf_inside().

buf_page_get_zip(), buf_page_init_for_read(),
buf_read_ibuf_merge_pages(), fil_io(), ibuf_free_excess_pages(),
ibuf_contract_ext(): Remove assertions on ibuf_inside(), because a
mini-transaction is not available.

buf_read_ahead_linear(): Add the parameter inside_ibuf.

ibuf_restore_pos(): When this function returns FALSE, it commits mtr
and must therefore do ibuf_exit(mtr).

ibuf_delete_rec(): This function commits mtr and must therefore do
ibuf_exit(mtr).

ibuf_rec_get_page_no(), ibuf_rec_get_space(), ibuf_rec_get_info(),
ibuf_rec_get_op_type(), ibuf_build_entry_from_ibuf_rec(),
ibuf_rec_get_volume(), ibuf_get_merge_page_nos(),
ibuf_get_volume_buffered_count(), ibuf_get_entry_counter_low(): Add
the parameter mtr in debug builds, for asserting ibuf_inside(mtr).

rb:585 approved by Sunny Bains
2011-03-24 14:00:14 +02:00
Marko Mäkelä
538e7d1655 Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 4 of 4]
ibuf_inside(), ibuf_enter(), ibuf_exit(): Add the parameter mtr. The
flag is no longer kept in the thread-local storage but in the
mini-transaction (mtr->inside_ibuf).

mtr_start(): Clean up the comment and remove the unused return value.
mtr_commit(): Assert !ibuf_inside(mtr) in debug builds.

ibuf_mtr_start(): Like mtr_start(), but sets the flag.
ibuf_mtr_commit(), ibuf_btr_pcur_commit_specify_mtr(): Wrappers that
assert ibuf_inside().

buf_page_get_zip(), buf_page_init_for_read(),
buf_read_ibuf_merge_pages(), fil_io(), ibuf_free_excess_pages(),
ibuf_contract_ext(): Remove assertions on ibuf_inside(), because a
mini-transaction is not available.

buf_read_ahead_linear(): Add the parameter inside_ibuf.

ibuf_restore_pos(): When this function returns FALSE, it commits mtr
and must therefore do ibuf_exit(mtr).

ibuf_delete_rec(): This function commits mtr and must therefore do
ibuf_exit(mtr).

ibuf_rec_get_page_no(), ibuf_rec_get_space(), ibuf_rec_get_info(),
ibuf_rec_get_op_type(), ibuf_build_entry_from_ibuf_rec(),
ibuf_rec_get_volume(), ibuf_get_merge_page_nos(),
ibuf_get_volume_buffered_count(), ibuf_get_entry_counter_low(): Add
the parameter mtr in debug builds, for asserting ibuf_inside(mtr).

rb:585 approved by Sunny Bains
2011-03-24 14:00:14 +02:00
Sunny Bains
b3c9cc6f21 Bug #11766227: InnoDB purge lag much worse for 5.5.8 versus 5.1
Bug #11766501: Multiple RBS break the get rseg with mininum trx_t::no code during purge
      
Bug# 59291 changes:
      
Main problem is that truncating the UNDO log at the completion of every
trx_purge() call is expensive as the number of rollback segments is increased.
We truncate after a configurable amount of pages. The innodb_purge_batch_size
parameter is used to control when InnoDB does the actual truncate. The truncate
is done once after 128 (or TRX_SYS_N_RSEGS iterations). In other words we
truncate after purge 128 * innodb_purge_batch_size. The smaller the batch
size the quicker we truncate.
      
Introduce a new parameter that allows how many rollback segments to use for
storing REDO information. This is really step 1 in allowing complete control
to the user over rollback space management.
      
New parameters:
    i) innodb_rollback_segments = number of rollback_segments to use
       (default is now 128) dynamic parameter, can be changed anytime.
       Currently there is little benefit in changing it from the default.
      
Optimisations in the patch.
      
    i. Change the O(n) behaviour of trx_rseg_get_on_id() to O(log n)
       Backported from 5.6. Refactor some of the binary heap code.
       Create a new include/ut0bh.ic file.
      
    ii. Avoid truncating the rollback segments after every purge.
      
Related changes that were moved to a separate patch:
      
    i. Purge should not do any flushing, only wait for space to be free so that
       it only does purging of records unless it is held up by a long running
       transaction that is preventing it from progressing.
      
   ii. Give the purge thread preference over transactions when acquiring the
       rseg->mutex during commit. This to avoid purge blocking unnecessarily
       when getting the next rollback segment to purge.
      
Bug #11766501 changes:
      
Add the rseg to the min binary heap under the cover of the kernel mutex and
the binary heap mutex. This ensures the ordering of the min binary heap.
      
The two changes have to be committed together because they share the same
that fixes both issues.
      
rb://567 Approved by: Inaam Rana.
2011-02-22 16:04:08 +11:00
Sunny Bains
9d6d1902e0 Bug #11766227: InnoDB purge lag much worse for 5.5.8 versus 5.1
Bug #11766501: Multiple RBS break the get rseg with mininum trx_t::no code during purge
      
Bug# 59291 changes:
      
Main problem is that truncating the UNDO log at the completion of every
trx_purge() call is expensive as the number of rollback segments is increased.
We truncate after a configurable amount of pages. The innodb_purge_batch_size
parameter is used to control when InnoDB does the actual truncate. The truncate
is done once after 128 (or TRX_SYS_N_RSEGS iterations). In other words we
truncate after purge 128 * innodb_purge_batch_size. The smaller the batch
size the quicker we truncate.
      
Introduce a new parameter that allows how many rollback segments to use for
storing REDO information. This is really step 1 in allowing complete control
to the user over rollback space management.
      
New parameters:
    i) innodb_rollback_segments = number of rollback_segments to use
       (default is now 128) dynamic parameter, can be changed anytime.
       Currently there is little benefit in changing it from the default.
      
Optimisations in the patch.
      
    i. Change the O(n) behaviour of trx_rseg_get_on_id() to O(log n)
       Backported from 5.6. Refactor some of the binary heap code.
       Create a new include/ut0bh.ic file.
      
    ii. Avoid truncating the rollback segments after every purge.
      
Related changes that were moved to a separate patch:
      
    i. Purge should not do any flushing, only wait for space to be free so that
       it only does purging of records unless it is held up by a long running
       transaction that is preventing it from progressing.
      
   ii. Give the purge thread preference over transactions when acquiring the
       rseg->mutex during commit. This to avoid purge blocking unnecessarily
       when getting the next rollback segment to purge.
      
Bug #11766501 changes:
      
Add the rseg to the min binary heap under the cover of the kernel mutex and
the binary heap mutex. This ensures the ordering of the min binary heap.
      
The two changes have to be committed together because they share the same
that fixes both issues.
      
rb://567 Approved by: Inaam Rana.
2011-02-22 16:04:08 +11: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
Vasil Dimov
d331e48556 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
Vasil Dimov
715cf98005 Fix pointers to documentation
Do not print pointer to the 5.1 documentation from within MySQL 5.5.

Instead of hardcoding the MySQL version, use the MAJOR_VERSION and
MINOR_VERSION CMake variables defined at top-level.
2010-11-29 14:50:26 +02:00
Vasil Dimov
24d1b3ef88 Fix pointers to documentation
Do not print pointer to the 5.1 documentation from within MySQL 5.5.

Instead of hardcoding the MySQL version, use the MAJOR_VERSION and
MINOR_VERSION CMake variables defined at top-level.
2010-11-29 14:50:26 +02:00
Vasil Dimov
e2e20a04df Fix the PAUSE instruction handling in InnoDB
Previously HAVE_IB_PAUSE_INSTRUCTION was never defined and thus InnoDB
never used the PAUSE instruction on non-windows even if it was available.
Probably the check was never migrated from autotools'
storage/innobase/plug.in to storage/innobase/CMakeLists.txt.

Since the check for PAUSE is done at top-level configure.cmake we can
use the result from there (HAVE_PAUSE_INSTRUCTION) instead of rolling
InnoDB's own HAVE_IB_PAUSE_INSTRUCTION (the check is identical anyway).
2010-11-26 10:54:12 +02:00
Vasil Dimov
e8cdc991cd Fix the PAUSE instruction handling in InnoDB
Previously HAVE_IB_PAUSE_INSTRUCTION was never defined and thus InnoDB
never used the PAUSE instruction on non-windows even if it was available.
Probably the check was never migrated from autotools'
storage/innobase/plug.in to storage/innobase/CMakeLists.txt.

Since the check for PAUSE is done at top-level configure.cmake we can
use the result from there (HAVE_PAUSE_INSTRUCTION) instead of rolling
InnoDB's own HAVE_IB_PAUSE_INSTRUCTION (the check is identical anyway).
2010-11-26 10:54:12 +02:00
Vasil Dimov
654f0e9603 Fix Bug#58279 Incorrect enabling of UNIV_DEBUG in debug builds
Checking "IF(WITH_DEBUG)" does not work for multi-configuration CMake
generators like VS or XCode. See
http://forge.mysql.com/wiki/CMake#Debug-only_options
2010-11-19 15:45:18 +02:00
Vasil Dimov
fe136f1599 Fix Bug#58279 Incorrect enabling of UNIV_DEBUG in debug builds
Checking "IF(WITH_DEBUG)" does not work for multi-configuration CMake
generators like VS or XCode. See
http://forge.mysql.com/wiki/CMake#Debug-only_options
2010-11-19 15:45:18 +02:00
Marko Mäkelä
0fbc74a451 Bug #57730 Clean up references to InnoDB Plugin
CMakeLists.txt: Remove the checks for mysql_storage_engine.cmake
and MYSQL_VERSION_ID.

ha_innodb.cc, ha_innodb.h: Remove the checks for MYSQL_VERSION_ID.
2010-10-27 09:54:20 +03:00
Marko Mäkelä
548289eea0 Bug #57730 Clean up references to InnoDB Plugin
CMakeLists.txt: Remove the checks for mysql_storage_engine.cmake
and MYSQL_VERSION_ID.

ha_innodb.cc, ha_innodb.h: Remove the checks for MYSQL_VERSION_ID.
2010-10-27 09:54:20 +03:00
Marko Mäkelä
ed55f540ee Remove files that are no longer needed.
These files were needed when InnoDB Plugin was maintained and distributed
separately from the MySQL 5.1 source tree. They have never been needed in
MySQL 5.5.

storage/innobase/mysql-test:
 Patches to the test suite.

storage/innobase/handler/mysql_addons.cc:
 Wrappers for private MySQL functions.
2010-10-21 10:45:44 +03:00
Marko Mäkelä
731344d3d6 Remove files that are no longer needed.
These files were needed when InnoDB Plugin was maintained and distributed
separately from the MySQL 5.1 source tree. They have never been needed in
MySQL 5.5.

storage/innobase/mysql-test:
 Patches to the test suite.

storage/innobase/handler/mysql_addons.cc:
 Wrappers for private MySQL functions.
2010-10-21 10:45:44 +03:00
Vasil Dimov
a2634cf7c8 Merge mysql-5.1-innodb -> mysql-5.5-innodb
In the fix for Bug#53916 also apply equivalent changes to CMakeLists.txt
2010-10-20 10:41:51 +03:00
Vasil Dimov
ef2f1d583b Merge mysql-5.1-innodb -> mysql-5.5-innodb
In the fix for Bug#53916 also apply equivalent changes to CMakeLists.txt
2010-10-20 10:41:51 +03:00
Vasil Dimov
c9d8e8209a Enable UNIV_DEBUG when WITH_DEBUG is defined 2010-09-09 13:06:43 +03:00
Vasil Dimov
32253e4582 Enable UNIV_DEBUG when WITH_DEBUG is defined 2010-09-09 13:06:43 +03:00
Alexander Nozdrin
8b645bed97 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Alexander Nozdrin
13ec2a1625 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Davi Arnaut
76382d2746 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: remove --with-debug=full, it was only used for safemalloc.

BUILD/compile-pentium-mysqlfs-debug:
  Remove build script for a feature that is long gone.
2010-08-06 09:59:38 -03:00
Davi Arnaut
c562aece2e Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: remove --with-debug=full, it was only used for safemalloc.
2010-08-06 09:59:38 -03: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
Vasil Dimov
8152cd0ac8 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
Calvin Sun
0802e5da69 Improve InnoDB synchronization primitives on Windows
This patch was originally developed by Vladislav Vaintroub.
The main changes are:

 * Use TryEnterCriticalSection in os_fast_mutex_trylock().
 * Use lightweight condition variables on Vista or later Windows;
   but fall back to events on older Windows, such as XP.

This patch also fixes the following bugs:
  bug# 52102 InnoDB Plugin shows performance drop compared to InnoDB
             on Windows
  bug# 53204 os_fastmutex_trylock is implemented incorrectly on Windows

rb://363 approved by Inaam Rana
2010-07-20 15:42:31 -05:00
Calvin Sun
abacbed6f4 Improve InnoDB synchronization primitives on Windows
This patch was originally developed by Vladislav Vaintroub.
The main changes are:

 * Use TryEnterCriticalSection in os_fast_mutex_trylock().
 * Use lightweight condition variables on Vista or later Windows;
   but fall back to events on older Windows, such as XP.

This patch also fixes the following bugs:
  bug# 52102 InnoDB Plugin shows performance drop compared to InnoDB
             on Windows
  bug# 53204 os_fastmutex_trylock is implemented incorrectly on Windows

rb://363 approved by Inaam Rana
2010-07-20 15:42:31 -05:00
Davi Arnaut
47a4a88160 Add the cmake option MYSQL_MAINTAINER_MODE which is equivalent
to the autotools option mysql-maintainer-mode. This option is
intended to set a few flags that should be activated by anyone
doing MySQL development, regardless of the build type. Also, the
flags are only set by the very end of the platform checks as
to not disturb fragile checks.
2010-07-12 13:39:00 -03:00
Davi Arnaut
985017674f Add the cmake option MYSQL_MAINTAINER_MODE which is equivalent
to the autotools option mysql-maintainer-mode. This option is
intended to set a few flags that should be activated by anyone
doing MySQL development, regardless of the build type. Also, the
flags are only set by the very end of the platform checks as
to not disturb fragile checks.
2010-07-12 13:39:00 -03:00
Vasil Dimov
8847387ecd Disable UNIV_DEBUG when WITH_DEBUG is enabled
It causes lots of failures due to
Bug#54861 Additional connections not handled properly in mtr --embedded
should be re-enabled when that bug is resolved
2010-06-28 15:52:24 +03:00
Vasil Dimov
3d2c88ad56 Disable UNIV_DEBUG when WITH_DEBUG is enabled
It causes lots of failures due to
Bug#54861 Additional connections not handled properly in mtr --embedded
should be re-enabled when that bug is resolved
2010-06-28 15:52:24 +03:00
Vasil Dimov
1161ec0836 Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined
This will make PB2 test InnoDB with UNIV_DEBUG on its *_debug platforms

Discussed with:	Marko (on IRC)
2010-06-23 13:02:49 +03:00
Vasil Dimov
0a7d579992 Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined
This will make PB2 test InnoDB with UNIV_DEBUG on its *_debug platforms

Discussed with:	Marko (on IRC)
2010-06-23 13:02:49 +03:00
Magne Mahre
32b7e60e42 WL#5349 Change default storage engine to InnoDB
The default storage engine is changed from MyISAM to
InnoDB, in all builds except for the embedded server.

In addition, the following system variables are 
changed:

  * innodb_file_per_table is enabled
  * innodb_strict_mode is enabled
  * innodb_file_format_name_update is changed
    to 'Barracuda'

The test suite is changed so that tests that do not
explicitly include the have_innodb.inc are run with
--default-storage-engine=MyISAM.  This is to ease the
transition, so that most regression tests are run
with the same engine as before.

Some tests are disabled for the embedded server
regression test, as the output of certain statements
will be different that for the regular server
(i.e SELECT @@default_storage_engine).  This is to
ease transition.



mysql-test/mysql-test-run.pl:
  The regression test suite now adds a
  --default-storage-engine=MyISAM for all non-innodb 
  tests.  This behaviour can be controlled by the
  default-myisam switch in mysql-test-run
mysql-test/t/bootstrap-master.opt:
  The bootstrap test can only be run without InnoDB
  as it starts several mysqld instances on the same
  datadir. This is possible with MyISAM, but not
  with InnoDB.
storage/innobase/CMakeLists.txt:
  Build InnoDB per default
storage/innobase/handler/ha_innodb.cc:
  Change default values for system variables
  
    Enable file_per_table
    Enable strict_mode
    Upgrade default file format to Barracuda
2010-06-17 22:51:35 +02:00
Magne Mahre
3ac6a4b451 WL#5349 Change default storage engine to InnoDB
The default storage engine is changed from MyISAM to
InnoDB, in all builds except for the embedded server.

In addition, the following system variables are 
changed:

  * innodb_file_per_table is enabled
  * innodb_strict_mode is enabled
  * innodb_file_format_name_update is changed
    to 'Barracuda'

The test suite is changed so that tests that do not
explicitly include the have_innodb.inc are run with
--default-storage-engine=MyISAM.  This is to ease the
transition, so that most regression tests are run
with the same engine as before.

Some tests are disabled for the embedded server
regression test, as the output of certain statements
will be different that for the regular server
(i.e SELECT @@default_storage_engine).  This is to
ease transition.
2010-06-17 22:51:35 +02:00
Calvin Sun
36663cc052 Clean up CMake file by removing duplicate entry for Windows.
Suggested by Vlad.
2010-05-07 15:37:34 -05:00
Calvin Sun
59ecf3bb79 Clean up CMake file by removing duplicate entry for Windows.
Suggested by Vlad.
2010-05-07 15:37:34 -05:00
Vasil Dimov
f875041fad Merge from innodb-branches-innodb+ 2010-04-22 12:00:59 +03:00
Vasil Dimov
a747e2ae9a Merge from innodb-branches-innodb+ 2010-04-22 12:00:59 +03:00
Vasil Dimov
c877ff39bc Import branches/innodb+ from SVN on top of storage/innobase. 2010-04-12 18:20:41 +03:00
Vasil Dimov
5f9ba24f91 Import branches/innodb+ from SVN on top of storage/innobase. 2010-04-12 18:20:41 +03:00
Vasil Dimov
347055dde0 Import branches/5.1@r6912 from SVN on top of storage/innobase 2010-03-31 10:17:04 +03:00
Vasil Dimov
f21c571d5e Import branches/5.1@r6912 from SVN on top of storage/innobase 2010-03-31 10:17:04 +03:00
Vladislav Vaintroub
fa083b75c3 Fix cmake build on OSX/i386 (many innodb tests fail
in optimized build) 
Unlike in autotools build, innodb was compiled with 
-DUNIV_MUST_NOT_INLINE set.  this exposed what
seems to be a bug in gcc backend.

The fix is to remove extra definition.
2010-03-21 13:52:57 +01:00
Vladislav Vaintroub
ad2de79756 Fix cmake build on OSX/i386 (many innodb tests fail
in optimized build) 
Unlike in autotools build, innodb was compiled with 
-DUNIV_MUST_NOT_INLINE set.  this exposed what
seems to be a bug in gcc backend.

The fix is to remove extra definition.
2010-03-21 13:52:57 +01:00
Vladislav Vaintroub
402cab754a Fix typo (CMAKE_SIZEOF_VOIDP=>CMAKE_SIZEOF_VOID_P) 2010-03-08 00:31:06 +01:00
Vladislav Vaintroub
4c9f3504f8 Fix typo (CMAKE_SIZEOF_VOIDP=>CMAKE_SIZEOF_VOID_P) 2010-03-08 00:31:06 +01:00
Vladislav Vaintroub
0faa8ef87a Fix typo
HAVE_IBGCC_ATOMIC_BUILTINS=>HAVE_IB_GCC_ATOMIC_BUILTINS.
Due to the typo, detection of atomics was broken. 
It also lead to valgrind error during shutdown 
(access to freed memory),which is likely present 
in all builds where atomics are not used.
2010-02-24 02:06:08 +01:00
Vladislav Vaintroub
b6663c64ce Fix typo
HAVE_IBGCC_ATOMIC_BUILTINS=>HAVE_IB_GCC_ATOMIC_BUILTINS.
Due to the typo, detection of atomics was broken. 
It also lead to valgrind error during shutdown 
(access to freed memory),which is likely present 
in all builds where atomics are not used.
2010-02-24 02:06:08 +01:00
Vladislav Vaintroub
da91b8d73e Cleanup casing in MYSQL_ADD_PLUGIN, patch provided by Kent 2010-02-01 23:46:02 +01:00
Vladislav Vaintroub
9a1746a04c Cleanup casing in MYSQL_ADD_PLUGIN, patch provided by Kent 2010-02-01 23:46:02 +01:00
Vladislav Vaintroub
a71e4cf18e - another take on BUILD_CONFIG variable - use OPTION instead of SET for
boolean variables to ensure option is in cache. Also use documented CMAKE_USE_MAKE_RULES_OVERRIDE feature instead of INCLUDE.

- remove superfluous tests in innobase's CMakeLists.txt
2010-01-20 00:52:21 +01:00
Vladislav Vaintroub
df2d0359d8 - another take on BUILD_CONFIG variable - use OPTION instead of SET for
boolean variables to ensure option is in cache. Also use documented CMAKE_USE_MAKE_RULES_OVERRIDE feature instead of INCLUDE.

- remove superfluous tests in innobase's CMakeLists.txt
2010-01-20 00:52:21 +01:00
Vladislav Vaintroub
6d59902ccf Do not run GCC atomic builtins tests on MSVC 2010-01-18 23:43:03 +01:00
Vladislav Vaintroub
801af5f2fe Do not run GCC atomic builtins tests on MSVC 2010-01-18 23:43:03 +01:00
Vladislav Vaintroub
10a7c78ed4 just in case old linux is used, add _GNU_SOURCE preprocessor constant to be able to see pthread_rwlock_t 2010-01-18 21:38:30 +01:00
Vladislav Vaintroub
cf4732275e just in case old linux is used, add _GNU_SOURCE preprocessor constant to be able to see pthread_rwlock_t 2010-01-18 21:38:30 +01:00
Vladislav Vaintroub
e0b7046b4f storage/innobase/CMakeLists.txt:
Bring innobase's CMakeLists.txt  in sync with latest
  plug.in (fix preprocessor macro names and feature tests). Thanks to Vasil Dimov for spotting this.
2010-01-16 04:56:35 +01:00
Vladislav Vaintroub
8d665d799c 2010-01-16 04:56:35 +01:00
Vladislav Vaintroub
cedb6101db Cleanup, use MYSQL_INSTALL_TARGETS macro instead of INSTALL(TARGETS) combined with
INSTALL_DEBUG_SYMBOLS
2009-12-12 02:03:05 +01:00
Vladislav Vaintroub
c5d7bcf376 Cleanup, use MYSQL_INSTALL_TARGETS macro instead of INSTALL(TARGETS) combined with
INSTALL_DEBUG_SYMBOLS
2009-12-12 02:03:05 +01:00
Vladislav Vaintroub
d2139f3135 - Introduce MYSQL_ADD_PLUGIN that replaces MYSQL_STORAGE_ENGINE
- Fix semisync library prefix (remove lib on Unixes)
- restrict exported symbols from zlib and yassl (fvisibility=hidden)
2009-12-01 12:00:50 +01:00
Vladislav Vaintroub
5dfa313eb7 - Introduce MYSQL_ADD_PLUGIN that replaces MYSQL_STORAGE_ENGINE
- Fix semisync library prefix (remove lib on Unixes)
- restrict exported symbols from zlib and yassl (fvisibility=hidden)
2009-12-01 12:00:50 +01:00
Vladislav Vaintroub
bc76ad8f6b WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
  WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
  Add new file
BUILD/autorun.sh:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
CMakeLists.txt:
  WL#5161 : Rewrite top-level CMakeLists.txt. 
  Remove  Windows specifics
  - compiler flags handling moved to configure.cmake
  - storage engine/plugin stuff moved into cmake/plugin.cmake
  - copy docs
Makefile.am:
  Added new files
client/CMakeLists.txt:
  WL#5161 : Rewrite CMakeLists.txt to be platform-independent
  Handle packagng (add INSTALL commands)
cmake/Makefile.am:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
  Custom targets for abi_check (for cmake)
cmake/bison.cmake:
  - Check bison availability
  - Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
  Add helper script to concatenate files.
cmake/character_sets.cmake:
  Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
  Helper script to check the minimum required version of cmake
cmake/configure.pl:
  Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
  Add script helper to create initial database. 
  (on Windows, we pack initial db with the redistribution
  package)
cmake/do_abi_check.cmake:
  Perform abi check
cmake/dtrace.cmake:
  Handle dtrace in CMake Build.
  Check for dtrace availablility,
  run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
  Run dtrace -G on Solaris in pre-link step,
  link the object it creates together with library or
  executable
cmake/install_macros.cmake:
  Helper macros for packaging
  (install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
  "make dist" - 
  - pack autotools ./configure script with the source
  (renamed to configure.am)
  - pack bison output
cmake/merge_archives_unix.cmake.in:
  script to merge static libraries on Unix
cmake/misc.cmake:
  Build helper macros
  - MERGE_STATIC_LIBS 
  We use it when building client library and embedded
  (avoid recompilation)
  
  - Convert source file paths to absolute names.
  We use it in  to locate files of a different project,
  when the files need to be recompiled (e.g in embedded
  several storage engines are recompiled with 
  -DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
  Extract version info from configure.in
  Handle package names.
cmake/plugin.cmake:
  Rewrote storage/mysql_storage_engine.cmake to handle 
  other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
  Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
  Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
  Helper to check stack direction.
cmake/zlib.cmake:
  Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
  Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
  Add new file
cmd-line-utils/readline/CMakeLists.txt:
  Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
  Add new file
config.h.cmake:
  WL#5161 : Add config.h template for cmake
configure.cmake:
  WL#5161 : Add platform tests ( for cmake)
configure.in:
  Added new subdirectories
dbug/CMakeLists.txt:
  WL#5161
extra/CMakeLists.txt:
  WL#5161
extra/yassl/CMakeLists.txt:
  WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
  WL#5161
include/Makefile.am:
  Add new file
include/keycache.h:
  remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
  use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
  - Move thread_safe_increment from config-win.h to other headers
  (config-win.h is not used anymore)
  - Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
  Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and 
  with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
  Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
  remove rf_SetTimer that used to be defined in config-win.h
  Replace with UINT_PTR (we do not use config-win.h anymore
  and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
  Avoid pointless recompilation of source files 
  in client library if possible. Merge static 
  libs (dbug, mysys) to create static client 
  library.
libmysqld/CMakeLists.txt:
  Avoid pointless recompilation of source files 
  when building embedded. Instead, merge dbug and 
  mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
  Embedded compilation on Unix
libmysqld/lib_sql.cc:
  Do not define THD::clear_error() in lib_sql.cc
  for embedded. Instead, use the same inline 
  definition from sql_class.h as in none-embedded 
  case (fixes duplicate symbol errors on Windows
  and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
  Install man files.
man/Makefile.am:
  Add new file.
mysql-test/CMakeLists.txt:
  Install mysql-test files
mysql-test/Makefile.am:
  Add new files
mysql-test/lib/My/ConfigFactory.pm:
  Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
  the build configurations are now also available on Unix
  Xcode on Mac uses the Release, RelwithDebinfo and Debug 
  subdirectories for executables. Earlier, build configurations 
  were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
  Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
  Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
  add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
  Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
  define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined 
  (can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
  Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
  Allow testing with mtr in out-of-source builds.
  Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
  This test can now run on Windows as well.
mysys/CMakeLists.txt:
  Port CMakeLists.txt to Unix
mysys/my_create.c:
  config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
  config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
  Add  win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
  config-win.h is dead => include <sys/stat.h> where it is used
  fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
  Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
  Add new file
plugin/fulltext/CMakeLists.txt:
  Compile full-text example with CMake
plugin/fulltext/Makefile.am:
  Add new file.
plugin/semisync/CMakeLists.txt:
  Fix semisync to use common  macro for plugins.
regex/CMakeLists.txt:
  Use absolute filenames, when adding regex library 
  (we recompile files in embedded, and want to locate 
  sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
  Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
  Add configure/install for scripts
sql-bench/CMakeLists.txt:
  install sql-bench files
sql-bench/Makefile.am:
  Add new file
sql/CMakeLists.txt:
  Port CmakeLists.txt to Unix
sql/nt_servc.cc:
  compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
  Install charsets
sql/share/Makefile.am:
  Add new file
sql/sql_builtin.cc.in:
  Handle pure-C plugins on Windows.
sql/sql_class.h:
  Use the same clear_error macro in embedded and not embedded.
  Fixes pointless #ifdef and avoids duplicate symbols when linking
  on Windows.
storage/Makefile.am:
  storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
  Add names for static and dynamic plugin libraries.
  Link archive with zlib
storage/blackhole/CMakeLists.txt:
  Add names for static and dynamic storage 
  engine libraries
storage/csv/CMakeLists.txt:
  Add names for static and dynamic storage engine
  libraries
storage/example/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/federated/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/heap/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/ibmdb2i/CMakeLists.txt:
  Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
  Run system checks.
  
  Add names for static and dynamic storage engine 
  libraries.
storage/innobase/include/page0page.ic:
  Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
  Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/mysql_storage_engine.cmake:
  storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
  Configure and install some files from support-files.
support-files/Makefile.am:
  Add new file
tests/CMakeLists.txt:
  In general case, mysqlclient library can be dependent
  on C++ runtime(if it includes yassl and is not compiled
  with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
  Add unit tests
unittest/mysys/Makefile.am:
  Add new file
unittest/mytap/CMakeLists.txt:
  Add library for unit tests
unittest/mytap/Makefile.am:
  Add new file
unittest/mytap/tap.c:
  fix function definitions to match declarations
win/create_def_file.js:
  Fix link error with intel compiler (icl 
  defines of special label for exception handler)
2009-11-09 12:32:48 +01:00