Commit graph

494 commits

Author SHA1 Message Date
Michael Widenius
aa67a198e8 automatic merge with 5.5 2012-06-27 17:22:23 +03:00
Michael Widenius
8294226097 Switched off Maintainer mode by default as it gave wrong compiler warnings (as it added -Wall after some switches was already turned off)
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
2012-06-13 19:21:28 +03:00
Joerg Bruehe
6cd3c6b6b0 More changes to supporting the build of RPMs for ULN
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.
2012-06-11 12:11:02 +02:00
Michael Widenius
efa48b2148 Merge with 5.5 2012-06-08 20:13:55 +03:00
Sergei Golubchik
38c4ef63b8 MDEV-302 lp:988204 MariaDB 5.5.23 binaries don't use libaio
simplify debian/dist/*/rules slightly.
move hard-coded config value to cmake files.
(the actual fix is -DBUILD_CONFIG=mysql_release)
2012-06-06 14:15:29 +02:00
Sergei Golubchik
3e3606d21d merge with 5.3.
Take only test cases from MDEV-136 Non-blocking "set read_only"
2012-06-04 17:26:11 +02:00
Michael Widenius
83c02f3237 Increased the version number to 10.0
- Fixed code that was not ready for a major version number > 9
- Fixed test cases that assumed max major version number could be 9
Updated version number for depricated options (will be removed in a later commit)

VERSION:
  Version number 10.0.0
client/mysqlbinlog.cc:
  Added support for major version numbers > 9
cmake/mysql_version.cmake:
  Added support for version numbers that is 0
mysql-test/r/comments.result:
  Modified test to handle version number 100000
mysql-test/r/func_system.result:
  Modified test to handle version number 100000
mysql-test/r/log_state.result:
  Updated depricated error message
mysql-test/r/sp.result:
  Modified test to handle version number 100000
mysql-test/r/subselect4.result:
  Updated depricated error message
mysql-test/r/variables.result:
  Updated depricated error message
mysql-test/suite/rpl/r/rpl_conditional_comments.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_conditional_comments.test:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Modified test to handle version number 100000
mysql-test/suite/sys_vars/r/debug_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/multi_range_count_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_big_selects_func.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_func.result:
  Updated depricated error message
mysql-test/t/comments.test:
  Modified test to handle version number 100000
mysql-test/t/file_contents.test:
  Modified test to handle version number 100000
mysql-test/t/func_system.test:
  Modified test to handle version number 100000
mysql-test/t/parser_not_embedded.test:
  Modified test to handle version number 100000
mysql-test/t/sp.test:
  Modified test to handle version number 100000
sql/mysqld.cc:
  Updated version number for depricated options (will be removed in a later commit)
sql/slave.cc:
  Modified test to handle version number 100000
  Better error messages
sql/sql_lex.cc:
  Modified test to handle version number 100000 in comment syntax
sql/sys_vars.cc:
  Updated version number for depricated options (will be removed in a later commit)
2012-05-31 22:39:11 +03:00
Sergei Golubchik
32addeaf45 RPM packages should not obsolete themselves.
Otherwise yum on fedora will not install them
(rpm will, yum on centos and rhel will).
2012-05-29 21:38:51 +02:00
Sergei Golubchik
6cfb62b733 MDEV-293 5.5 RPMs for RHEL6/CentOS6
Build MariaDB-compat rpm by repackaging files from MariaDB-shared-5.3.*.rpm
Or RHEL6/CentOS6 make all other MariaDB rpms depend on MariaDB-compat.
2012-05-29 21:38:35 +02:00
Sergei Golubchik
9f7bfbefb1 Don't install debug plugins and don't populate unused "plugins.files" file. 2012-05-26 13:04:23 +02:00
Sergei Golubchik
be0d1179a8 create a new MariaDB-common.rpm that contains files needed both by the client and the server.
use my.cnf includes to split one big my.cnf file in server and client parts.

remove "Provides: mysql-libs" (doesn't help on CentOS 6)
2012-05-25 19:18:29 +02:00
Sergei Golubchik
ec586f529c Building RPMs with CPack
configure with cmake -DRPM=distro
2012-05-22 11:04:32 +02:00
Vladislav Vaintroub
31886faef6 Add -Wno-missing-field-initializers to silence bogus warnings from GCC in maintainer mode. 2012-05-17 21:50:50 +02:00
Vladislav Vaintroub
ab58904367 Fix FreeBSD test errors. Also link with libexecinfo on FreeBSD for stacktrace functionality. 2012-05-04 14:02:35 +02:00
Vladislav Vaintroub
e3ffaed147 support same version upgrade for MSI 2012-05-04 03:51:30 +02:00
Vladislav Vaintroub
f544b21fcb Fix build on OSX
- Workaround linker bug that prevents linking aria test executables
   using -fno-common on OSX
- Skip system readline detection (OSX readline is incompatible one)
- Make Xcode generator work
2012-04-12 01:33:43 +02:00
Sergei Golubchik
16c5c53fc2 mysql 5.5.23 merge 2012-04-10 08:28:13 +02:00
unknown
34ed8f3379 lp:886550 Wrong installation path for some include files.
Now install all includes in a flat hierarchy under
$PREFIX/include/mysq/, same as 5.3. User can override with
-DINSTALL_INCLUDEDIR
2012-04-03 08:00:57 +02:00
Sergei Golubchik
0d5adca0de debug_sync is now a service, available to dynamically loaded plugins.
new make target - abi_update

libservices/HOWTO:
  remove references to Makefile.am
  small tweaks
2012-03-28 19:26:00 +02:00
Sergei Golubchik
20e706689d mysql-5.5.22 merge
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
2012-03-28 01:04:46 +02:00
Vladislav Vaintroub
02d982a90b Fix Windows build 2012-03-22 20:21:14 +01:00
Bjorn Munch
26c08ffa40 Merged some fixes from 7.2 release branches 2012-03-22 16:16:11 +01:00
Vladislav Vaintroub
526de8478a precache results of system tests on Windows 2012-03-22 15:44:06 +01:00
Vladislav Vaintroub
9f54ae519e Fix CMake code to work with older cmake version, such as 2.6.2 2012-03-22 15:37:52 +01:00
Vladislav Vaintroub
49d6568aae Reduce size of windows MSI by approx. 50%
- Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI
- Only include debug symbols for client and embedded libs and also
  mysqld.exe and server plugins (so we can still can get a callstack in case of crash)

The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.
2012-03-16 20:52:17 +01:00
Sergei Golubchik
92f31d8070 mdev-176 feedback plugin is linked dynamically in bintar 2012-03-13 14:43:34 +01:00
MySQL Build Team
7a35cb9150 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
Vladislav Vaintroub
b64a2fef59 precache some more system checks on Windows 2012-02-27 19:54:30 +01:00
Vladislav Vaintroub
62dcaf8c29 merge 5.5 2012-02-27 19:32:44 +01:00
Vladislav Vaintroub
3ebb4b8833 because of the high cost associated with fake symdir resolution, disable symbolic-links on Windows by default. Real symlinks (Vista+) as well as NTFS junctions (prior to Vista) do not require this parameter 2012-02-27 19:20:18 +01:00
Vladislav Vaintroub
150f238538 Workaround buggy Linux dtrace - it fails on fedora if CC is set to 'ccache gcc' 2012-02-20 22:25:44 +01:00
Vladislav Vaintroub
8877fe7359 merge 2012-02-08 11:18:55 +01: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
657e8675d8 Fix portability problems
- Solaris readline always needs curses
- -rdynamic is not portable, replaced by SET_TARGET_PROPERTIES(...ENABLE_EXPORTS)
2012-02-02 21:48:22 +01:00
Vladislav Vaintroub
b7cf6abe52 merge 2012-01-24 01:59:03 +01:00
unknown
cfd4fcb0bc Initial draft for building .deb packages for MariaDB 5.5. 2012-01-23 12:20:16 +01:00
Vladislav Vaintroub
6404fcbf9e merge 5.5 2012-01-11 14:56:19 +01:00
Vladislav Vaintroub
44c8745ff5 MDEV-85: Remove shared plugin library if build swtiches from shared to static with
e.g 
cmake . -DWITH_XXXX_STORAGE_ENGINE=1
2012-01-11 13:35:27 +01:00
Vladislav Vaintroub
305ae953db merge 2011-12-26 16:57:28 +01:00
Vladislav Vaintroub
7da4229f2e Fix build on old 32 bit Centos (kernel 2.6.18) 2011-12-26 01:08:46 +01:00
Vladislav Vaintroub
c03deada6c fix 64 bit Windows build 2011-12-21 02:44:50 +01:00
Sergei Golubchik
2573f03a05 * remove WITH_DEBUG from CMakeLists.txt
* 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
2011-12-15 22:08:42 +01:00
Tor Didriksen
b507df6145 Bug#13463417 63487: ANNOYING TRACE MESSAGE IN CMAKE CODE
Remove it.
2011-12-15 10:44:33 +01:00
Sergei Golubchik
db8f698c8a new configure option: NOT_FOR_DISTRIBUTION
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.
2011-12-14 10:53:32 +01:00
Vladislav Vaintroub
e91bbca5fb Initial threadpool implementation for MariaDB 5.5 2011-12-08 19:17:49 +01:00
Vladislav Vaintroub
25a9b33591 fix signing and packaging 2011-11-30 00:23:50 +01:00
Vladislav Vaintroub
835d8b6242 merge 2011-11-28 01:23:13 +01:00
Sergei Golubchik
ac8dd6beb9 merged 2011-11-27 17:50:50 +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
Vladislav Vaintroub
64e308e28d Fix build and packaging on Windows:
- 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
2011-11-26 23:07:53 +01:00
Vladislav Vaintroub
6be24a771a Avoid mysqld dependency on libaio.so by linking xtradb statically to libaio.
A variable XTRADB_PREFER_STATIC_LIBAIO should be set to 1 (or TRUE
 or ON) for static linking.

Even if mysqld can avoid dependency on shared libaio, shared libraries 
libmysqld.so or ha_innodb.so cannot link without it.

Given that the patch primarily addresses building tar.gz package, and 
shared libraries mentioned above deemed less important than mysqld
executable, we accept shared lib dependency on libaio.so
2011-11-25 20:50:14 +01:00
Sergei Golubchik
feba65a554 merged 2011-11-22 18:51:33 +01:00
Vladislav Vaintroub
c104d31404 For libmysqld.so, apply patch to the MySQL Bug#39288 found here
http://lists.mysql.com/commits/102373

It is better than previous attempts to build the libmysqld, 
as it also takes care of

1) -Wl,--no-undefined for shared libraries and 
2) CLEAN_DIRECT_OUTPUT since there are now 2 libraries with 
the same base output name
2011-11-08 02:14:57 +01:00
Vladislav Vaintroub
216d5450e7 add version to the libmysqld.so 2011-11-07 22:20:44 +01:00
Sergei Golubchik
6edd76785c merge 2011-11-03 23:39:53 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
952e4067ad On linux we build with defined _GNU_SOURCE.
We must perform system tests with _GNU_SOURCE too!
2011-10-31 17:25:29 +01:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
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
2011-10-19 21:45:18 +02:00
Daniel Fischer
7450044eb7 merge from 5.5.16 2011-09-21 12:40:41 +02:00
Jonathan Perkin
1f9fe1b4d5 Update email address for Release Engineering. 2011-09-20 17:47:53 +02:00
Daniel Fischer
888b8793a2 Source plugin library files list from cmake-generated file in RPM builds 2011-08-15 12:10:08 +02:00
Sergei Golubchik
2853f6bfbb unit test fixes for ctest 2011-07-16 09:09:01 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Daniel Fischer
f089d2e870 RETURN doesn't exactly return from the macro... 2011-06-10 14:57:42 +02:00
Tor Didriksen
155df6c657 Bug#12641810 - MYSQL MAKE DIST DOESN'T WORK WHEN USING MYSQL TREE + PLUGIN TREE(S)
cmake/make_dist.cmake.in:
  Run 'bzr export' for plugins.
cmake/plugin.cmake:
  Lookup plugins with bzr repos.
2011-06-10 09:12:10 +02:00
Bjorn Munch
aca402b62b Followup to 12607800, testing it in PB2 didn't work, trying again
Be more explicit about path to (potential) plugin tests dirs
2011-06-01 15:19:36 +02:00
Bjorn Munch
fd717fb560 Bug #12607800 ADD HOOK TO INSTALL TESTS FROM IMPORTED FEATURE TREES
Sets INSTALL_PLUGINTESTDIR if any plugin/*/tests exist
2011-06-01 12:15:01 +02:00
Bjorn Munch
94f96bc472 Bug #12598603 HAVE COLLECTIONS FILES IN FEATURE TREES AUTO-APPENDED TO COMMON FILES
Do this in the common plugin.cmake but only if running in PB2
  (If done in manual builds it would create a bzr diff)
2011-05-27 14:43:15 +02:00
Bjorn Munch
b5009ee6be merge from 5.5-mtr 2011-05-26 10:18:21 +02:00
Tor Didriksen
c41e866357 Don't check for FIONREAD on windows.
Execution of platforms tests are slow/flaky when building on windows.
in PB:mysql-next-mr-opt-team on 2011-05-18 for win x86 debug_max, i see:
-- Looking for FIONREAD
-- Looking for FIONREAD - found
and the build fails.
2011-05-26 09:54:19 +02:00
Bjorn Munch
73d1992ef4 Bug #12586211 ENABLE GCOV BUILDS WITH CMAKE, INCLUDING PLUGINS
Added --with-gcov option to configure.pl and use that from SETUP.sh
2011-05-25 12:39:11 +02:00
Tor Didriksen
0fd2624780 Bug#12710832 - PB2 DAILY-TRUNK BUILD FAILS ON SOLARIS X86_64
Compiler bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978

Workaround is to always specify "-xOn".


cmake/build_configurations/mysql_release.cmake:
  Enable basic optimization for debug builds.
2011-07-04 14:27:08 +02:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +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
Georgi Kodinov
c7b12ecc6e Backport of (part of) bug #11760838 to 5.5.
Enabled the ABI check to run on MacOSX.
2011-04-28 13:13:36 +03:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Guilhem Bichot
fe1ec4a6e7 Fix for Bug#11892055 - "GCC COMPILER FLAG -WOVERLOADED-VIRTUAL NOT USED, WHICH LETS BUGS IN" 2011-04-26 11:18:29 +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
unknown
753c406994 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
MySQL Build Team
a471109971 Implementing Bug #57175 MySQL source tarballs should include generated spec file 2011-03-03 22:46:12 +01:00
Kent Boortz
fe12c639b1 The client shared library major version was changed to 18, to reflect
ABI changes (Bug#60061)

Bumping the version from 16 to 18, instead of 17, was done to avoid a
library conflict on Mac OS X between MySQL 5.1 and MySQL 5.5. In MySQL
5.1 GNU libtool was used, that made the ABI version used in the file
name to be 16, and the one stored inside the binary to be 17.

MySQL 5.5 uses CMake as a build tool, that will store the same ABI
number in the file name as inside the binary in Mac OS X, and then
bumping the ABI number two steps avoids a conflict on Mac OS X.
2011-02-17 19:36:19 +01:00
Joerg Bruehe
a7662cf0a9 Merge bug fix 42969 into main 5.5 branch. 2011-02-14 15:53:51 +01:00
Joerg Bruehe
bb956c1ea2 Fix bug#42969 Please add a MANIFEST to each build
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.
2011-02-11 15:55:25 +01: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
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
Alexander Nozdrin
3237e4908a Manual merge from mysql-5.5. 2010-12-16 21:43:21 +03:00
Georgi Kodinov
74e2520cd9 merge mysql-5.5->mysql-5.5-bugteam 2010-12-16 18:44:17 +02:00
Jonathan Perkin
5752c16ca9 bug#58955: Must -DBUILD_CONFIG=mysql_release require libaio on Linux
Allow users to build without aio if they really want to, by passing
-DIGNORE_AIO_CHECK to cmake.
2010-12-16 09:27:55 +00:00
Davi Arnaut
650d9cc5b0 Bug#58871: Reorganize maintainer mode compiler flags to allow
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.
2010-12-15 08:30:09 -02:00
Jonathan Perkin
5046dc160b bug#58766: Server binary was compiled without fast-mutexes
Re-enable fast mutexes on Linux for release builds.
2010-12-07 11:40:38 +00:00
Jonathan Perkin
9836927774 Fix the .deb package prefix. 2010-11-25 00:21:28 +00:00
Vladislav Vaintroub
199cb4b7b1 Post-fix for Bug#58158 on Solaris
Problem : The build might fail with 
make[2]: *** No rule to make target `../sql/z',
needed by `sql/mysqld_dtrace_all.o'.  Stop.
if one of plugins would depends on system libz 
library

Fix: Filter out non-static dependent libraries
when dtracing static libs
2010-11-25 00:20:36 +00:00
Tor Didriksen
20f94499fa Bug #58372 cmake should not write temporary files in the source directory
cmake/do_abi_check.cmake:
  Put temporary files in ${BINARY_DIR} rather than in source directory.
  Slight reformatting for readability of commands.
2010-11-23 10:26:26 +01:00
Magnus Blåudd
6ad007c7ad Merge 5.5-bug58158 into 5.5-bugteam 2010-11-24 11:49:10 +01:00
Magnus Blåudd
41cab32111 WL#5665: Removal of the autotools-based build system
- Make the cmake files depend on VERSION, causing
   cmake rerun when VERSION changes
2010-11-24 11:37:59 +01:00
Sunanda Menon
377c783e75 merge 2010-11-22 11:35:48 +01:00
Davi Arnaut
af67d8ae02 WL#5665: Removal of the autotools-based build system
Remove some more leftovers from the initial removal:

o Update relevant mentions of configure.in throughout
the source code.

o Remove win/configure.js, which at this point just
duplicates logic already present in CMake based build
system.

o Remove support files which relied on the autotools
build system. In any case, MySQL is no longer officially
supported on SCO.

o Remove files which are no longer part of the build.
2010-11-20 20:56:09 -02:00
Davi Arnaut
8664de2230 WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
2010-11-20 12:47:50 -02:00
Vladislav Vaintroub
4180ba3d6e avoid useless system check on Windows 2010-11-20 00:56:07 +01:00
Vladislav Vaintroub
861971428b Bug#58313: CMake stops with VS Express if -DBUILD_CONFIG=mysql_release.cmake
Bug : -DBUILD_CONFIG=mysql_release sets SIGNCODE parameter which requires 
singtool.exe (part of Windows SDK)  in order to be able to sign the binaries (
only if valid certificate is found). However singtool is not a part of the SDK shipped
with Visual Studio Express, so the build fails claiming missing singtools.exe

Fix: Do not  use SIGNCODE  wiith VC Express.

Also, fix broken nmake build (*.rc files could not be compiled due to ADD_DEFINITIONS
contaning C/C++ compiler specific flags)
2010-11-20 00:20:18 +01:00
Sunanda Menon
92db6e9af9 Bug #58227 improve error message "aio is required on Linux" 2010-11-19 10:34:22 +01:00
Vladislav Vaintroub
bd15ec0086 Bug#58272: -DBUILD_CONFIG=mysql_release is broken with cmake 2.8.3
The reason  for the bug is that :
-  we use system checks in cmake/os/mysql_release.cmake 
-  we include cmake/os/mysql_release.cmake using CMAKE_USER_MAKE_RULES_OVERRIDE 
-  this  (having system checks based on TRY_COMPILE inside file pointed by 
   CMAKE_USER_MAKE_RULES_OVERRIDE  does not work with cmake 2.8.3,
   and  according to Kitware was never meant to work, it just happened to work by accident
   until 2.8.2 release (though, it seems not to work wiith 2.6.0 either)

Related CMake bug discussing the situation:
http://public.kitware.com/Bug/view.php?id=11469  

The fix is to use INCLUDE instead of CMAKE_USER_MAKE_RULES_OVERRIDE as suggested
by Kitware. The downside is that compile flags are not in cache, but this is  pure cosmetics.
The functionality is the same,  flags are used for compiling are correct using INCLUDE.
2010-11-17 22:06:24 +01:00
Magnus Blåudd
31e30ee326 Bug#58158 LINK_LIBRARIES for MYSQL_ADD_PLUGIN is not added to libmysqld
- Add ARG_LINK_LIBRARIES to MYSQLD_STATIC_PLUGIN_LIBS in
    MYSQL_ADD_PLUGIN so that any libraries listed by the plugin is
    added to libmysqld
  - remove the variables NDB_CLIENT_LIBS and NDB_CLUSTER_INCLUDES
    from libmysqld/CMakeLists.txt since those are just old remnants
2010-11-16 10:05:54 +01:00
Vladislav Vaintroub
f0c2b9c5c6 add missing COMPONENT to all CMake INSTALL commands 2010-11-13 23:16:52 +01:00
Vladislav Vaintroub
36fffdeaa2 Bug#58074: ADD_VERSION_INFO cmake/mysql_version.cmake fails if LINK_FLAGS are modified
Backport version info handling  (Windows-specific) from next-mr. 
Instead of adding ".res" object as linker flag, add  resource file (.rc) file to the source list.
This is more obvious and less error prone method.
2010-11-12 13:42:50 +01:00
Vladislav Vaintroub
e1837cc0d8 Bug #52275 CMake configure wrapper does not handle
--with-comment correctly
      
Properly convert --with-comment
do not uppercase it, quote as it might contain spaces.
2010-11-12 02:33:19 +01:00
Vladislav Vaintroub
2e2f3b1fc1 Fix typo : SVR5=>SVR4 2010-11-10 20:10:04 +01:00
Joerg Bruehe
6f01f9c5ac Fix cmake's version string handling (change proposed by Jonathan Perkin).
Before this, a text suffix (like "-rc") after the numeric version was needed.
2010-11-02 19:52:56 +01:00
Davi Arnaut
9129cb184b GCC's link option only take a single hyphen. 2010-10-20 19:25:28 -02:00
Jonathan Perkin
50ca4bc155 Fix typo, allow SVR4 packages to be built again. 2010-10-14 16:57:16 +01:00
Davi Arnaut
215e967ace Use a guard macro to prevent the inclusion of system headers
when checking the ABI with the C Preprocessor. Also, add the
new hearders to the cmake based ABI check.

cmake/abi_check.cmake:
  Add headers which were added to the autotools ABI check.
  Remove trailing spaces.
include/mysql/client_plugin.h:
  Guard the inclusion of system headers.
2010-10-13 12:11:29 -03:00
Vladislav Vaintroub
10bc97de5c Do not accept invalid INSTALL_LAYOUT parameter 2010-10-11 19:44:35 +02:00
Davi Arnaut
c192be206a Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations.
Due to the extent of aliasing violations in the MySQL source
code, at this time it is safer to disable strict aliasing related
optimizations in release builds.

As of this patch, only GCC enables strict aliasing by default.
Hence, use the -fno-strict-aliasing option to disable the
aliasing rules.

cmake/build_configurations/mysql_release.cmake:
  Add -fno-strict-aliasing to release builds.
2010-10-08 10:30:58 -03:00
Vladislav Vaintroub
a1fe23668f Fix compile error on Windows after WL#1054 push.
The error was introduced by typo in variable name (errormsg instead of correct
errmsg)

- Also, precache  HAVE_PEERCRED to OFF in cmake\os\WindowsCache.cmake
(to avoid useless system check).
- Also, add missing check for errors from FormatMessage().

- Also, remove annoying CMake debug printout of MALLOC_LIB if this is not set.
2010-10-04 21:25:53 +02:00
Vladislav Vaintroub
36081eed3d Rename CMAKE_PARSE_ARGUMENTS macro to avoid name collision
with CMake 2.8.3 builtin macro
2010-09-29 11:42:35 +02:00
Mats Kindahl
c4913bc3aa Bug #55966: "plugin" tests fail in 5.5
On Solaris with version 3.4.6, the ha_example.so shared library is built
with DTrace and the server is built without DTrace support. This occurs
because dtrace.cmake disables DTrace support for 3.4.6, but still set
HAVE_DTRACE, which causes probes_mysql.h to include probes_mysql_dtrace.h
instead of probes_mysql_nodtrace.h.

This patch fixes this by not setting HAVE_DTRACE on Solaris for GCC 3.4.6.
2010-09-06 14:45:12 +02:00
Sergey Vojtovich
8c05b08550 BUG#52821 - plugin_ftparser.h and plugin_audit.h are
not tested by ABI check

plugin_audit.h and plugin_ftparser.h are now subject
for ABI check. plugin.h is now tested implicitly.

Also fixed broken ABI check cmake rules.

Makefile.am:
  plugin_audit.h and plugin_ftparser.h are now subject
  for ABI check. plugin.h is now tested implicitly.
cmake/abi_check.cmake:
  plugin_audit.h and plugin_ftparser.h are now subject
  for ABI check. plugin.h is now tested implicitly.
  
  Also fixed broken ABI check rules: -DMYSQL_ABI_CHECK is
  compiler (not cmake) definition, incorrect definitions
  were passed to do_abi_check.cmake for abi_check_all rule.
cmake/do_abi_check.cmake:
  Inform sources that we do ABI check.
include/mysql/plugin.h.pp:
  plugin.h is now tested implicitly.
include/mysql/plugin_audit.h.pp:
  plugin_audit.h is now subject for ABI check.
include/mysql/plugin_ftparser.h.pp:
  plugin_ftparser.h is now subject for ABI check.
2010-08-27 10:45:35 +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
Vladislav Vaintroub
b94d86215d Build cleanups
- Simplify sql-bench installation, 
do not try to resolve names : this leads to probem
if builddir is symlink located on different filesystem.
(reported by alik)

- Make WITHOUT_XXX (disabling plugin) work for DEFAULT
plugins. Prior to the patch is behaved just like 
MANDATORY.

- LINK_LIBRARIES in MYSQL_ADD_PLUGIN had no effect for
statically linked plugins.

- Fix constant rebuild of initdb target on Windows.
2010-08-05 18:38:24 +02:00
Alexander Nozdrin
32f3ab7933 Auto-merge from mysql-trunk-merge. 2010-07-29 16:32:11 +04: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
Alexander Nozdrin
ab3d1c0d31 Auto-merge from mysql-trunk. 2010-07-23 17:06:26 +04:00
Davi Arnaut
7f87c8f099 Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change
      
Addendum for trunk: add -DMYSQL_ABI_CHECK to the cmake ABI check.
2010-07-20 16:53:39 -03:00
Jonathan Perkin
74d6731682 Revert the ndb removal for now. 2010-07-20 10:35:55 +01:00
Jonathan Perkin
967ee2c65c bug#55250: 5.5.5-m3 incorrectly compiled with exceptions on Solaris/x86
Put '-features=no%except' back into Solaris/x86 CXXFLAGS.
2010-07-19 15:23:02 +01:00
Alexander Nozdrin
b5eac2b2ce Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00
Davi Arnaut
711c318c07 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
03ff26c759 Remove leftovers from old versions of the code. 2010-07-13 14:34:32 -03: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
Jonathan Perkin
7515fe4deb Spell CMAKE_COMPILER_IS_GNUCC correctly. 2010-07-06 11:28:11 +01:00
Jonathan Perkin
c687600f79 I'm pretty sure 'CXX_FLAGS' is a typo for 'CMAKE_CXX_FLAGS', and
this is the reason why -fno-implicit-templates is removed from the
entire build when sourcing this file, rather than just limited to
yassl sources.
2010-07-05 19:54:07 +01:00
Jonathan Perkin
d72b3dc40d Remove flags which have already been defined in configure.cmake.
Add a note to investigate -felide-constructors usage on OSX.
2010-07-05 19:34:38 +01:00
Jonathan Perkin
cfb2379036 Fix typo in previous. 2010-07-05 17:19:59 +01:00
Jonathan Perkin
c14e08401a kent's recent changes to this file resulted in flag loss due to
the way cmake parses, in particular CMAKE_SIZEOF_VOID_P was
uninitialized during the first parse, and the bad values were
cached.

Pull in SIZEOF_VOIDP macro from package_name.cmake, define some
useful variables, and clean up the file a bit with explicit
definitions, to hopefully avoid this problem in the future.
2010-07-05 15:46:51 +01:00
Davi Arnaut
54a5c00de9 Unset the execute bit where it's not needed. 2010-07-03 20:17:03 -03:00
Davi Arnaut
5641fb64b4 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-02 16:38:04 -03:00
Jonathan Perkin
d8621f8924 Fix icc/icpc flags. 2010-07-02 14:02:50 +01:00
Jonathan Perkin
38954b526b Don't cache {C,CXX} flags, this file is parsed twice, the first time
CMAKE_SIZEOF_VOID_P is unset so the variables are set incorrectly.
2010-07-02 13:28:17 +01:00
Jonathan Perkin
4c626c0588 Fix syntax error (missing quote). 2010-07-01 14:55:52 +01:00
Vladislav Vaintroub
1134fe2fdb Bug #52850: mysqld-debug.pdb doesn't match
mysqld-debug.exe in 5.5.3 on windows

Fix:

- Do not rename PDB, install mysqld.pdb matching 
mysqld-debug.exe into bin\debug subdirectory

- Stack tracing code will now additionally look in 
debug subdirectory of the application directory 
for debug symbols.

- Small cleanup in stacktracing code: link with 
dbghelp rather than load functions dynamically 
at runtime, since dbghelp.dll is always present.

- Install debug binaries with WiX

cmake/install_macros.cmake:
  Add optional COMPONENT and PDB_DESTINATION 
  to INSTALL_DEBUG_TARGET
mysys/stacktrace.c:
  If binary is build with DBUG, also look in debug subdirectory
  of  executable directory. Packaging will put some PDBs there
  (e.g bin\mysqld-debug.exe will have corresponding pdb in 
  bin\debug)
  
  Also some cleanup: do not load dbghelp dynamically, instead
  link with it. dbghelp is present on all Windows starting with 
  XP.
packaging/WiX/CPackWixConfig.cmake:
  Install debug binaries
sql/CMakeLists.txt:
  Do not rename PDB for mysqld-debug.exe, install it in debug subdirectory
2010-06-30 14:10:29 +02:00
Jonathan Perkin
0699a98413 Fix previous 2010-06-25 16:16:46 +01:00
Jonathan Perkin
5dd1d5c2b4 Update ICC flags to avoid deprecated options. 2010-06-25 15:01:18 +01:00
Jonathan Perkin
654637d463 Ensure aio is available on Linux. 2010-06-25 11:02:39 +01:00
Joerg Bruehe
1e37ae0ea2 Automerge the bug fix 54739 into the 5.5.5-m3 release clone. 2010-06-24 13:02:50 +02:00
Joerg Bruehe
a5d9e0e0c4 Merge bug fix. 2010-06-23 16:32:03 +02:00
Joerg Bruehe
33173fbe82 Fix Bug #54739
Accidental change in compile-time definitions for FreeBSD


Revert the accidental setting of "HAVE_BROKEN_REALPATH"
on current versions of FreeBSD,

do it for both autotools ("configure.in")
and cmake ("cmake/os/FreeBSD.cmake").
2010-06-23 16:19:19 +02:00
Jonathan Perkin
f84c866c5c Remove storage/ndb from dist sources. 2010-06-23 13:36:19 +01:00
Kent Boortz
fb583cfaea CMakeLists.txt
cmake/build_configurations/mysql_release.cmake
 - Corrected spelling ENABLE_LOCAL_INFILE => ENABLED_LOCAL_INFILE
 - In addition to "RelWithDebInfo", set target "Release" and "Debug"
 - Set Debug flags
 - Enabled SSL on Mac OS X
 - For gcc builds, set RELEASE and DEBUG flags as well
 - For g++ builds, added "-fno-implicit-templates"
 - Use "-O" (gcc -O1) for optimized binaries, as "DEBUG" in out case
   is more about enabling trace support to the server, no optimization
   makes binaries too slow to be practical to reproduce problems

cmake/os/WindowsCache.cmake
 - Removed unused HAVE_SYS_IOCTL

config.h.cmake
 - Added header checks and missing defines
 - Removed unused HAVE_SYS_IOCTL
 - Grouped and uncommented some HAVE_* that are really not
   defines, but internal variables used in the CMake setup,
 - Added hard coded flags for HP-UX and Mac OS X

configure.cmake
 - Added header checks and missing defines
 - Removed unused HAVE_SYS_IOCTL
 - "sys/dir.h" test needs "sys/types.h"
 - Corrected syntax for "sys/ptem.h" test
 - Don't exclude test for some types if Mac OS X, harmless
   to do the test and we want the HAVE_<type> settings
 - Added hard coded flags for HP-UX and Mac OS X

extra/yassl/CMakeLists.txt
extra/yassl/taocrypt/CMakeLists.txt
 - Added missing source file "template_instnt.cpp"
2010-06-23 12:56:22 +02:00
sunanda
cf9d4c456d Made the changes as per Kent/wlad to include http://lists.mysql.com/commits/111802 2010-06-23 10:23:41 +02:00
Vladislav Vaintroub
21e943e0d1 Fix syntax error (missing space in SET command), that effectively prevents mysqld from being build with SSL. 2010-06-22 19:47:49 +02:00
Vladislav Vaintroub
3c74f80ab1 Fix ~1000 warnings class/struct mismatch.
Handle this warning in the future as error, this will prevent pushing to main trees.
2010-06-22 18:40:14 +02:00
Magne Mahre
7657ee10f8 Post-push fixups for WL#5349
mysql-test/suite/perfschema/t/no_threads-master.opt:
  Innodb will start multiple threads, which is
  not compatible with --one-thread.   Disable
  innodb to be able to run the test case.
2010-06-22 12:13:47 +02:00
Daniel Fischer
073943cd7d merge 2010-06-18 17:04:15 +02:00
Davi Arnaut
60153dd36e Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-08 20:44:25 -03:00
Joerg Bruehe
7758bdc8aa Get rid of the "net retry count" difference which
is not needed any more with current versions of FreeBSD.
(Entries 52410 and 52412 in the Bug DB)

That change is based on Dan Nelson replying on the
FreeBSD mailing list, freebsd-questions@freebsd.org
in a thread running from 2010-Apr-29 to 2010-May-1 titled
     "Need info about FreeBSD and interrupted system
      calls for MySQL code"

Also, ensure the cmake settings correspond to the autotools
ones: Add "HAVE_BROKEN_REALPATH" to cmake.


cmake/os/FreeBSD.cmake:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  However, it is still being kept as a comment for now,
  so that it can be re-activated should the need arise.
  
  In addition, set "HAVE_BROKEN_REALPATH" to completely
  mirror the autotools path.
configure.in:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  This definitely holds for FreeBSD version 6 and up.
  
  Adapt the informational messages to the path taken.
2010-05-27 19:02:19 +02:00
Daniel Fischer
458d0e7ae0 merge 2010-05-27 16:11:13 +02:00
Joerg Bruehe
9d83e2a79c Get rid ot the "net retry count" difference which
is not needed any more with current versions of FreeBSD.
(Entries 52410 and 52412 in the Bug DB)

That change is based on Dan Nelson replying on the
FreeBSD mailing list, freebsd-questions@freebsd.org
in a thread running from 2010-Apr-29 to 2010-May-1 titled
    "Need info about FreeBSD and interrupted system
     calls for MySQL code"

Also, ensure the cmake settings correspond to the autotools
ones: Add "HAVE_BROKEN_REALPATH" to cmake.

cmake/os/FreeBSD.cmake:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  However, it is still being kept for now, so that it can be
  re-activated should the need arise.
  
  In addition, set "HAVE_BROKEN_REALPATH" to completely
  mirrot the autotools path.
configure.in:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  However, it is still being kept for now, so that it can be
  re-activated should the need arise.
  
  Adapt the informational messages to the path taken.
2010-05-21 19:31:55 +02:00
Jon Olav Hauglid
198d51efe7 manual merge from mysql-trunk-bugfixing 2010-05-18 14:52:51 +02:00
Konstantin Osipov
d1dd2d11c4 Committing on behalf of Valdislav Vaintroub (reviewed and
approved):

3161 Vladislav Vaintroub       2010-04-29                 
 Bug#53196 : CMake builds don't support 'make tags' and 
'make ctags' targets.  
   - Added tags and ctags targets


CMakeLists.txt:
  Add tags and ctags targets.
cmake/Makefile.am:
  Add a cmake file to build tags.
cmake/tags.cmake:
  Build tags and ctags.
2010-05-14 18:42:10 +04:00
Jonathan Perkin
ce2aabb712 Changes to build using CMake according to existing release packages:
- Update/fix file layouts for each package type, add new types for
   native package formats including deb, rpm and svr4.

 - Build all plugins, including debug versions

 - Update compiler flags to match current release

 - Add missing @VAR@ expansions

 - Install correct mysqclient library symlinks

 - Fix icc/ia64 builds

 - Fix install of libmysqld-debug

 - Don't include mysql_embedded

 - Remove unpackaged manual pages to avoid missing files warnings

 - Don't install mtr's test suite
2010-05-12 12:51:23 +01:00
Jonathan Perkin
56a526c8a3 Explicitly set OSX flags, to match current release. 2010-05-07 12:11:09 +02:00
Jonathan Perkin
53acb1e58a Tidy install layout.
Remove 'ROOT' from sql-bench dir variable, it's unnecessary.
2010-05-06 15:20:14 +02:00
Jonathan Perkin
559c23fde2 Build all plugins.
Try to fix ia64/icc builds.
2010-05-05 13:49:03 +02:00
Daniel Fischer
fdf36464b3 apply wlad's patch to read the fill_help_tables.sql file whole, not line by line 2010-04-30 15:28:08 +02:00
Daniel Fischer
463a60ece6 merge 2010-04-30 13:36:57 +02:00
Jonathan Perkin
6f3e306683 Sync icc flags with reality. 2010-04-28 21:01:26 +02:00
Daniel Fischer
b83e1c8686 Merge 2010-04-21 14:58:09 +02:00
Mats Kindahl
c0817bacaf WL#5030: Splitting mysql_priv.h
Removing traces of mysql_priv.h from comments and other
non-source files that were missed before.
2010-04-21 00:29:30 +02:00
Jonathan Perkin
08b5cc6a4b Only use /usr/lib64 on x86_64, ia64 for example still uses /usr/lib 2010-04-19 20:21:04 +02:00
Jonathan Perkin
9b590649b8 Disable SSL with Intel CC 2010-04-16 15:05:58 +02:00
Jonathan Perkin
a03f41ee13 Fix SVR4 datadir 2010-04-01 14:56:25 +02:00
Jonathan Perkin
f3ebc19a33 Try to fix datadir 2010-04-01 13:35:16 +02:00
Jonathan Perkin
7ef2f9fa51 Apply wlad fixes from mysql-next-mr-bugfixing 2010-03-31 11:40:02 +02:00
Jonathan Perkin
089ff3dfa9 Back out remains of previous attempt. 2010-03-30 17:24:44 +02:00
Jonathan Perkin
bde4d7d3ee Fix from wlad. 2010-03-30 17:13:07 +02:00
Jonathan Perkin
08ec0a2a87 Try again.. 2010-03-30 13:37:17 +02:00
Jonathan Perkin
736f2eae74 Try to fix the debug permissions stuff. 2010-03-30 12:32:38 +02:00
Jonathan Perkin
285d7ad2f8 Install debug plugins, from wlad. 2010-03-26 17:28:06 +01:00
Jonathan Perkin
42f3842ef8 Expand INSTALL_INFODIR correctly.
Make mysql.info optional.
2010-03-25 15:04:39 +01:00
Jonathan Perkin
b462a3e0b3 Don't install documentation when INSTALL_LAYOUT=RPM, as the spec file
prefers to take docs directly from the source tree.
2010-03-25 13:16:13 +01:00
Jonathan Perkin
651aeb62ec Add INSTALL_INFODIR and use it to install mysql.info into the
correct location.
2010-03-25 11:43:11 +01:00
Jonathan Perkin
779b967d75 Avoid newline in date output. 2010-03-24 20:17:41 +01:00
Jonathan Perkin
528f384702 Try to add support for MYSQL_U_SCORE_VERSION and MYSQL_COPYRIGHT_YEAR. 2010-03-24 17:52:47 +01:00
Jonathan Perkin
b7795403ed Fix mysql-test directory in RPMs.
While here:

 - split INSTALL_*DIR variables into two sections, first set the major
   variables, then second set the minor ones, using the major where
   appropriate.

 - format the settings for easier parsing (at least with a wide terminal)
2010-03-23 16:53:11 +01:00
Jonathan Perkin
f10be5b6ae First cut at -DINSTALL_LAYOUT=DEB support. 2010-03-23 15:33:35 +01:00
Jonathan Perkin
912708c35b Install libs directly into %{_libdir} 2010-03-23 13:56:28 +01:00
Jonathan Perkin
1f8c256c18 Try some more RPM fixes. 2010-03-23 12:28:13 +01:00
Jonathan Perkin
303ab1fc27 Fix RPM prefix. 2010-03-22 23:23:18 +01:00
Jonathan Perkin
38626df565 Set CPACK_PACKAGE_CONTACT, required for .deb 2010-03-22 23:15:28 +01:00
Jonathan Perkin
8a9b61cca4 Attempt to fix RPM support-files directory. 2010-03-22 18:33:20 +01:00
Jonathan Perkin
2968832978 Tidy. 2010-03-22 16:00:37 +01:00
Jonathan Perkin
7107d01282 Fix syntax. 2010-03-19 16:26:33 +01:00
Jonathan Perkin
423daa45ca First cut at SVR4 layout. 2010-03-19 15:34:42 +01:00
Jonathan Perkin
f56e58ea92 Fixes from wlad 2010-03-18 21:06:12 +01:00
Vladislav Vaintroub
c8e32a8331 Bug #52149 - packaging differences in CMake build
Corrected some packaging bugs:
- install mysqlservices library
- install libmysqlclient_r.so.{16,16.0.0} as links
  to libmysqlclient.so
- install libmysqld-debug.a
- install my_safe_process, my_safe_kill and
  symlinks to mysql-test-run.pl (mtr, mysql-test-run)
  into correct place ${INSTALL_MYSQLTESTDIR}


cmake/install_layout.cmake:
  Fix typo
cmake/install_macros.cmake:
  Refactor INSTALL_SYMLINK to allow arbitrary symlink paths.
  Old version of this macro would make link extension the same 
  as in target. This was not sufficient in some scenarios 
  (would not allow for example libmysqlclient_r.so.16=>./libmysqlclient.so 
  link)
libmysql/CMakeLists.txt:
  Install extra symlinks to libmysqlclient.so
  (libmysqlclient_r.so.16 and libmysqlclient_r.so.16.0.0)
  for backward compatiblity.
libmysqld/CMakeLists.txt:
  install libmysqld-debug.a
libservices/CMakeLists.txt:
  install mysqlservices library
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
  install my_safe_process, my_safe_kill into  correct place
2010-03-17 19:56:22 +01:00
Vladislav Vaintroub
402cab754a Fix typo (CMAKE_SIZEOF_VOIDP=>CMAKE_SIZEOF_VOID_P) 2010-03-08 00:31:06 +01:00
Vladislav Vaintroub
87a1ad6310 merge 2010-03-03 15:48:54 +01:00
Vladislav Vaintroub
cd03a4625f Bug #51488 :missing features and change behavior in cmake runs compared to
autotools runs
- Fix recognition of --with-debug=full in configure wrapper
- Remove CMakeCache.txt in configure wrapper, to match the original
- Fix recognition of max-no-ndb
- Fix broken dependencies of mysql_fix_privilege_table.sql from 
  mysql_system_tables.sql and mysql_system_tables_fix.sql
- Add "distclean target" that informs user about appropriate bzr command



cmake/configure.pl:
  - Recognize --with-debug=full, map to WITH_DEBUG_FULL
  - remove CMakeCache.txt, so the configuration is no more sticky
  (to match the original configure behavior)
cmake/plugin.cmake:
  - Recognize WITH_MAX_NO_NDB, this fixes missing storage engines after BUILD/*max-no-ndb scripts
mysql-test/CMakeLists.txt:
  test-force uses the same macros (MTR_FORCE) as test-bt* now
scripts/CMakeLists.txt:
  - Fix broken dependency when producing mysql_fix_privilege_tables.sql, reported by Davi.
  We now concatenate 2 scripts in custom command that
  has dependency on both scripts rather than concatenating them at cmake time.
sql/CMakeLists.txt:
  Address frequently asked question "where is distclean" by implementing distclean target 
  that does nothing except pointing to appropriate 
  bzr command.
  
  It is better not to call "bzr clean-tree" automatically, without user consent.
  It could clean new files that were meant to be added.
2010-03-03 12:29:34 +01:00
Alexander Nozdrin
accce6be6e Auto-merge from mysql-next-mr. 2010-02-25 22:58:57 +03:00
Vladislav Vaintroub
46800354ab Workaround crash with dtraced shared libraries under GCC 3.4.6 on 32 bit Solaris.
Crash happens in dlopen() code when trying to load the library. Crash does not happen when library is 
not DTrace instrumented . Additionally, crash does not happen with default Solaris 10 GCC 3.4.3 and
it does not happen if main executable is instrumented.

So , just check for this specific situation (32 bit, GCC3.4.6 , Solaris) and disable Dtrace in shared libraries.
We have only single plugin so far that is instrumented (ha_example)
2010-02-25 17:31:31 +01:00
Vladislav Vaintroub
527ff458aa On Solaris, overwrite CMake's proposed thread library -lthread with -lpthread.
-lthread works fine in most cases, but at least with gcc 3.4.6 on x86, dlopen() crashes when libpthread is not used. 
Note : the workaround existed prior and did not work  since CMAKE_THREADS_LIBS_INIT was already
 in cache.  Now, use SET(.. CACHE FORCE)  to overwrite the cached value.
2010-02-25 10:57:23 +01:00
Alexander Barkov
a98481354e After-fix for WL#1213
Fixing cmake files.
2010-02-25 12:15:46 +04:00
Vladislav Vaintroub
aa52602008 merge 2010-02-24 20:11:34 +01:00
Jonathan Perkin
46b22d5e5d Some CMake packaging fixes:
- Remove INSTALL-BINARY from installed docs directory, we provide a copy
   in the root directory (but perhaps this should be revisited later).

 - Disable audit_null and daemon_example plugins.

 - Fix the docs directory.

 - Remove mysql-test/Makefile.in

 - Build and install mysql_tzinfo_to_sql

 - Remove share/charsets/languages.html
2010-02-24 19:19:24 +00:00
Vladislav Vaintroub
bcebd97306 #51466 : Source packages are broken with cmake in a cmake-agnostic environment
In the worst case possible scenario (no bzr, in-source build),
make dist produced a package that compiled ok with autotools
but failed to package because extra make_binary_distribution was
found in source package and was not built. make_binary_distribution
contained paths of the build machine.

Fix:  exclude some scripts that are produced in cmake build. 
Note that there is no good general fix for it in this specific scenario.
it is advisable to build source packages out of source or in bzr repo.
2010-02-24 20:07:05 +01:00
Vladislav Vaintroub
60c7cc878f Fix --with-ssl mappping (--with-ssl=dir should be "yes" or
actually "system"), --with-ssl should be "bundled".

Fixes error on sol-gcc-x86, where build machine had  openssl but not
the test box.
2010-02-24 19:51:45 +01:00
Vladislav Vaintroub
e56246390b remove whitespace at the end of line in Makefile.am, to keep BUILD/autorun.sh silent 2010-02-23 14:28:06 +01:00
Vladislav Vaintroub
a4af6e8708 Bug #51414: Arguments with embedded spaces are not correctly handled by configure wrapper.
The bug was that ./configure was  passing paramers to subscripts as $@, and to handle embedded spaces it needs
to be quoted as "$@".
This resulting into a bug when ./configure was called e.g with CFLAGS='-m64 -Xstrconst'..

Additionally, fixed cmake/configure.pl did not handle environment variables passed on the command line.
this is fixed in this push
2010-02-23 12:32:57 +01:00
Vladislav Vaintroub
71f8615fd6 Fix BUILD/compile-pentium64-xxx scripts, when ccache is present.
Fix contains of :
-  splitting CC/CXX if there are more that 2 space-delimited tokens, add the rest to CFLAGS
(in this case CC was set to "ccache gcc --pipe", and this broke recognition of gcc compiler
as CMake understands CC consisting of 2 space delimited tokens but not more)

-  add my_new.cc to mysys fle list if C++ operator new is not found. Always, not only
for gcc  (the original problem was that missing operator new when compiling with CXX=gcc)
2010-02-22 20:55:27 +01:00
Vladislav Vaintroub
740c7cf4fa Install static client and embedded debug libraries 2010-02-20 20:40:03 +01:00
Vladislav Vaintroub
5f833a39ed extend configure-like perl wrapper for INSTALL_FOODIR variables 2010-02-20 14:17:55 +01:00
Vladislav Vaintroub
e4cb186c6b SET FN_NO_CASE_SENSE to 1 on Windows 2010-02-20 02:12:01 +01:00
Vladislav Vaintroub
1e533aef35 fix typo 2010-02-17 00:27:45 +01:00
Vladislav Vaintroub
f68e8aa860 Fix a couple fo things replated to MSI 2010-02-16 16:06:57 +01:00
Vladislav Vaintroub
14e563ce5f check for poll.h 2010-02-14 20:30:41 +01:00
Vladislav Vaintroub
3bd236fefb Add components to INSTALL, some eraly Wix support 2010-02-10 20:23:24 +01:00
Vladislav Vaintroub
784d4a4718 merge 2010-02-06 17:16:24 +01:00
Vladislav Vaintroub
7257047dce merge 2010-02-06 17:13:42 +01:00
Vladislav Vaintroub
7ffdc1d301 fix OSX package names is OSX_DEPLOYMENT_TARGET is specified 2010-02-05 07:39:11 +01:00
Vladislav Vaintroub
8c9c24310b When using SIGNCODE parameter, check that signing of test executable reaööy works.
If not,  write warning and disable signing

Also, set SIGNCODE in mysql_release build configuration.
2010-02-02 21:32:38 +01:00
Vladislav Vaintroub
c2e1fdf561 Define feature sets that correspond to different products (advanced, pro, enterprise etc) 2010-02-02 02:24:57 +01:00
Vladislav Vaintroub
d82df66e1f Do not run checks for strtok_r on Windows - we know the function is not there.. 2010-01-29 03:29:33 +01:00
vvaintroub
6580cdb27b Add windows system check cache that prevents tests from running, most are irrelevant anyway
Add cached variable WITH_XXX_STORAGE_ENGINE for dynamic plugins that can be static or 
dynamic.
2010-01-29 03:07:00 +01:00
Vladislav Vaintroub
9632ea7475 do not redefine CPACK_PACKAGE_FILE_NAME, if it is already given 2010-01-28 11:30:21 +01:00
Vladislav Vaintroub
9cabc9fd8a prettification of package names and fix compile bug on OSX/ppc 2010-01-28 11:09:05 +01:00
Vladislav Vaintroub
eb81868421 Fix issues around MYSQL_TCP_PORT_DEFAULT (should be really 0 all the time) 2010-01-27 14:23:33 +01:00
Vladislav Vaintroub
24b6ae2d0b Added AIX, OS400 and Cygwin.
This finishes of moving code from configure.cmake IF()'s to platform specific files
2010-01-27 02:52:04 +01:00
Vladislav Vaintroub
90d4e963f1 merge 2010-01-27 01:54:41 +01:00
Vladislav Vaintroub
0a6fe4fb84 fix default architecture flag (v8) on sparc32 gcc that prevent mysql from compilng, add HPUX.cmake 2010-01-27 01:50:19 +01:00
Vladislav Vaintroub
6625d6b905 Fix failing test cases on pushbuild 2010-01-26 23:47:57 +01:00
Vladislav Vaintroub
cdb8cafb27 Fixed typos and failed mysqld--help test. 2010-01-26 22:05:41 +01:00
Vladislav Vaintroub
bc80c38a54 Move FreeBSD specific hacks to cmake/os/FreeBSD.cmake 2010-01-26 18:13:37 +01:00
Vladislav Vaintroub
3241885f90 Move OSX specific checks to cmake/os/Darwin.cmake 2010-01-26 18:09:14 +01:00
Vladislav Vaintroub
62bc68a054 WL#5161: Following Mats' suggestion, moved Solaris specific workaround to cmake/os/SunOS.cmake
cmake/os/SunOS.cmake:
  WL#5161: Moved Solaris specific  workaround to cmake/os/SunOS.cmake
2010-01-26 15:43:53 +00:00
Vladislav Vaintroub
7ce02039af WL#5161, implement Mats' suggeston to move platform specifics into own files
under cmake/os. This patch does it for Linux
2010-01-26 15:56:50 +01:00
Vladislav Vaintroub
a8c47397fc WL#5161: Implement Mats' suggestion of moving OS specific CMake code to OS specific files, instead of
polluting code with IF(CMAKE_SYSTEM_NAME MATCHES...), first on Windows.

cmake/libutils.cmake:
  Fix the case in MERGE_LIBRARIES, where  there is no dependency on OS libraries.
cmake/os/Windows.cmake:
  Move windows specific code to cmake/os/Windows.cmake
configure.cmake:
  Move some Windows code to cmake/os/Windows.cmake
2010-01-26 13:47:34 +01:00
Vladislav Vaintroub
9129685e51 merge, add plugin/audit_null/CMakeLists.txt 2010-01-26 05:39:48 +01:00
Vladislav Vaintroub
32f0a54628 In standalone package, default data subdirectory is "data", not "var" 2010-01-25 13:12:29 +01:00
Vladislav Vaintroub
135c25d165 Fix smaller stuff: disable transitive linking for MERGE_LIBRARIES results,
compile embedded with PIC to allow linking with shared libraries
2010-01-25 02:52:32 +01:00
Vladislav Vaintroub
c514d75ebb Handle different installation layouts.
using  cmake option INSTALL_LAYOUT=STANDALONE would produce the layout as in 
tar.gz or zip packages.
INSTALL_LAYOUT=UNIX will produce unixish install layout  (with mysqld being in sbin subdirectory , libs in lib/mysql etc). This layout is used for RPM packages.

Subtle differences in both packages unfortunately lead to the need to recompile MySQL to use with other package type - as otherwise for example default plugins or data directories would be wrong set.

There are numerous other variables that  allow fine-tuning packaging layout. (INSTALL_BINDIR, INSTALL_LIBDIR , INSTALL_PLUGINDIR etc).

This options are different from autotools as they do not expect full paths to directories, but only subdirectory of CMAKE_INSTALL_PREFIX.

There are 2 special options that expect full directory paths
- MYSQL_DATADIR that defines default MYSQL data directory (autotools equivalent
is --localstatedir)
- SYSCONFDIR  can be added to search my.cnf search path (autotools equivalent is --sysconfdir)
2010-01-24 16:23:16 +01:00
Vladislav Vaintroub
6e84defdd4 Add -lmtmalloc to server linker flags on Solaris 10
and later
2010-01-20 17:21:38 +00:00
Vladislav Vaintroub
bc61d6e840 Add Solaris sparc Sun Studio flags 2010-01-20 00:28:47 +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
5d61e31d4d Fix end-of-line characters in mysql_release.cmake to be unix-conform
make -DBUILD_CONFIG=mysql_release work
2010-01-19 02:21:48 +00:00
Vladislav Vaintroub
6b596534c0 Add compiler flags used by the buildteam to do release 2010-01-19 01:47:51 +01:00
Vladislav Vaintroub
0bdd08d996 Fix output name of embedded library,
honor OUTPUT_NAME in MERGE_LIBRARIES macro
2010-01-15 19:07:45 +01:00
Kent Boortz
2ed249e9e0 Added support for product names in package names 2010-01-15 15:11:59 +01:00
Vladislav Vaintroub
8807608561 use _GNU_SOURCE on Linux to have all useful definitions (pthread_rwlock_t) for example 2010-01-13 16:52:14 +01:00