two bugs in mysql_config:
1. flags like -Werror=format were not stipped out
2. one-pass s/// command was used that could not remove all matching flags
(e.g. s/ A */ /g cannot remove all A's in " 1 2 A A A A A 4 5 ")
1. move cflags/libs cleanup from mysql_config.sh (runtime)
to for_client.cmake (build time). Include/library paths are
still calculated at runtime (they depend on the location of mysql_config)
2. Use cleaned-up cflags/libs to generate mariadb.pc
3. remove obsolete @expansions@ from mysql_config (for variables that are
never set in cmake files)
~40% bugfixed(*) applied
~40$ bugfixed reverted (incorrect or we're not buggy)
~20% bugfixed applied, despite us being not buggy
(*) only changes in the server code, e.g. not cmakefiles
Bug #18382225 MYSQL_CONFIG CAN'T HANDLE RELOCABLE PACKAGES THAT USES "LIB64" OR "-64" SUFFIX
'lib' is hardcoded into mysql_config, so 'cmake -DINSTALL_LIBDIR=lib64' will not work.
Use INSTALL_LIBDIR when generating mysql_config.
mysql_config may be renamed to e.g. mysql_config-32, fix the basedir pattern matching.
'mysql_config --libs' outputs -L/path/to/library
on SunOS we also want it to output '-R/path/to/library'
in order to find libraries at runtime.
cmake/libutils.cmake:
Add an informational message, to show dependencies on OS libraries.
mysql_config:
- add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path,
for #include <mysql/plugin.h> to work
scripts/mysql_config.sh:
- don't support headers in */include anymore. only in */include/mysql
- remove the incorrect "bug fix" (fixed correctly long time ago)
- add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path,
for #include <mysql/plugin.h> to work
- but don't do it, if $pkgincludedir/.. is /usr/include
BUILD/SETUP.sh:
By default, build also with innodb-plugin
mysql-test/mysql-test-run.pl:
Also search in lib64 directory for plugins (This is used at least on OpenSuse 12.1 when using default build scripts)
mysql-test/r/lock_multi.result:
Allow test to be re-run even if it crashed.
mysql-test/t/lock_multi.test:
Allow test to be re-run even if it crashed.
scripts/make_binary_distribution.sh:
Ensure that libexecdir is named libexec (was not on OpenSuse 12.1)
scripts/mysql_config.sh:
Fixed detection of lib64 was used.
The 'mysql' include sub-directory was copied directly into
include/ rather than retaining its own directory.
Fix this, and update mysql_config which needs additional
logic to detect the correct prefix for includes.
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
starting via mysqld_safe
Rather than hardcode the plugin directory, enhance mysql_config
to fix plugin path when running a relocated install, and use it
to provide the plugin directory to mysqld_safe.
Unresolved reference to 'innodb_system_libs' in "mysql_config"
In 5.4.2, we use InnoDB 1.0.4 which does file IO via separate
threads, opposed to the use of asynchronous IO previously.
So there is no InnoDB call to "aio_read()" which was searched
in "librt", causing a "-lrt" value of "innodb_system_libs",
that whole variable is gone.
This fix was applied in the build of 5.4.2-beta.
scripts/Makefile.am:
There is no "innodb_system_libs" variable any more,
so it cannot be replaced by its value.
scripts/mysql_config.pl.in:
InnoDB does not need any platform-specific libraries any more,
"innodb_system_libs" may go.
scripts/mysql_config.sh:
InnoDB does not need any platform-specific libraries any more,
"innodb_system_libs" may go.
mysql_config did not output -ldl (or equivalent) when needed for --libmysqld-libs,
so its output could be insufficient to build an application using the embedded
server.
LIBDL was already set in configure; it's now propagated all the way into the
relevant mysql_config scripts.
scripts/Makefile.am:
We "manually" replace configure's constants in .sh scripts using sed,
so AC_SUBST() alone is not good enough. Add LIBDL to the substitution
list; we'll be needing it for mysql_config --libmysqld-libs
scripts/mysql_config.pl.in:
Add LIBDL (usually -ldl) to output of mysql_config --libmysqld-libs (perl version)
scripts/mysql_config.sh:
Add LIBDL (usually -ldl) to output of mysql_config --libmysqld-libs (shell version)
into trift2.:/MySQL/M51/push-5.1
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
scripts/mysql_config.sh:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/unireg.h:
Auto merged
into kaamos.(none):/data/src/opt/mysql-5.1-opt
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/func_time.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
scripts/mysql_config.sh:
Manual merge.
sql-common/client.c:
Manual merge.
sql/sql_parse.cc:
Manual merge.
into kaamos.(none):/data/src/opt/mysql-5.0-opt
client/mysql.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
scripts/mysql_config.sh:
Manual merge.
into chorlton.adsl.perkin.org.uk:/Users/jonathan/mysql/bk/build/5.1
libmysqld/Makefile.am:
Auto merged
scripts/Makefile.am:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysql_config.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/unireg.h:
Auto merged
mysql_config --cflags gave a flag that forced the HP/UX
C++ compiler into C-mode; as a result, C++ sources could
not be compiled correctly.
We now filter out the offending flag (like we do for Sun)
so that --cflags will work for both C and C++.
scripts/mysql_config.sh:
Add -AC99 (for HP/UX) to the list of flags we need to remove
from "mysql_config --cflags" so they work for C and C++ both.
Add -lmygcc to mysql_config output for libs, libs_r, and embedded_libs.
Required when linking against our static libs, if yassl is used, and gcc
used to build library is significantly different from that which is using
the library.
scripts/mysql_config.sh:
Add -lmygcc to --libs, --libs_r, and --embedded-libs output, if libmygcc.a
is found in the pkglibdir.
This works around a problem when linking against the static client
libs which were built with a different GCC than the current compiler.
In this case, without -lmygcc, several builtin functions (e.g.,
__pure_virtual, __builtin_delete) are left undefined. Currently it
is yassl which pulls in these symbols.
This isn't a problem when linking against shared libraries, or when
using the same compiler version.
Currently it shows up with libs built on build.mysql.com with gcc 2.95.3,
when using them on more recent systems.
Also strip the -mcpu, -mtune, and -march cflags. The calling package can
determine what optimization parameters to choose.
and allow override for binary distributions. Extend mysql_config
to print compiled-in plugin location for third-party plugins to
use. Resolves bug#31736.
libmysqld/Makefile.am:
Use pkgplugindir.
plugin/daemon_example/Makefile.am:
Use pkgplugindir.
plugin/fulltext/Makefile.am:
Use pkgplugindir.
scripts/Makefile.am:
Add pkgplugindir.
scripts/make_binary_distribution.sh:
Add pkgplugindir.
scripts/mysql_config.sh:
Add pkgplugindir.
sql/Makefile.am:
Use pkgplugindir.
sql/mysqld.cc:
Use PLUGINDIR, derived from pkgplugindir, instead of
LIBDIR for plugins.
sql/unireg.h:
Use PLUGINDIR instead of LIBDIR, and define to be the
default setting of pkgplugindir.
storage/innobase/Makefile.am:
Use pkgplugindir.
storage/archive/Makefile.am:
Use pkgplugindir.
storage/blackhole/Makefile.am:
Use pkgplugindir.
storage/example/Makefile.am:
Use pkgplugindir.
storage/federated/Makefile.am:
Use pkgplugindir.
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
client/mysql.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysql_upgrade.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqladmin.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlbinlog.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlcheck.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqldump.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlimport.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqlmanagerc.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
configure.in:
Bug #15327: configure: --with-tcp-port option being partially ignored
If MYSQL_TCP_PORT defaulted in configure (factory default 3306
at the time of this writing), set MYSQL_TCP_PORT to factory
default, then clear factory default after. That way, we lose no
information, and we can distinguish between "defaulted" and the
pathological case "builder specifically configured a port that
coincides with factory default." This can in theory happen if
builder configures and builds several servers from a script
(--with-tcp-port=3306, --with-tcp-port=3316, --with-tcp-port=3326).
Not all that probable, but much preferable to having more "magic"
happen in the server when we can solve this without any guesswork.
client/mysqlshow.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
client/mysqltest.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
include/mysql_version.h.in:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
libmysql/libmysql.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
initialize default tcp port for client, like so:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
- environment variable MYSQL_TCP_PORT overrides this default
- command-line option overrides all of the above
mysql-test/Makefile.am:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
mysql-test/mysql-test-run-shell.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
set up MYSQL_TCP_PORT if not already set in environment:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
netware/mysql_test_run.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
netware/mysqld_safe.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
scripts/Makefile.am:
Bug #15327: configure: --with-tcp-port option being partially ignored
make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
if build-time configured with a different default. (0 if unchanged)
scripts/mysql_config.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
set up MYSQL_TCP_PORT if not already set in environment:
- if user configured --with-tcp-port, use that value as default
- otherwise assume "use a good default": search mysqld/tcp in
/etc/services; if that doesn't exist, use factory default (3306)
scripts/mysql_fix_privilege_tables.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
clarifying notice only
scripts/mysqld_safe-watch.sh:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
server-tools/instance-manager/priv.h:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
sql/mysqld.cc:
Bug #15327: configure: --with-tcp-port option being partially ignored
if builder specifically requested a default port, use that
(even if it coincides with our factory default).
only if they didn't do we check /etc/services (and, failing
on that, fall back to the factory default of 3306).
either default can be overridden by the environment variable
MYSQL_TCP_PORT, which in turn can be overridden with command
line options.
tests/mysql_client_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear
tests/ssl_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
account for non-standard default port-no. configured at build-time
tests/thread_test.c:
Bug #15327: configure: --with-tcp-port option being partially ignored
make help on --port a little more clear