(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.
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.
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.
scripts/make_binary_distribution.sh:
Document that our build system explicitly overrides the @pkgfoo@ (e.g.,
pkgdatadir, pkglibdir, etc.) variables when 'make' is called.
scripts/mysqld_safe.sh:
Replace hard-coded "./share/mysql" with something like
echo @pkgdatadir@ | sed -e s/^@prefix@//.
Since the fix for bug 28544, this has been broken for mysql 5.1+,
where the package data dir is "./share" instead of "./share/mysql".
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
netware/mysql_test_run.c:
Auto merged
sql/mysqld.cc:
Auto merged
storage/ndb/include/ndbapi/Ndb.hpp:
Auto merged
scripts/mysqld_safe.sh:
Manual merge.
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.
debian/po/ca.po:
Change URLs.
debian/po/cs.po:
Change URLs.
debian/po/da.po:
Change URLs.
debian/po/gl.po:
Change URLs.
debian/po/ja.po:
Change URLs.
debian/po/pt_BR.po:
Change URLs.
debian/po/sv.po:
Change URLs.
debian/po/tr.po:
Change URLs.
mysql-test/lib/mtr_report.pl:
Change URLs.
mysql-test/mysql-test-run-shell.sh:
Change URLs.
ndb/include/ndbapi/Ndb.hpp:
Change URLs.
netware/mysql_test_run.c:
Change URLs.
scripts/mysqld_safe.sh:
Change URLs.
sql/mysqld.cc:
Change URLs.
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.
scripts/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.
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.
mysqld_safe.sh: Overhaul the logging design, to allow logging
mysqld messages to syslog. Add --syslog and --skip-syslog
arguments for mysqld_safe.
scripts/mysqld_safe.sh:
Overhaul the logging design, to allow logging mysqld messages to syslog.
Add two new options: --syslog and --skip-syslog. --syslog is the default,
unless --log-error is also specified.
If --log-error is specified (for mysqld_safe, mysqld, server, etc. - any
group which mysqld_safe checks for arguments), then syslog is turned off.
This is because mysqld will get the --log-error argument and log to a file
anyways, which will be confusing to the user. If the user requests both
--syslog and --log-error, a warning is printed (to mysqld_safe's stderr and
to syslog), and we then behave as if --skip-syslog had been specified.
Also, logging messages have been normalized somewhat: mysqld_safe now always
prefixes messages with '<TIMESTAMP> mysqld_safe '. All messages go to the
the console (stdout or stderr, depending on if it's a notice or an error) and
to (the error log OR syslog).
Also, a few cleanups while I'm here.
into rama.(none):/home/jimw/my/mysql-5.1-clean
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
extra/yassl/include/openssl/ssl.h:
Auto merged
extra/yassl/include/yassl_int.hpp:
Auto merged
extra/yassl/src/ssl.cpp:
Auto merged
extra/yassl/src/template_instnt.cpp:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
include/mysql.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/embedded_priv.h:
Auto merged
BitKeeper/deleted/.del-mysql_explain_log.sh~5ddc62808e16bd57:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/mysqldump-max.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_string.h:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/time.cc:
Auto merged
storage/myisam/mi_create.c:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
BitKeeper/deleted/.del-have_case_sensitive_file_system.inc:
Delete: mysql-test/include/have_case_sensitive_file_system.inc
BitKeeper/deleted/.del-case_sensitive_file_system.require:
Delete: mysql-test/r/case_sensitive_file_system.require
mysql-test/lib/mtr_cases.pl:
Resolve conflict
mysql-test/mysql-test-run.pl:
Resolve conflict
mysql-test/r/mysqldump.result:
Resolve conflict
mysql-test/t/mysqldump.test:
Resolve conflict
sql/sql_parse.cc:
Resolve conflict
- Fix mysqld_safe so that it always passes correct --log-error argument to mysqld
- A few other minor clean-ups to mysqld_safe
scripts/mysqld_safe.sh:
Bug #6061 mysql-log-rotate script - error logging doesn't use new file
- Change mysqld_safe to pass --log-error to mysqld in all cases. The old behavior was to usually "swallow" the --log-error=file.name argument, which caused mysqld to write to stderr and not be able to flush the error log file. Ironically, passing --log-error (with no file name) seemed to work fine, because mysqld_safe didn't recognize it and passed it on to mysqld as an unknown option.
- Ensure that the error log file matches what mysqld uses; in particular, add ".err" if given a --log-error argument with no extension, and add "$DATADIR" to the front of a relative path
- Various other mysqld_safe clean-ups while there - quote arguments properly, remove some redundant code
Added --help option, bug#16392
acinclude.m4:
Use "$shrext_cmds" when testing if shared library exists, bug#16332
acinclude.m4:
Use "$shrext_cmds" when testing if shared library exists, bug#16332
scripts/mysqld_safe.sh:
Added --help option, bug#16392
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
scripts/mysqld_safe.sh:
Don't try 'mysqld-max' before 'mysqld' if no server given, bug#17861
mysql-test/mysql-test-run.pl:
Try find in order 'mysqld-nt', 'mysqld', 'mysqld-debug' and 'mysqld-max'
even when --ledir option is specified. (Bug #13774)
scripts/mysqld_safe.sh:
Figure out whether to use mysqld or mysqld-max after we have handled
the command-line options and .cnf files.
into mysql.com:/home/jimw/my/mysql-5.0-clean
extra/perror.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/select.result:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
ndb/src/mgmsrv/main.cpp:
Auto merged
sql/des_key_file.cc:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/select.test:
Resolve conflicts
scripts/mysqld_safe.sh:
Resolve conflict
sql/item.cc:
Resolve conflict, don't return FIELD_TYPE_BLOB since VARCHAR
can be longer in 5.0 than 4.1.
sql/log_event.cc:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Remove incorrect fix (merge from 4.1)
sql/sql_show.cc:
Resolve conflict
different DATADIR via the command line or during ./configure and
still starting up mysqld_safe via a relative path. (Bug #7249)
scripts/mysqld_safe.sh:
Decouple figuring out which BASEDIR and DATADIR to use so that
the only DATADIR we'll try to use without first verifying that
it exists is the compiled-in default.
Only add --defaults-extra-file=$DATADIR/my.cnf if $DATADIR/my.cnf is readable.
scripts/mysqld_safe.sh:
Only add --defaults-extra-file=$DATADIR/my.cnf if $DATADIR/my.cnf is readable.
Without this patch, running mysqld_safe gives:
Could not open required defaults file: /opt/home/tim/m/50/m/data/my.cnf
Fatal error in defaults handling. Program aborted
Could not open required defaults file: /opt/home/tim/m/50/m/data/my.cnf
Fatal error in defaults handling. Program aborted
These errors are printed by my_print_defaults; mysqld also encounters the
same problem and quits.
Build-tools/Do-compile:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/query_cache.result:
Update results
mysql-test/t/query_cache.test:
Merge test
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.
into mysql.com:/home/jwinstead2/mysql-5.0
client/mysqladmin.cc:
Auto merged
client/mysqldump.c:
Auto merged
include/my_pthread.h:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
BitKeeper/etc/ignore:
auto-union
include/my_pthread.h:
Auto merged
innobase/os/os0file.c:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
merged manually
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)
scripts/mysqld_safe.sh:
Don't actually verify that datadir exists when
using relatively-located mysqld -- just assume
that it does and either let it fail when it
doesn't, or do the right thing when datadir
is then set via the command line or my.cnf file.
instead of DATADIR.
include/config-win.h:
Added checks for environment variable MYSQL_HOME
libmysql/Makefile.shared:
Added checks for environment variable MYSQL_HOME
mysys/Makefile.am:
Added checks for environment variable MYSQL_HOME
mysys/default.c:
Removed checks for my.cnf file in datadir, instead added checking
if my.cnf exists in environment variable MYSQL_HOME
scripts/mysqld_multi.sh:
Added checks for my.cnf file in environment variable MYSQL_HOME,
if exists.
scripts/mysqld_safe.sh:
Added checks for my.cnf file in environment variable MYSQL_HOME,
if exists.
Fix calls to my_print_defaults. Some how, --loose-verbose had been added before --no-defaults/defaults-file, which must be the first option.
NOTE: this may make some installations behave differently, if they depend on this broken behavior.
scripts/mysqld_safe.sh:
Fix calls to my_print_defaults. Some how, --loose-verbose had been added before --no-defaults/defaults-file, which must be the first option.
NOTE: this may make some installations behave differently, if they depend on this broken behavior.
for Solaris test, and fix if @IS_LINUX@ test in mysqld_safe itself.
configure.in:
Portability fix for FIND_PROC setting; on Solaris (and
probably others), 'ps -p $$' inside a shell script just
returns 'sh' for command line, even though $0 contains
the filename. So, use 'ps -fp $$' in the test (it shows
the full command line, e.g., 'sh configure'). Leave the
actual FIND_PROC command as-is, since mysqld itself is
not a shell script.
scripts/mysqld_safe.sh:
Portability fix for mysqld_safe on non-Linux systems. A bogus use
of 'if' and 'test' caused non-bash shells to enter a section meant
to be run only on Linux systems.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
bug #5001, added conditional if to test if port set, then only kill the processes
for this port, not all processes (in the case of this bug where multiple servers
are killed.)
The change to the 'grep' to make sure mysqld_safe isn't killed was per Serg's
discovery that mysqld_safe would get killed.
In my testing, in killing one of the pids for a running server, the "if test ! -f $pid_file"
was the case that evaluated as true, so in order to test, I had to comment that block
out.
scripts/mysqld_safe.sh:
bug #5001, added conditional if to test if port set, then only kill the processes
for this port, not all processes (in the case of this bug where multiple servers
are killed.)
The change to the 'grep' to make sure mysqld_safe isn't killed was per Serg's
discovery that mysqld_safe would get killed.
In my testing, in killing one of the pids for a running server, the "if test ! -f $pid_file"
was the case that evaluated as true, so in order to test, I had to comment that block
out.
scripts/mysqld_safe.sh:
don't protect mysqld from multiple --user commands - mysqld can take care of itself
sql/mysqld.cc:
warn about multiple --user parameters only if their arguments differ
Output TIMESTAMP in 4.1 format for 4.1 tables (or for TIMESTAMP(19)) (portability fix)
Fixed that INTERVAL can handle big integers. (Bug #3498)
Fixed that hostname="" works identical as hostname="%" for table/column grants (Bug #3473)
mysql-test/mysql-test-run.sh:
Fixed wrong http address (Bug #3460)
mysql-test/r/func_time.result:
Results for new test cases
mysql-test/t/func_time.test:
Added test of INTERVAL with big integers
scripts/mysqld_safe.sh:
Added html address to manual in case of error
sql/field.cc:
Output TIMESTAMP in 4.1 format for 4.1 tables (or for TIMESTAMP(19))
sql/item_timefunc.cc:
Fixed that INTERVAL can handle big integers. (Bug #3498)
sql/mysql_priv.h:
Removed not needed prototype
sql/sql_acl.cc:
Fixed that hostname="" works identical as hostname="%" for table/column grants (Bug #3473)
Moved GRANT_TABLE::GRANT_TABLE functions ou from class definition to make it possible to debug them
sql/structs.h:
Fix for long values to INTERVAL
started via mysqld_safe (BUG#2114) Thanks to Rodrigo Marchant for the
suggestion
scripts/mysqld_safe.sh:
- fixed early removing of socket file when multiple instances of mysqld are
started via the script (BUG#2114) Thanks to Rodrigo Marchant for the
suggestion
and --defaults-file is a non-existing or non-regular file.
Bug#755
scripts/mysqld_safe.sh:
Added a warning to my_print_defaults if --verbose is given
and --defaults-file is a non-existing or non-regular file.
Bug#755