mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added --log-basename to mysqld to allow one to set the prefix for all logs with one command
Changed test suite to use --log-basename (to get the code tested) Added --sync-sys=1 to test suite to speed it up. Better error messages if something goes wrong with mysql_install_db mysql-test/Makefile.am: Removed not existing directory mysql-test/lib/My/ConfigFactory.pm: Use log-basename We had to also set 'log_error' as some test was explicitely using the old name Added 'sync-sys=1' to speed up test suite mysql-test/r/variables-notembedded.result: Updated test results (variable relay_log is now set) mysql-test/suite/binlog/t/binlog_delete_and_flush_index-master.opt: Force specific names for some log files. mysql-test/suite/binlog/t/binlog_index-master.opt: Force specific names for some log files. mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt: Force specific names for some log files. mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test: Better error message if something goes wrong mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Updated results mysql-test/suite/rpl/rpl_1slave_base.cnf: Use --log-basename scripts/mysql_install_db.sh: More information to --help Write url to knowledge base if something goes wrong Fail at once if we can't create a database directory (no reason to continue and write a screenful of not related text) scripts/mysqld_safe.sh: Also allow one to use --data for --datadir (common shortening) Added support for --log-basename Fail at once if we can't create a log directory Fixed bug where we used a pid file name without '.pid' extension sql/log.cc: Create a log file name trough my_once_alloc() (To get it automaticly freed at exit) sql/mysql_priv.h: Added new prototype sql/mysqld.cc: Added support for --log-basename Better help for a lot of log-filename related variables. sql/rpl_rli.cc: Write information that one can use --log-basename sql/set_var.cc: Add log_basename as a readonly variable
This commit is contained in:
@ -86,7 +86,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
|
||||
suite/federated \
|
||||
suite/pbxt/t suite/pbxt/r suite/pbxt \
|
||||
suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc \
|
||||
suite/oqgraph suite/oqgraph/t suite/oqgraph/r suite/oqgraph/include \
|
||||
suite/oqgraph suite/oqgraph/t suite/oqgraph/r \
|
||||
suite/percona suite/sphinx \
|
||||
suite/funcs_1 suite/funcs_1/bitdata \
|
||||
suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
|
||||
|
@ -200,6 +200,7 @@ my @mysqld_rules=
|
||||
(
|
||||
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
|
||||
{ 'tmpdir' => \&fix_tmpdir },
|
||||
{ 'log-basename' => sub { return "mysqld" } },
|
||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||
{ 'language' => \&fix_language },
|
||||
{ 'datadir' => \&fix_datadir },
|
||||
@ -208,6 +209,7 @@ my @mysqld_rules=
|
||||
{ 'port' => \&fix_port },
|
||||
{ '#extra-port' => \&fix_port },
|
||||
{ 'socket' => \&fix_socket },
|
||||
{ 'log-error' => \&fix_log_error },
|
||||
{ '#log-error' => \&fix_log_error },
|
||||
{ 'general-log' => sub { return 1; } },
|
||||
{ 'general-log-file' => \&fix_log },
|
||||
@ -216,6 +218,7 @@ my @mysqld_rules=
|
||||
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
|
||||
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
|
||||
{ 'server-id' => \&fix_server_id, },
|
||||
{ 'sync-sys' => sub { return 1; } },
|
||||
# By default, prevent the started mysqld to access files outside of vardir
|
||||
{ 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } },
|
||||
{ 'ssl-ca' => \&fix_ssl_ca },
|
||||
|
@ -33,12 +33,12 @@ ERROR HY000: Variable 'log_slave_updates' is a read only variable
|
||||
#
|
||||
SHOW VARIABLES like 'relay_log';
|
||||
Variable_name Value
|
||||
relay_log
|
||||
relay_log mysqld-relay-bin
|
||||
SELECT @@session.relay_log;
|
||||
ERROR HY000: Variable 'relay_log' is a GLOBAL variable
|
||||
SELECT @@global.relay_log;
|
||||
@@global.relay_log
|
||||
NULL
|
||||
mysqld-relay-bin
|
||||
SET @@session.relay_log= 'x';
|
||||
ERROR HY000: Variable 'relay_log' is a read only variable
|
||||
SET @@global.relay_log= 'x';
|
||||
@ -46,12 +46,12 @@ ERROR HY000: Variable 'relay_log' is a read only variable
|
||||
#
|
||||
SHOW VARIABLES like 'relay_log_index';
|
||||
Variable_name Value
|
||||
relay_log_index
|
||||
relay_log_index mysqld-relay-bin.index
|
||||
SELECT @@session.relay_log_index;
|
||||
ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable
|
||||
SELECT @@global.relay_log_index;
|
||||
@@global.relay_log_index
|
||||
NULL
|
||||
mysqld-relay-bin.index
|
||||
SET @@session.relay_log_index= 'x';
|
||||
ERROR HY000: Variable 'relay_log_index' is a read only variable
|
||||
SET @@global.relay_log_index= 'x';
|
||||
|
@ -0,0 +1 @@
|
||||
--log-bin=master-bin --log-bin-index=master-bin
|
@ -1 +1 @@
|
||||
--force-restart --skip-stack-trace --test-expect-abort --log-warnings=0
|
||||
--force-restart --skip-stack-trace --test-expect-abort --log-warnings=0 --log-bin=master-bin --log-bin-index=master-bin
|
||||
|
@ -1 +1 @@
|
||||
--binlog-ignore-db=b42851 --log-error
|
||||
--binlog-ignore-db=b42851 --log-error --log-bin=master-bin --log-bin-index=master-bin
|
||||
|
@ -101,6 +101,7 @@ if(!`select LENGTH('$log_error_')`)
|
||||
# does not know the location of its .err log, use default location
|
||||
let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
}
|
||||
|
||||
# Assign env variable LOG_ERROR
|
||||
let LOG_ERROR=$log_error_;
|
||||
|
||||
@ -109,8 +110,9 @@ let LOG_ERROR=$log_error_;
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
use Cwd;
|
||||
my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
|
||||
open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
|
||||
open(FILE, "$log_error") or die("Unable to open '$log_error' from directory " . cwd() . "\n");
|
||||
my $count = () = grep(/Bug#46265/g,<FILE>);
|
||||
print "Occurrences: $count\n";
|
||||
close(FILE);
|
||||
|
@ -2,7 +2,7 @@ include/rpl_init.inc [topology=1->2->1]
|
||||
show variables like 'relay_log%';
|
||||
Variable_name Value
|
||||
relay_log master-relay-bin
|
||||
relay_log_index
|
||||
relay_log_index master-relay-bin.index
|
||||
relay_log_info_file relay-log.info
|
||||
relay_log_purge ON
|
||||
relay_log_space_limit 0
|
||||
|
@ -6,8 +6,9 @@
|
||||
# Run the master.sh script before starting this process
|
||||
#!run-master-sh
|
||||
|
||||
log-bin= master-bin
|
||||
relay-log= master-relay-bin
|
||||
log-basename= master
|
||||
# log-bin= master-bin
|
||||
# relay-log= master-relay-bin
|
||||
|
||||
[mysqld.2]
|
||||
# Run the slave.sh script before starting this process
|
||||
@ -17,7 +18,8 @@ relay-log= master-relay-bin
|
||||
# starting the mysqld
|
||||
#!use-slave-opt
|
||||
|
||||
relay-log= slave-relay-bin
|
||||
log-basename= slave
|
||||
# relay-log= slave-relay-bin
|
||||
|
||||
init-rpl-role= slave
|
||||
log-slave-updates
|
||||
|
Reference in New Issue
Block a user