- 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
Please exclude make_binary_distribution from the distribution
With cmake (5.5 and up), "make package" will do it,
or cpack.
The (generated) "scripts/make_binary_distribution" is just
a wrapper around a "cpack" call,
with path names set at build time.
Similar, "make_win_bin_dist" is not needed any more.
scripts/CMakeLists.txt:
Cleanup:
Append a trailing newline when generating "make_binary_distribution"
(which is just a wrapper around a "cpack" call).
support-files/mysql.spec.sh:
"make_win_bin_dist" is removed from the sources,
so its man page is gone,
and it need not be removed when creating the RPMs.
FAILS, CAUSING CLOBBERED SOCKET
A check for running mysqld instances was failing in mysqld_safe
because of an incorrect shell command generated by cmake. The
problem is that cmake retains the '\' of escaped double-quote,
so the generated mysqld_safe script's command contained \" in
the shell command, and hence the failure.
Fixed the command in scripts\CMakeLists.txt.
scripts/CMakeLists.txt:
BUG#1878394 - MYSQLD_SAFE TEST FOR ALREADY RUNNING PROCESS
FAILS, CAUSING CLOBBERED SOCKET
Removed the escaped quotes and grep for 'grep process' from
the shell commands.
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.
tcmalloc lib (libtcmalloc_minimal.so) is missing from mysql 5.5 binary
Ensure that a "-DMALLOC_LIB=/foo/bar/libtcmalloc_minimal.so"
will ensure that this library gets included in the tar.gz
binary package.
It depends on the build environment to set this variable
to the correct path name, if it is available.
After installation from RPM, server is run under root, not mysql user
The problem was that in the cmake way of building
the variable "MYSQLD_USER" was not set and propagated.
In the script "mysqld_safe" its value is used as the
name of the user who should run the server process.
The fix is to explicitly set this variable to "mysql"
and propagate it in the build process.
It was analyzed and proposed by Jonathan Perkin.
files for cmake had some minor bugs causing this.
per-file comments:
mysql-test/CMakeLists.txt
Bug#54129 Missing the execute bit for scripts
use same permissions as in the source folder
mysql-test/t/disabled.def
Bug#54129 Missing the execute bit for scripts
mysqlhotcopy tests enabled
scripts/CMakeLists.txt
Bug#54129 Missing the execute bit for scripts
chmod +x for the script files
- 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.
- 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
as found necessary during the release build of 5.5.3-m3.
scripts/CMakeLists.txt:
The scripts "mysqldumpslow" and "mysqlhotcopy" need to be handled.
scripts/make_win_bin_dist:
1) We do not create ".map" files any more.
2) Typing error fixed, it isn't "$DISTDIR" but "$DESTDIR".
3) Security fix:
If the argument isn't of the form "dst=src",
then we want the variables to be empty.
The original code would have used an argument "foo"
to set both "$src" and "$dst" to this string,
which doesn't make much sense.
- package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow)
- do not try to pack .map files (no more produced)
- (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute
MY_MUTEX_INIT_FAST
Unquoted ${CMAKE_CPACK_COMMAND} is used in this script.
This variable resolves to cpack's real path with spaces, e.g
/Applications/CMake 2.6.4-app/Contents/bin/cpack.
Script fails due to lack of quotes.
Fix is to use quotes around ${CMAKE_CPACK_COMMAND}.
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.
The problem was incorrect escaping used inside a strnig : in \"$MYSQLD\" was written as "\MYSQL\"
(backslash and quote characters transposed), when defining FIND_PROC variable for BSD or SysV
style "ps" command-
Additionally fixed obvious code duplication and random naming in CHECK_PID test.
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)
-lm is sometimes not linked, which causes errors about undefined rint()
- FreeBSD embedded library does not link with the flags returned by mysql_config
(added -lcrypt to LIBS, whereby causing overlinking in case of normal non-embedded client)