Commit graph

81 commits

Author SHA1 Message Date
Jonathan Perkin
8f1b881616 We can't rely on mysql_config for core functionality like plugins
as it may be part of a separate package.

Work out the likliest plugin directory using similar logic to the
data directory, and avoid the dependancy.
2010-07-05 22:19:14 +01:00
Jonathan Perkin
18cd34153c bug#52737 plugin_dir is set to /usr/local/mysql/lib/plugin while
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.
2010-06-30 12:19:54 +01:00
Mats Kindahl
c7170276ef BUG#52737: plugin_dir is set to /usr/local/mysql/lib/plugin while starting via mysqld_safe
Incremental patch to fix plugin_dir from .../lib/plugin to .../lib/mysql/plugin.
2010-06-16 11:25:55 +02:00
Alexander Nozdrin
eff442964a Manual merge from mysql-trunk.
Conflicts:
  - mysql-test/r/partition.result
  - mysql-test/r/variables_debug.result
  - mysql-test/t/partition.test
  - mysql-test/t/variables_debug.test
2010-05-20 16:35:28 +04:00
Jonathan Perkin
5b85121ca6 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
Mats Kindahl
7f514f45e6 Bug #52737: plugin_dir is set to /usr/local/mysql/lib/plugin while starting
via mysqld_safe

Plugin dir was set to a hard-coded path instead of relative the base dir.

This patch fixes this by using a path relative the basedir instead of the
plugin directory indicated by the configuration.
2010-05-11 15:55:52 +02:00
Alexey Kopytov
abab51e0db Automerge of mysql-5.1-bugteam to mysql-trunk-merge. 2010-04-11 11:17:42 +04:00
Georgi Kodinov
17a21c4f35 Bug #47095: Can't open_files_limit really be larger than 65535?
Several problems addressed:

1. The maximum value for --open_files_limit on non-windows boxes
is now raised to UINT_MAX (the maximum possible without significant
changes in the code). The maximum value on windows is kept to be
2048 due to a known limitation (bug 24509).

2. mysqld_safe now supports --open_files_limit=xx in addition to 
--open-files-limit=xx

3. mysqld_safe always passes through --open[_-]files[_-]limit
to the underlying mysqld. It used to pass it through only if it 
the user running the script has access to the root directory or
there was an --user argument specified.

4. Fixed a prototype in my_file.c to match its counterpart in 
the other #ifdef branch.
2010-04-09 14:47:18 +03:00
Mats Kindahl
d21fa1426a Bug #51938 plugin_dir gets bad default value
When building the script directory using a CMake-based build, both the
variables in config.h.cmake (including PLUGINDIR) and the variables in
CMakeList.txt (which includes pkgplugindir).

However, for autotools-based builds, only pkgplugindir is substituted,
which means that the plugin-path is not substituted.

This patch solves the problem by using pkgplugindir, which works on both
CMake-based and autotools-based builds, instead of PLUGINDIR.
2010-03-14 21:11:19 +01:00
Mats Kindahl
746965b7e9 Bug #49022: Plugins included into bin release cannot be
installed on debug version of server

When starting a server using mysqld_safe with the option
--mysqld-version=debug, the debug version of the server
is started. When attempting to load a plugin that is not
debug-built, the load will fail because a non-debug built
plugin use, e.g., fastmutex while the debug-built server
uses safemutex.

To solve this problem, mysqld_safe will set the plugin-dir
to use a directory where debug-built plugins are placed.

This patch sets the plugin dir to <plugin-dir>/whatever,
when mysqld-version=whatever, and just <plugin-dir> otherwise.
2010-03-01 23:40:24 +01:00
Vladislav Vaintroub
c827968a2d 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
Guilhem Bichot
408dd52a6a Backport of the fix for BUG#40368 "mysqld_safe not honouring underscore same as dash on server options" from 6.0
(revision-id:guilhem@mysql.com-20090505113602-l12kxupeatve18dh).
Such bug led "mysqld_safe --core_file_size=#" to not work because mysqld_safe wouldn't recognize
that "ulimit -c" is needed; only --core-file-size=# worked. Same for --open_files_limit and other
options with _ where mysqld_safe needs to do something more than passing to mysqld.
Original fix by Erik Ljungstrom erik at ibiblio dot org ; slightly modified here.
Tested on all internally accessible Unix.
2009-11-18 21:36:17 +01:00
timothy.smith@sun.com
768f2cdb6a Add --malloc-lib=LIB option to mysqld_safe to LD_PRELOAD a shared library for mysqld 2009-09-23 01:26:08 +02:00
Staale Smedseng
986bcb5fc6 Bug #44736 mysqld_safe's my_which() is broken and
doesn't find 'logger'

Due to a variable quoting mistake, the $PATH environment
variable isn't parsed correctly when searching for the
existence of the desired executable(s) (logger in this 
case).

This patch removes the quotes.
2009-05-25 18:21:40 +02:00
Jim Winstead
d115236248 mysqld_safe could generate filenames with spaces and then didn't properly
quote them in later use. (Bug #33685, based on a patch by Hartmut Holzgraefe)
2009-05-07 17:25:23 -07:00
Chad MILLER
e7ed43065a Fix several quoting problems, and clean up IFS on failure in my_which(). 2009-03-16 15:28:06 -04:00
Chad MILLER
e53a813352 Bug#39326: mysqld_safe doesn't use --basedir value in search of \
my_print_defaults

Now use basedir to set an unset ledir and to find the location of
my_print_defaults .
2009-03-16 14:54:28 -04:00
tsmith@ramayana.hindu.god
95b791c7af Bug #32679: mysqld_safe looks for errmsg.sys in wrong path
The fix for bug 28544 moved our package data from ./share/mysql
to ./share.  mysqld_safe had the old directory hard-coded.  The
fix is to use the @pkgdatadir@ and @prefix@ values, to adapt to
different ways of building the package.
2007-12-03 18:19:35 -07:00
cmiller@zippy.cornsilk.net
04296df344 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2007-10-08 12:40:21 -04:00
cmiller@zippy.cornsilk.net
eedde95a33 Change URLs.
Our web server has been restructured several times, and references
to it in our source code has stayed the same.  This patch from Paul
DuBois updates all URLs to modern semantics.
2007-10-05 13:16:54 -04:00
jperkin@production.mysql.com
501a930dc6 Finish up last syslog -> want_syslog change missed in r1.91,
fixing bug#30624
2007-08-24 16:40:26 +02:00
tsmith@ramayana.hindu.god
950a482a4b mysqld_safe.sh:
Post-review fix, if 'logger' can't be found, and --syslog is requested, exit with error message instead of fall back to logging to error file.
2007-07-30 13:35:36 -06:00
tsmith@ramayana.hindu.god
091f6a4677 Bug #29992: syslog error logging does not flush
Don't use syslog by default; user will have to request it explicitly with the --syslog option.

Use "sed -u" to get unbuffered output from sed, if it's supported.

Otherwise, don't use sed at all - don't strip the timestamp from mysqld messages.

Also, add new --syslog-tag=FOO option, which adds "-FOO" to the tag used when logging messages to syslog (i.e., mysqld-FOO or mysqld_safe-FOO)

Also, explicitly mention where log messages are going, so user can more easily find them.

Also, check if 'logger' is in the PATH, and log to the error log file if it can't be found.
2007-07-27 17:20:43 -06:00
tsmith@sita.local
63dd4251e4 Bug #29634: mysqld_safe does not set err_log variable, error log file is not created
Dont touch & chmod the err_log file if using syslog (mysqld_safe)
2007-07-09 16:10:43 -06:00
tsmith@sita.local
e345a242f4 mysqld_safe.sh:
Fix a few typos in comments (from Paul DuBois)
2007-07-09 15:30:19 -06:00
tsmith@siva.hindu.god
fd4774c35c Bug #4858: mysql_safe logs to syslog instead of stderr
mysqld_safe.sh: Overhaul the logging design, to allow logging
mysqld messages to syslog.  Add --syslog and --skip-syslog
arguments for mysqld_safe.
2007-05-04 19:06:36 -06:00
mtaylor@qualinost.(none)
e30dfac98b Merge qualinost.(none):/home/mtaylor/src/mysql-4.1-maint
into  qualinost.(none):/home/mtaylor/src/mysql-5.1-maint
2006-12-14 12:21:37 -08:00
mtaylor@qualinost.(none)
b8542e9cd7 Merge qualinost.(none):/home/mtaylor/src/mysql-4.1-maint
into  qualinost.(none):/home/mtaylor/src/mysql-5.0-maint
2006-12-14 12:20:31 -08:00
mtaylor@qualinost.(none)
54e7d71477 Change permissions on $mysql_unix_port_dir if we create it so that everyone can access it. 2006-12-14 12:18:36 -08:00
jimw@rama.(none)
f7e19b40f3 Merge rama.(none):/home/jimw/my/tmp_merge
into  rama.(none):/home/jimw/my/mysql-5.1-clean
2006-07-28 15:51:48 -07:00
tim@siva.hindu.god
bc89c92c37 Bug #6061 mysql-log-rotate script - error logging doesn't use new file
- Fix mysqld_safe so that it always passes correct --log-error argument to mysqld
- A few other minor clean-ups to mysqld_safe
2006-05-10 11:33:36 -06:00
igreenhoe@mysql.com
ed2432494f Fix for bug #17353. 2006-04-17 19:57:50 -07:00
kent@mysql.com
6ce9c90db9 mysqld_safe.sh:
Added --help option, bug#16392
acinclude.m4:
  Use "$shrext_cmds" when testing if shared library exists, bug#16332
2006-03-29 23:51:23 +02:00
kent@mysql.com
550e73cc6e mysql-test-run.pl:
Try find in order 'mysqld-nt', 'mysqld', 'mysqld-debug' and 'mysqld-max'
mysqld_safe.sh:
  Don't try 'mysqld-max' before 'mysqld' if no server given, bug#17861
2006-03-02 22:53:38 +01:00
jimw@mysql.com
bb34222087 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-11-01 12:15:08 -08:00
jimw@mysql.com
1d9bfbf7d2 Handle decision to use mysqld-max over mysqld within mysqld_safe
even when --ledir option is specified. (Bug #13774)
2005-10-31 11:15:44 -08:00
jimw@mysql.com
80c1c6b33f Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 11:05:49 -07:00
jimw@mysql.com
9f4c796922 Fix handling of datadir by mysqld_safe to support specifying a
different DATADIR via the command line or during ./configure and
still starting up mysqld_safe via a relative path. (Bug #7249)
2005-06-24 17:14:16 -07:00
tim@siva.hindu.god
8a77c6f741 scripts/mysqld_safe.sh
Only add --defaults-extra-file=$DATADIR/my.cnf if $DATADIR/my.cnf is readable.
2005-05-27 12:44:06 +12:00
joerg@mysql.com
49ac2dac3e Automerge / manual check of the fixes for NPTL configuration (bug#2173, bug#5871, and bug#9497).
Post-merge fix will follow.
2005-04-26 12:03:37 +02:00
joerg@mysql.com
48ba5e4956 Step 1 of the switch to support configuration with NPTL:
Rename 'IS_LINUX' configuration variable to 'TARGET_LINUX'.
2005-04-20 20:10:28 +02:00
jimw@mysql.com
eaea82d3af Merge query_cache tests 2005-03-11 12:38:38 -08:00
jimw@mysql.com
bb9d7bfc79 Create directory for UNIX socket in mysqld_safe if it doesn't already exist.
(Bug #8513)
2005-03-02 12:19:44 -08:00
jani@ua141d10.elisa.omakaista.fi
6e9b26e8b7 Fixed a compatibility problem.
1) If my.cnf is found in datadir and basedir, give a warning and use the
   one in basedir.
2) If my.cnf is found in datadir, use it, but give a warning.
3) No warning if my.cnf is in basedir.
2005-02-23 18:59:54 +02:00
jimw@mysql.com
70f35fa6da Add --help to mysqld_safe. (Bug #7931) 2005-02-02 19:41:33 -08:00
jimw@mysql.com
5010be1d8b Merge mysql.com:/home/jwinstead2/mysql-4.1-clean
into mysql.com:/home/jwinstead2/mysql-5.0
2005-01-06 21:39:57 +01:00
serg@sergbook.mysql.com
f472cec178 merged 2005-01-06 19:32:16 +02:00
jimw@mysql.com
0ed892f197 Change mysqld_safe search for mysqld relative to the current working directory
to only look for the mysqld binary (and english error strings) and assume the
datadir from that. Then, if that datadir turns out to not exist, startup will
fail. This avoids the behavior where mysqld_safe would go off and run a totally
different binary because the data directory had been moved (even when --datadir
was specified on the command line). (Bug #7249)
2005-01-05 01:08:45 +01:00
jani@ua141d10.elisa.omakaista.fi
81d99da104 Added checking for my.cnf file from environment variable MYSQL_HOME
instead of DATADIR.
2005-01-04 20:13:47 +02:00
jimw@mysql.com
663396653a Use 'ps xaww' in mysqld_safe (on Linux) so whole command-line is searched
for port and/or pid-file parameters. (Bug #5878)
2005-01-04 01:49:29 +01:00