Commit 58a75bb1 authored by Michael Widenius's avatar Michael Widenius

Automerge with 5.1

parents 99b79db5 a8267117
...@@ -1936,3 +1936,5 @@ sql/client_plugin.c ...@@ -1936,3 +1936,5 @@ sql/client_plugin.c
*.dgcov *.dgcov
libmysqld/create_options.cc libmysqld/create_options.cc
storage/pbxt/bin/xtstat storage/pbxt/bin/xtstat
mysql-test/mtr_command
scripts/convert-debug-for-diff
...@@ -91,8 +91,8 @@ path=`dirname $0` ...@@ -91,8 +91,8 @@ path=`dirname $0`
get_make_parallel_flag get_make_parallel_flag
# SSL library to use.--with-ssl will select our bundled yaSSL # SSL library to use.--with-ssl will select our bundled yaSSL
# implementation of SSL. To use openSSl you will nee too point out # implementation of SSL. To use OpenSSL you will need to specify
# the location of openSSL headers and lbs on your system. # the location of OpenSSL headers and libs on your system.
# Ex --with-ssl=/usr # Ex --with-ssl=/usr
SSL_LIBRARY=--with-ssl SSL_LIBRARY=--with-ssl
...@@ -182,8 +182,7 @@ max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max" ...@@ -182,8 +182,7 @@ max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache" max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent" max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent"
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent" max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent"
# Disable NDB in maria max builds all_configs="$SSL_LIBRARY --with-plugins=max --with-plugin-ndbcluster --with-embedded-server --with-libevent"
max_configs=$max_no_ndb_configs
# #
# CPU and platform specific compilation flags. # CPU and platform specific compilation flags.
......
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$amd64_cflags $debug_cflags"
extra_configs="$amd64_configs $debug_configs $all_configs"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $all_configs"
extra_configs="$extra_configs "
CC="$CC --pipe"
. "$path/FINISH.sh"
...@@ -156,6 +156,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0, ...@@ -156,6 +156,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0,
static my_bool debug_info_flag, debug_check_flag, batch_abort_on_error; static my_bool debug_info_flag, debug_check_flag, batch_abort_on_error;
static my_bool column_types_flag; static my_bool column_types_flag;
static my_bool preserve_comments= 0; static my_bool preserve_comments= 0;
static my_bool in_com_source, aborted= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length; static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0; static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static uint my_end_arg; static uint my_end_arg;
...@@ -1088,6 +1089,7 @@ int main(int argc,char *argv[]) ...@@ -1088,6 +1089,7 @@ int main(int argc,char *argv[])
"\\N [\\d]> ",MYF(MY_WME)); "\\N [\\d]> ",MYF(MY_WME));
current_prompt = my_strdup(default_prompt,MYF(MY_WME)); current_prompt = my_strdup(default_prompt,MYF(MY_WME));
prompt_counter=0; prompt_counter=0;
aborted= 0;
outfile[0]=0; // no (default) outfile outfile[0]=0; // no (default) outfile
strmov(pager, "stdout"); // the default, if --pager wasn't given strmov(pager, "stdout"); // the default, if --pager wasn't given
...@@ -1282,8 +1284,10 @@ sig_handler mysql_end(int sig) ...@@ -1282,8 +1284,10 @@ sig_handler mysql_end(int sig)
/* /*
This function handles sigint calls This function handles sigint calls
If query is in process, kill query If query is in process, kill query
If 'source' is executed, abort source command
no query in process, terminate like previous behavior no query in process, terminate like previous behavior
*/ */
sig_handler handle_sigint(int sig) sig_handler handle_sigint(int sig)
{ {
char kill_buffer[40]; char kill_buffer[40];
...@@ -1322,7 +1326,8 @@ sig_handler handle_sigint(int sig) ...@@ -1322,7 +1326,8 @@ sig_handler handle_sigint(int sig)
mysql_close(kill_mysql); mysql_close(kill_mysql);
tee_fprintf(stdout, "Ctrl-C -- query killed. Continuing normally.\n"); tee_fprintf(stdout, "Ctrl-C -- query killed. Continuing normally.\n");
interrupted_query= 0; interrupted_query= 0;
if (in_com_source)
aborted= 1; // Abort source command
return; return;
err: err:
...@@ -1886,7 +1891,7 @@ static int read_and_execute(bool interactive) ...@@ -1886,7 +1891,7 @@ static int read_and_execute(bool interactive)
String buffer; String buffer;
#endif #endif
char *line; char *line= 0;
char in_string=0; char in_string=0;
ulong line_number=0; ulong line_number=0;
bool ml_comment= 0; bool ml_comment= 0;
...@@ -1894,7 +1899,7 @@ static int read_and_execute(bool interactive) ...@@ -1894,7 +1899,7 @@ static int read_and_execute(bool interactive)
bool truncated= 0; bool truncated= 0;
status.exit_status=1; status.exit_status=1;
for (;;) while (!aborted)
{ {
if (!interactive) if (!interactive)
{ {
...@@ -4074,17 +4079,19 @@ static int com_source(String *buffer, char *line) ...@@ -4074,17 +4079,19 @@ static int com_source(String *buffer, char *line)
status.file_name=source_name; status.file_name=source_name;
glob_buffer.length(0); // Empty command buffer glob_buffer.length(0); // Empty command buffer
ignore_errors= !batch_abort_on_error; ignore_errors= !batch_abort_on_error;
in_com_source= 1;
error= read_and_execute(false); error= read_and_execute(false);
ignore_errors= save_ignore_errors; ignore_errors= save_ignore_errors;
status=old_status; // Continue as before status=old_status; // Continue as before
in_com_source= aborted= 0;
my_fclose(sql_file,MYF(0)); my_fclose(sql_file,MYF(0));
batch_readline_end(line_buff); batch_readline_end(line_buff);
/* /*
If we got an error during source operation, don't abort the client If we got an error during source operation, don't abort the client
if ignore_errors is set if ignore_errors is set
*/ */
if (error && batch_abort_on_error && ignore_errors) if (error && !batch_abort_on_error && ignore_errors)
error= -1; error= -1; // Ignore error
return error; return error;
} }
......
...@@ -71,8 +71,8 @@ static struct my_option my_long_options[] = ...@@ -71,8 +71,8 @@ static struct my_option my_long_options[] =
&opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0, &opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir, "Directory for character set files.", (char**) &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, {"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"check-only-changed", 'C', {"check-only-changed", 'C',
......
...@@ -211,8 +211,8 @@ static struct my_option my_long_options[] = ...@@ -211,8 +211,8 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir, "Directory for character set files.", (char**) &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"comments", 'i', "Write additional information.", {"comments", 'i', "Write additional information.",
&opt_comments, &opt_comments, 0, GET_BOOL, NO_ARG, &opt_comments, &opt_comments, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
...@@ -242,8 +242,8 @@ static struct my_option my_long_options[] = ...@@ -242,8 +242,8 @@ static struct my_option my_long_options[] =
{"debug", '#', "This is a non-debug version. Catch this and exit.", {"debug", '#', "This is a non-debug version. Catch this and exit.",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log.", &default_dbug_option, {"debug", '#', "Output debug log.", (char**) &default_dbug_option,
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0, &debug_check_flag, &debug_check_flag, 0,
......
...@@ -73,8 +73,8 @@ static struct my_option my_long_options[] = ...@@ -73,8 +73,8 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir, "Directory for character set files.", (char**) &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", &default_charset, "Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
......
...@@ -55,8 +55,8 @@ static struct my_option my_long_options[] = ...@@ -55,8 +55,8 @@ static struct my_option my_long_options[] =
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", &default_dbug_option, {"debug", '#', "Output debug log", (char**) &default_dbug_option,
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"defaults-file", 'c', "Like --config-file, except: if first option, " {"defaults-file", 'c', "Like --config-file, except: if first option, "
"then read this file only, do not read global or per-user config " "then read this file only, do not read global or per-user config "
......
...@@ -807,10 +807,10 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -807,10 +807,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
#endif #endif
/* get memory in huncs */ /* get memory in huncs */
#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) #define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
/* Typical record cash */ /* Typical record cache */
#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) #define RECORD_CACHE_SIZE (uint) (128*1024-MALLOC_OVERHEAD)
/* Typical key cash */ /* Typical key cache */
#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) #define KEY_CACHE_SIZE (uint) (128L*1024L*1024L-MALLOC_OVERHEAD)
/* Default size of a key cache block */ /* Default size of a key cache block */
#define KEY_CACHE_BLOCK_SIZE (uint) 1024 #define KEY_CACHE_BLOCK_SIZE (uint) 1024
......
...@@ -63,13 +63,14 @@ nobase_test_DATA = \ ...@@ -63,13 +63,14 @@ nobase_test_DATA = \
lib/My/SafeProcess.pm \ lib/My/SafeProcess.pm \
lib/My/File/Path.pm \ lib/My/File/Path.pm \
lib/My/SysInfo.pm \ lib/My/SysInfo.pm \
lib/My/Suite.pm \
lib/My/CoreDump.pm \ lib/My/CoreDump.pm \
lib/My/SafeProcess/Base.pm \ lib/My/SafeProcess/Base.pm \
lib/My/SafeProcess/safe_process.pl lib/My/SafeProcess/safe_process.pl
SUBDIRS = lib/My/SafeProcess SUBDIRS = lib/My/SafeProcess
EXTRA_DIST = README \ EXTRA_DIST = README README.suites \
$(test_SCRIPTS) \ $(test_SCRIPTS) \
$(nobase_test_DATA) $(nobase_test_DATA)
...@@ -101,7 +102,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \ ...@@ -101,7 +102,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/ndb suite/ndb/t suite/ndb/r \ suite/ndb suite/ndb/t suite/ndb/r \
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \ suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \ suite/parts suite/parts/t suite/parts/r suite/parts/inc \
suite/pbxt/t suite/pbxt/r \ suite/pbxt/t suite/pbxt/r suite/pbxt \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \ suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc \ 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/oqgraph/include \
......
...@@ -18,7 +18,7 @@ the test suite expects you to provide the names of the tests to run. ...@@ -18,7 +18,7 @@ the test suite expects you to provide the names of the tests to run.
For example, here is the command to run the "alias" and "analyze" tests For example, here is the command to run the "alias" and "analyze" tests
with an external server: with an external server:
mysql-test-run --extern alias analyze mysql-test-run --extern socket=/tmp/mysql.sock alias analyze
To match your setup, you might also need to provide --socket, --user, and To match your setup, you might also need to provide --socket, --user, and
other relevant options. other relevant options.
......
These are the assorted notes that will be turned into a manual eventually.
==========================
Tests are organized in suites.
A "suite" is a subdirectory inside, one of,
<basedir>/mysql-test/suite
<basedir>/mysql-test
<basedir>/share/mysql-test/suite
<basedir>/share/mysql-test
<basedir>/share/mysql/mysql-test/suite
<basedir>/share/mysql/mysql-test
<basedir>/storage/*/mysql-test-suites
This is supposed to cover running mtr from a source directory and installed.
==========================
A suite contains *.test and *.result files. They can be in the t/ and r/
subdirectories under the suitedir or directly in the suitedir
(that is suitedir/t/*.test or suitedir/*.test, same for *.result))
==========================
A suite can contain a suite.opt file - at the same location where .test
files are. As usual, the .opt file can use $-substitutions for the
environment variables.
Usually, using my.cnf template (see below) is preferrable.
==========================
A suite can have suite.pm file in the suitedir. It must declare a
package that inherits from My::Suite.
The suite.pm needs to have @ISA=qw(My::Suite) and it must end
with bless {}; - that is it must return an object of that class.
It can also return a string - in this case all tests in the suite
will be skipped, with this string being printed as a reason.
A suite class can define config_files() and servers() methods.
A config_files method returns a list of additional config files (besides
my.cnf), that this suite needs to be created. For every file it specifies
a function that will create it, when given a My::Config object. For example:
sub config_files { ( 'config.ini' => \&write_ini,
'new.conf' => \&do_new_conf ) }
A servers method returns a list of processes that needs to be started for
this suite. A process is specified as a pair (regex, hash). A regex must
match a section in the my.cnf template (for example, qr/mysqld\./ corresponds
to all mysqld processes), a hash contains these options:
SORT => a number, processes are started in the order of increasing SORT
values (and stopped in the reverse order). mysqld has number 300.
START => a function to start a process. It takes two arguments,
My::Config::Group and My::Test. If START is undefined the process
will not be started.
WAIT => a function waits for the process to be started. It takes
My::Config::Group as an argument. Internallys mtr first invokes
START for all processes, then WAIT for all started processes.
example: sub servers { ( qr/^foo$/ => { SORT => 200,
START => \&start_foo,
WAIT => \&wait_foo } ) }
See sphinx suite for an example.
==========================
A suite can have my.cnf template file in the suitedir.
A my.cnf template uses a normal my.cnf syntax - groups, options,
and values - with templating extensions. They are
* There can be groups with non-standard names, not used by mysqld.
These groups may be used by the suite.pm file somehow.
For example, they can be written to the additional config files.
See sphinx suite for an example.
* There can be ENV group. It sets values for the environment variables.
* Values can refer to each other - they will be expanded as needed.
A reference to a value of an option looks like @groupname.optionname.
For example
[mysqld.2]
master-port= @mysqld.1.port
it sets the master-port in the mysqld.2 group to the value of
port in the mysqld.1 group.
* An option name may start from '#'. In the resulting my.cnf it will look
like a comment, but it still can be referred to. For example:
[example]
#foo = localhost:@mysqld.1.port
bar = http://@example.#foo/index.html
* There are two special - in this regard - groups.
Via the ENV group one can refer to any environment variable, not only
to values in the [ENV] group of my.cnf file.
Via the OPT group one can refer to special values:
@OPT.vardir - a path to vardir
@OPT.port - a new port number is reserved out of the pool. It will not
match any other port number used by this test run.
See sphinx suite for an example.
Most probably a suite my.cnf will need to start from
!include include/default_my.cnf
and then modify the configuration as necessary.
==========================
A suite can have combinations file in the suitedir. It uses my.cnf syntax
but it cannot use @-substitutions. Instead, it can use $-substitutions for
the environment variables. Because the combination options will not be
merged to a my.cnf, but will be added to the command line. Example:
[conf1]
opt1=val1
[conf2]
opt1=val2
opt2=$HAVE_SOMETHING
Such a file will cause every test from the suite to be run twice - once
with mysqld using --opt1=val1 and the other one with mysqld using
--opt1=val2 --opt2=$HAVE_SOMETHING
One can limit mtr run to a subset of combinations by setting environment
variable SUITENAME_COMBINATIONS to the ':'-separated set of combination
names. E.g.
RPL_COMBINATIONS=mix:row ./mtr --suite rpl
See innodb_plugin suite for an example of how suite.pm may set this variable
to exclude unsupported configurations.
==========================
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
# Run the master.sh script before starting this process # Run the master.sh script before starting this process
#!run-master-sh #!run-master-sh
log-bin= master-bin
[mysqlbinlog] [mysqlbinlog]
disable-force-if-open disable-force-if-open
......
...@@ -13,9 +13,10 @@ key_buffer_size= 1M ...@@ -13,9 +13,10 @@ key_buffer_size= 1M
sort_buffer= 256K sort_buffer= 256K
max_heap_table_size= 1M max_heap_table_size= 1M
loose-skip-innodb
loose-skip-pbxt
loose-innodb_data_file_path= ibdata1:10M:autoextend loose-innodb_data_file_path= ibdata1:10M:autoextend
slave-net-timeout=120 slave-net-timeout=120
log-bin=mysqld-bin
disable_query_log;
--require r/true.require
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'example';
enable_query_log;
disable_query_log; if (!`SELECT count(*) FROM information_schema.engines WHERE
--require r/true.require (support = 'YES' OR support = 'DEFAULT') AND
select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb'; engine = 'innodb'`){
enable_query_log; skip Needs innodb engine;
}
disable_query_log; if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS
--require r/true.require WHERE PLUGIN_NAME = 'innodb' AND PLUGIN_STATUS = 'active' AND
SELECT (plugin_library LIKE 'ha_innodb_plugin%' OR plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active'; (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%' OR PLUGIN_DESCRIPTION LIKE '%xtradb%')`) {
enable_query_log; skip Need InnoDB plugin or XtraDB;
}
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# #
# source include/have_log_bin.inc; # source include/have_log_bin.inc;
source include/not_embedded.inc;
-- require r/have_log_bin.require -- require r/have_log_bin.require
disable_query_log; disable_query_log;
show variables like 'log_bin'; show variables like 'log_bin';
......
...@@ -6,7 +6,6 @@ use strict; ...@@ -6,7 +6,6 @@ use strict;
use warnings; use warnings;
use Carp; use Carp;
sub new { sub new {
my ($class, $option_name, $option_value)= @_; my ($class, $option_name, $option_value)= @_;
my $self= bless { name => $option_name, my $self= bless { name => $option_name,
...@@ -61,7 +60,7 @@ sub insert { ...@@ -61,7 +60,7 @@ sub insert {
$option->{value}= $value; $option->{value}= $value;
} }
else { else {
my $option= My::Config::Option->new($option_name, $value); $option= My::Config::Option->new($option_name, $value);
# Insert option in list # Insert option in list
push(@{$self->{options}}, $option); push(@{$self->{options}}, $option);
# Insert option in hash # Insert option in hash
...@@ -163,6 +162,62 @@ sub if_exist { ...@@ -163,6 +162,62 @@ sub if_exist {
return $option->value(); return $option->value();
} }
package My::Config::Group::ENV;
our @ISA=qw(My::Config::Group);
use strict;
use warnings;
use Carp;
sub new {
my ($class, $group_name)= @_;
bless My::Config::Group->new($group_name), $class;
}
#
# Return value for an option in the group, fail if it does not exist
#
sub value {
my ($self, $option_name)= @_;
my $option= $self->option($option_name);
if (! defined($option) and defined $ENV{$option_name}) {
my $value= $ENV{$option_name};
$option= My::Config::Option->new($option_name, $value);
}
croak "No option named '$option_name' in group '$self->{name}'"
if ! defined($option);
return $option->value();
}
package My::Config::Group::OPT;
our @ISA=qw(My::Config::Group);
use strict;
use warnings;
use Carp;
sub new {
my ($class, $group_name)= @_;
bless My::Config::Group->new($group_name), $class;
}
sub options {
my ($self)= @_;
()
}
sub value {
my ($self, $option_name)= @_;
my $option= $self->option($option_name);
croak "No option named '$option_name' in group '$self->{name}'"
if ! defined($option);
return $option->value()->();
}
package My::Config; package My::Config;
...@@ -182,7 +237,10 @@ sub new { ...@@ -182,7 +237,10 @@ sub new {
my ($class, $path)= @_; my ($class, $path)= @_;
my $group_name= undef; my $group_name= undef;
my $self= bless { groups => [] }, $class; my $self= bless { groups => [
My::Config::Group::ENV->new('ENV'),
My::Config::Group::OPT->new('OPT'),
] }, $class;
my $F= IO::File->new($path, "<") my $F= IO::File->new($path, "<")
or croak "Could not open '$path': $!"; or croak "Could not open '$path': $!";
...@@ -199,19 +257,13 @@ sub new { ...@@ -199,19 +257,13 @@ sub new {
} }
# Magic #! comments # Magic #! comments
elsif ( $line =~ /^#\!/) { elsif ( $line =~ /^(#\!\S+)(?:\s*(.*?)\s*)?$/) {
my $magic= $line; my ($magic, $arg)= ($1, $2);
croak "Found magic comment '$magic' outside of group" croak "Found magic comment '$magic' outside of group"
unless $group_name; unless $group_name;
#print "$magic\n"; #print "$magic\n";
$self->insert($group_name, $magic, undef); $self->insert($group_name, $magic, $arg);
}
# Comments
elsif ( $line =~ /^#/ || $line =~ /^;/) {
# Skip comment
next;
} }
# Empty lines # Empty lines
...@@ -236,7 +288,7 @@ sub new { ...@@ -236,7 +288,7 @@ sub new {
} }
# <option> # <option>
elsif ( $line =~ /^([\@\w-]+)\s*$/ ) { elsif ( $line =~ /^(#?[\w-]+)\s*$/ ) {
my $option= $1; my $option= $1;
croak "Found option '$option' outside of group" croak "Found option '$option' outside of group"
...@@ -247,7 +299,7 @@ sub new { ...@@ -247,7 +299,7 @@ sub new {
} }
# <option>=<value> # <option>=<value>
elsif ( $line =~ /^([\@\w-]+)\s*=\s*(.*?)\s*$/ ) { elsif ( $line =~ /^(#?[\w-]+)\s*=\s*(.*?)\s*$/ ) {
my $option= $1; my $option= $1;
my $value= $2; my $value= $2;
...@@ -256,10 +308,17 @@ sub new { ...@@ -256,10 +308,17 @@ sub new {
#print "$option=$value\n"; #print "$option=$value\n";
$self->insert($group_name, $option, $value); $self->insert($group_name, $option, $value);
} else {
croak "Unexpected line '$line' found in '$path'";
} }
# Comments
elsif ( $line =~ /^#/ || $line =~ /^;/) {
# Skip comment
next;
}
else {
croak "Unexpected line '$line' found in '$path'";
}
} }
undef $F; # Close the file undef $F; # Close the file
...@@ -437,44 +496,4 @@ sub exists { ...@@ -437,44 +496,4 @@ sub exists {
return defined($option); return defined($option);
} }
# Overload "to string"-operator with 'stringify'
use overload
'""' => \&stringify;
#
# Return the config as a string in my.cnf file format
#
sub stringify {
my ($self)= @_;
my $res;
foreach my $group ($self->groups()) {
$res .= "[$group->{name}]\n";
foreach my $option ($group->options()) {
$res .= $option->name();
my $value= $option->value();
if (defined $value) {
$res .= "=$value";
}
$res .= "\n";
}
$res .= "\n";
}
return $res;
}
#
# Save the config to named file
#
sub save {
my ($self, $path)= @_;
my $F= IO::File->new($path, ">")
or croak "Could not open '$path': $!";
print $F $self;
undef $F; # Close the file
}
1; 1;
...@@ -57,16 +57,12 @@ sub fix_pidfile { ...@@ -57,16 +57,12 @@ sub fix_pidfile {
sub fix_port { sub fix_port {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
my $hostname= $group->value('#host'); return $self->{PORT}++;
return $self->{HOSTS}->{$hostname}++;
} }
sub fix_host { sub fix_host {
my ($self)= @_; my ($self)= @_;
# Get next host from HOSTS array 'localhost'
my @hosts= keys(%{$self->{HOSTS}});;
my $host_no= $self->{NEXT_HOST}++ % @hosts;
return $hosts[$host_no];
} }
sub is_unique { sub is_unique {
...@@ -229,7 +225,7 @@ if (IS_WINDOWS) ...@@ -229,7 +225,7 @@ if (IS_WINDOWS)
sub fix_ndb_mgmd_port { sub fix_ndb_mgmd_port {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
my $hostname= $group->value('HostName'); my $hostname= $group->value('HostName');
return $self->{HOSTS}->{$hostname}++; return $self->{PORT}++;
} }
...@@ -428,20 +424,24 @@ sub post_check_embedded_group { ...@@ -428,20 +424,24 @@ sub post_check_embedded_group {
sub resolve_at_variable { sub resolve_at_variable {
my ($self, $config, $group, $option)= @_; my ($self, $config, $group, $option)= @_;
local $_ = $option->value();
my ($res, $after);
# Split the options value on last . while (m/(.*?)\@((?:\w+\.)+)(#?[-\w]+)/g) {
my @parts= split(/\./, $option->value()); my ($before, $group_name, $option_name)= ($1, $2, $3);
my $option_name= pop(@parts); $after = $';
my $group_name= join('.', @parts); chop($group_name);
$group_name =~ s/^\@//; # Remove at
my $from_group= $config->group($group_name) my $from_group= $config->group($group_name)
or croak "There is no group named '$group_name' that ", or croak "There is no group named '$group_name' that ",
"can be used to resolve '$option_name'"; "can be used to resolve '$option_name'";
my $from= $from_group->value($option_name); my $value= $from_group->value($option_name);
$config->insert($group->name(), $option->name(), $from) $res .= $before.$value;
}
$res .= $after;
$config->insert($group->name(), $option->name(), $res)
} }
...@@ -453,7 +453,7 @@ sub post_fix_resolve_at_variables { ...@@ -453,7 +453,7 @@ sub post_fix_resolve_at_variables {
next unless defined $option->value(); next unless defined $option->value();
$self->resolve_at_variable($config, $group, $option) $self->resolve_at_variable($config, $group, $option)
if ($option->value() =~ /^\@/); if ($option->value() =~ /\@/);
} }
} }
} }
...@@ -595,28 +595,18 @@ sub new_config { ...@@ -595,28 +595,18 @@ sub new_config {
croak "you must pass '$required'" unless defined $args->{$required}; croak "you must pass '$required'" unless defined $args->{$required};
} }
# Fill in hosts/port hash
my $hosts= {};
my $baseport= $args->{baseport};
$args->{hosts}= [ 'localhost' ] unless exists($args->{hosts});
foreach my $host ( @{$args->{hosts}} ) {
$hosts->{$host}= $baseport;
}
# Open the config template # Open the config template
my $config= My::Config->new($args->{'template_path'}); my $config= My::Config->new($args->{'template_path'});
my $extra_template_path= $args->{'extra_template_path'};
if ($extra_template_path){
$config->append(My::Config->new($extra_template_path));
}
my $self= bless { my $self= bless {
CONFIG => $config, CONFIG => $config,
ARGS => $args, ARGS => $args,
HOSTS => $hosts, PORT => $args->{baseport},
NEXT_HOST => 0,
SERVER_ID => 1, SERVER_ID => 1,
}, $class; }, $class;
# add auto-options
$config->insert('OPT', 'port' => sub { fix_port($self, $config) });
$config->insert('OPT', 'vardir' => sub { shift->{ARGS}->{vardir} });
{ {
# Run pre rules # Run pre rules
......
File mode changed from 100755 to 100644
...@@ -120,7 +120,7 @@ sub new { ...@@ -120,7 +120,7 @@ sub new {
my $input = delete($opts{'input'}); my $input = delete($opts{'input'});
my $output = delete($opts{'output'}); my $output = delete($opts{'output'});
my $error = delete($opts{'error'}); my $error = delete($opts{'error'});
my $verbose = delete($opts{'verbose'}); my $verbose = delete($opts{'verbose'}) || $::opt_verbose;
my $nocore = delete($opts{'nocore'}); my $nocore = delete($opts{'nocore'});
my $host = delete($opts{'host'}); my $host = delete($opts{'host'});
my $shutdown = delete($opts{'shutdown'}); my $shutdown = delete($opts{'shutdown'});
......
# A default suite class that is used for all suites without their owns suite.pm
# see README.suites for a description
package My::Suite;
sub config_files { () }
sub servers { () }
bless { };
...@@ -20,6 +20,12 @@ sub new { ...@@ -20,6 +20,12 @@ sub new {
return $self; return $self;
} }
sub fullname {
my ($self)= @_;
$self->{name} . (defined $self->{combination}
? " '$self->{combination}'"
: "")
}
# #
# Return a unique key that can be used to # Return a unique key that can be used to
......
This diff is collapsed.
...@@ -61,14 +61,10 @@ sub _name { ...@@ -61,14 +61,10 @@ sub _name {
sub _mtr_report_test_name ($) { sub _mtr_report_test_name ($) {
my $tinfo= shift; my $tinfo= shift;
my $tname= $tinfo->{name}; my $tname= $tinfo->fullname();
return unless defined $verbose; return unless defined $verbose;
# Add combination name if any
$tname.= " '$tinfo->{combination}'"
if defined $tinfo->{combination};
print _name(). _timestamp(); print _name(). _timestamp();
printf "%-40s ", $tname; printf "%-40s ", $tname;
my $worker = $tinfo->{worker}; my $worker = $tinfo->{worker};
......
This diff is collapsed.
drop database if exists events_test;
drop database if exists events_test2;
drop table if exists t1;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=example;
drop table t1;
...@@ -1809,5 +1809,22 @@ SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a; ...@@ -1809,5 +1809,22 @@ SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
MAX(t2.a) MAX(t2.a)
2 2
DROP TABLE t1, t2; DROP TABLE t1, t2;
CREATE TABLE t1 (a int(11) NOT NULL);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (
key_col int(11) NOT NULL,
KEY (key_col)
);
INSERT INTO t2 VALUES (1),(2);
select min(t2.key_col) from t1,t2 where t1.a=1;
min(t2.key_col)
1
select min(t2.key_col) from t1,t2 where t1.a > 1000;
min(t2.key_col)
NULL
select min(t2.key_col)+1 from t1,t2 where t1.a> 1000;
min(t2.key_col)+1
NULL
drop table t1,t2;
# #
# End of 5.1 tests # End of 5.1 tests
...@@ -59,3 +59,26 @@ FROM t3 WHERE 1 = 0 GROUP BY 1; ...@@ -59,3 +59,26 @@ FROM t3 WHERE 1 = 0 GROUP BY 1;
(SELECT 1 FROM t1,t2 WHERE t2.b > t3.b) (SELECT 1 FROM t1,t2 WHERE t2.b > t3.b)
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
End of 5.0 tests. End of 5.0 tests.
CREATE TABLE t1 (col_int_nokey int(11) NOT NULL, col_varchar_nokey varchar(1) NOT NULL) engine=myisam;
INSERT INTO t1 VALUES (2,'s'),(0,'v'),(2,'s');
CREATE TABLE t2 (
pk int(11) NOT NULL AUTO_INCREMENT,
`col_int_key` int(11) NOT NULL,
col_varchar_key varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY `col_int_key` (`col_int_key`),
KEY `col_varchar_key` (`col_varchar_key`)
) ENGINE=MyISAM;
INSERT INTO t2 VALUES (4,10,'g'), (5,20,'v');
SELECT t1.col_int_nokey,(SELECT MIN( t2_a.col_int_key ) FROM t2 t2_a, t2 t2_b, t1 t1_a WHERE t1_a.col_varchar_nokey = t2_b.col_varchar_key and t1.col_int_nokey ) as sub FROM t1;
col_int_nokey sub
2 10
0 NULL
2 10
SELECT t1.col_int_nokey,(SELECT MIN( t2_a.col_int_key ) +1 FROM t2 t2_a, t2 t2_b, t1 t1_a WHERE t1_a.col_varchar_nokey = t2_b.col_varchar_key and t1.col_int_nokey ) as sub FROM t1;
col_int_nokey sub
2 11
0 NULL
2 11
DROP TABLE t1,t2;
End of 5.1 tests.
create table t1 (id int) engine=NDB; create table t1 (id int) engine=InnoDB;
Warnings: Warnings:
Warning 1286 Unknown table engine 'NDB' Warning 1286 Unknown table engine 'InnoDB'
Warning 1266 Using storage engine MyISAM for table 't1' Warning 1266 Using storage engine MyISAM for table 't1'
alter table t1 engine=NDB; alter table t1 engine=InnoDB;
Warnings: Warnings:
Warning 1286 Unknown table engine 'NDB' Warning 1286 Unknown table engine 'InnoDB'
drop table t1; drop table t1;
SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='ndbcluster'; SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='InnoDB';
ENGINE SUPPORT ENGINE SUPPORT
ndbcluster NO InnoDB NO
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='InnoDB';
PLUGIN_NAME='ndbcluster';
PLUGIN_NAME PLUGIN_STATUS PLUGIN_NAME PLUGIN_STATUS
ndbcluster DISABLED InnoDB DISABLED
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# BINLOG statement does not work in embedded mode. # BINLOG statement does not work in embedded mode.
source include/have_log_bin.inc;
source include/not_embedded.inc; source include/not_embedded.inc;
disable_warnings; disable_warnings;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
# Related bugs: BUG#27779, BUG#31581, BUG#31582, BUG#31583, BUG#32407 # Related bugs: BUG#27779, BUG#31581, BUG#31582, BUG#31583, BUG#32407
source include/have_log_bin.inc;
source include/not_embedded.inc; source include/not_embedded.inc;
--disable_warnings --disable_warnings
......
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
CREATE DATABASE federated;
CREATE DATABASE federated;
#
# Bug #32426: FEDERATED query returns corrupt results for ORDER BY
# on a TEXT column
#
CREATE TABLE federated.t1(a TEXT);
INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de');
CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
SELECT * FROM federated.t1 ORDER BY A;
a
abc
de
f
gh
ijk
SELECT * FROM federated.t1 ORDER BY A DESC;
a
ijk
gh
f
de
abc
DROP TABLE federated.t1;
DROP TABLE federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
source federated.inc;
--echo #
--echo # Bug #32426: FEDERATED query returns corrupt results for ORDER BY
--echo # on a TEXT column
--echo #
connection slave;
CREATE TABLE federated.t1(a TEXT);
INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de');
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
SELECT * FROM federated.t1 ORDER BY A;
SELECT * FROM federated.t1 ORDER BY A DESC;
DROP TABLE federated.t1;
connection slave;
DROP TABLE federated.t1;
connection default;
source federated_cleanup.inc;
...@@ -213,7 +213,7 @@ id name ...@@ -213,7 +213,7 @@ id name
alter server s1 options (database 'db_bogus'); alter server s1 options (database 'db_bogus');
flush tables; flush tables;
select * from federated.t1; select * from federated.t1;
ERROR 42000: Got error: 1044 : Access denied for user 'test_fed'@'localhost' to database 'db_bogus' ERROR 42000: Received error: 1044 : Access denied for user 'test_fed'@'localhost' to database 'db_bogus'
drop server if exists 's1'; drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options create server 's1' foreign data wrapper 'mysql' options
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
[mysqld.1] [mysqld.1]
log-bin= master-bin log-bin= master-bin
loose-federated
[mysqld.2] [mysqld.2]
loose-federated
[ENV] [ENV]
MASTER_MYPORT= @mysqld.1.port MASTER_MYPORT= @mysqld.1.port
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
--source include/not_embedded.inc --source include/not_embedded.inc
# This test depends on having the PBXT information_schema stuff. # This test depends on having the PBXT information_schema stuff.
--source include/have_pbxt.inc --source include/have_pbxt.inc
--source include/have_innodb.inc
--source include/have_xtradb.inc --source include/have_xtradb.inc
let $my_where = WHERE table_schema = 'information_schema' let $my_where = WHERE table_schema = 'information_schema'
......
--binlog_cache_size=32768 --innodb_lock_wait_timeout=1 --binlog_cache_size=32768 --loose-innodb_lock_wait_timeout=1
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
--innodb-autoinc-lock-mode=0 --loose-innodb-autoinc-lock-mode=0
--innodb --innodb_autoinc_lock_mode=0 --loose-innodb --loose-innodb_autoinc_lock_mode=0
--innodb-file-per-table=1 --loose-innodb-file-per-table=1
--innodb_lock_wait_timeout=1 --loose-innodb_lock_wait_timeout=1
--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed --loose-innodb-locks-unsafe-for-binlog --binlog-format=mixed
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_log_bin.inc
create table bug53674(a int)engine=innodb; create table bug53674(a int)engine=innodb;
insert into bug53674 values (1),(2); insert into bug53674 values (1),(2);
......
--innodb_lock_wait_timeout=1 --loose-innodb_lock_wait_timeout=1
--binlog_cache_size=32768 --innodb_lock_wait_timeout=1 --binlog_cache_size=32768 --loose-innodb_lock_wait_timeout=1
--innodb-lock-wait-timeout=2 --loose-innodb-lock-wait-timeout=2
--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1 --loose-innodb_lock_wait_timeout=1 --loose-innodb_rollback_on_timeout=1
--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout --loose-innodb_lock_wait_timeout=2 --loose-innodb_rollback_on_timeout
[innodb_plugin]
ignore-builtin-innodb
plugin-load=$HA_INNODB_PLUGIN_SO
innodb
[xtradb_plugin]
ignore-builtin-innodb
plugin-load=$HA_XTRADB_SO
innodb
[xtradb]
innodb
package My::Suite::InnoDB_plugin;
@ISA = qw(My::Suite);
############# initialization ######################
my @combinations;
push @combinations, 'innodb_plugin' if $ENV{HA_INNODB_PLUGIN_SO};
push @combinations, 'xtradb_plugin' if $ENV{HA_XTRADB_SO};
push @combinations, 'xtradb' if $::mysqld_variables{'innodb'} eq "ON";
return "Neither innodb_plugin nor xtradb are available" unless @combinations;
$ENV{INNODB_PLUGIN_COMBINATIONS}=join ':', @combinations
unless $ENV{INNODB_PLUGIN_COMBINATIONS};
############# return an object ######################
bless { };
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
--binlog_cache_size=32768 --innodb_lock_wait_timeout=1 --binlog_cache_size=32768 --loose-innodb_lock_wait_timeout=1
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
--innodb-use-sys-malloc=true --loose-innodb-use-sys-malloc=true
--innodb-autoinc-lock-mode=0 --loose-innodb-autoinc-lock-mode=0
--innodb --innodb_autoinc_lock_mode=0 --loose-innodb_autoinc_lock_mode=0
--innodb-file-per-table=1 --loose-innodb-file-per-table=1
--innodb_commit_concurrency=1 --loose-innodb_commit_concurrency=1
--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed --log-bin=master-bin --loose-innodb-locks-unsafe-for-binlog --binlog-format=mixed
--innodb_lock_wait_timeout=1 --loose-innodb_lock_wait_timeout=1
--innodb-lock-wait-timeout=2 --loose-innodb-lock-wait-timeout=2
--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1 --loose-innodb_lock_wait_timeout=1 --loose-innodb_rollback_on_timeout=1
--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout --loose-innodb_lock_wait_timeout=2 --loose-innodb_rollback_on_timeout
--innodb --default-storage-engine=innodb --loose-innodb --default-storage-engine=innodb
--innodb_file_per_table=1 --loose-innodb_file_per_table=1
--innodb_lock_wait_timeout=2 --loose-innodb_lock_wait_timeout=2
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
!include include/default_mysqld.cnf !include include/default_mysqld.cnf
[mysqld.1] [mysqld.1]
pbxt
default-storage-engine=pbxt default-storage-engine=pbxt
[ENV] [ENV]
......
--default-storage-engine=pbxt
--innodb_doublewrite_file=ib_doublewrite --loose-innodb_doublewrite_file=ib_doublewrite
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
log-bin= master-bin log-bin= master-bin
loose-innodb
[mysqld.2] [mysqld.2]
# Run the slave.sh script before starting this process # Run the slave.sh script before starting this process
#!run-slave-sh #!run-slave-sh
...@@ -18,7 +16,6 @@ loose-innodb ...@@ -18,7 +16,6 @@ loose-innodb
# starting the mysqld # starting the mysqld
#!use-slave-opt #!use-slave-opt
log-bin= slave-bin
relay-log= slave-relay-bin relay-log= slave-relay-bin
init-rpl-role= slave init-rpl-role= slave
......
--innodb --binlog-ignore-db=db2 --loose-innodb --binlog-ignore-db=db2
--innodb --replicate-do-db=db1 --loose-innodb --replicate-do-db=db1
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
[mysqld.1] [mysqld.1]
log-slave-updates log-slave-updates
innodb loose-innodb
[mysqld.2] [mysqld.2]
log-slave-updates log-slave-updates
innodb loose-innodb
[mysqld.3] [mysqld.3]
log-slave-updates log-slave-updates
innodb loose-innodb
[mysqld.4] [mysqld.4]
log-slave-updates log-slave-updates
innodb loose-innodb
[ENV] [ENV]
SLAVE_MYPORT1= @mysqld.3.port SLAVE_MYPORT1= @mysqld.3.port
......
--innodb-lock-wait-timeout=1 --loose-innodb-lock-wait-timeout=1
--innodb_lock_wait_timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096 --loose-innodb-lock-wait-timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096
--innodb_autoinc_lock_mode=0 --loose-innodb-autoinc-lock-mode=0
--innodb_autoinc_lock_mode=0 --loose-innodb-autoinc-lock-mode=0
--innodb_autoinc_lock_mode=0 --loose-innodb-autoinc-lock-mode=0
--innodb_lock_wait_timeout=60 --loose-innodb-lock-wait-timeout=60
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
# TODO: Remove statement include once 12574 is patched # TODO: Remove statement include once 12574 is patched
--source include/have_binlog_format_mixed_or_statement.inc --source include/have_binlog_format_mixed_or_statement.inc
--source include/master-slave.inc --source include/master-slave.inc
--source include/have_innodb.inc
connection slave;
--source include/have_innodb.inc
connection master;
CALL mtr.add_suppression("Statement may not be safe to log in statement format."); CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
...@@ -506,11 +511,9 @@ sync_slave_with_master; ...@@ -506,11 +511,9 @@ sync_slave_with_master;
connection master; connection master;
source include/master-slave-reset.inc; source include/master-slave-reset.inc;
source include/have_innodb.inc;
connection slave; connection slave;
source include/have_innodb.inc;
connection master; connection master;
create table t1 ( f int ) engine = innodb; create table t1 ( f int ) engine = innodb;
create table log ( r int ) engine = myisam; create table log ( r int ) engine = myisam;
create trigger tr create trigger tr
......
--innodb --loose-innodb
\ No newline at end of file
--innodb --default-storage-engine=innodb --ndbcluster=0 --loose-innodb --default-storage-engine=innodb --ndbcluster=0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment