1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
This commit is contained in:
unknown
2005-06-20 09:37:31 +02:00
21 changed files with 274 additions and 762 deletions

View File

@ -82,9 +82,16 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
std_data/%.pem:
std_data/client-key.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/client-cert.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/cacert.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/server-cert.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
std_data/server-key.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
SUFFIXES = .sh

View File

@ -4,6 +4,12 @@
# the $variables is extreme sensitive.
#
###############################################################
# Debug options : To debug this test script
###############################################################
let $showbinlog= 0;
let $manipulate= 1;
######## The typical test sequence
# 1. INSERT without commit
# check table content of master and slave
@ -52,9 +58,12 @@ let $MAX= `SELECT MAX(f1) FROM t1` ;
eval INSERT INTO t1 SET f1= $MAX + 1;
# results before DDL(to be tested)
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
}
sync_slave_with_master;
connection slave;
@ -63,9 +72,12 @@ SELECT '-------- switch to slave --------' as "";
--enable_query_log
# results before DDL(to be tested)
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
}
###############################################################
# command to be tested
@ -79,9 +91,12 @@ eval $my_stmt;
let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
# results after DDL(to be tested)
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
}
sync_slave_with_master;
connection slave;
@ -90,9 +105,12 @@ SELECT '-------- switch to slave --------' as "";
--enable_query_log
# results after DDL(to be tested)
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
}
###############################################################
# ROLLBACK
@ -114,9 +132,12 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
}
sync_slave_with_master;
connection slave;
@ -133,16 +154,17 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log
if ($show_binlog)
{
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
}
###############################################################
# Manipulate binlog
###############################################################
#let $manipulate= 0;
let $manipulate= 1;
while ($manipulate)
if ($manipulate)
{
#### Manipulate the binary logs,
# so that the output of SHOW BINLOG EVENTS IN <current log>
@ -171,7 +193,6 @@ flush logs;
# sleep 1;
# eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
inc $_log_num_n;
let $manipulate= 0;
}
connection master;

View File

@ -126,16 +126,6 @@ sub collect_one_test_case($$$$$) {
return;
}
# FIXME temporary solution, we have a hard coded list of test cases to
# skip if we are using the embedded server
if ( $::glob_use_embedded_server and
mtr_match_any_exact($tname,\@::skip_if_embedded_server) )
{
$tinfo->{'skip'}= 1;
return;
}
# ----------------------------------------------------------------------
# Collect information about test case
# ----------------------------------------------------------------------
@ -171,8 +161,8 @@ sub collect_one_test_case($$$$$) {
my $slave_sh= "$testdir/$tname-slave.sh";
my $disabled= "$testdir/$tname.disabled";
$tinfo->{'master_opt'}= [];
$tinfo->{'slave_opt'}= [];
$tinfo->{'master_opt'}= ["--default-time-zone=+3:00"];
$tinfo->{'slave_opt'}= ["--default-time-zone=+3:00"];
$tinfo->{'slave_mi'}= [];
if ( -f $master_opt_file )
@ -180,9 +170,9 @@ sub collect_one_test_case($$$$$) {
$tinfo->{'master_restart'}= 1; # We think so for now
# This is a dirty hack from old mysql-test-run, we use the opt file
# to flag other things as well, it is not a opt list at all
my $extra_master_opt= mtr_get_opts_from_file($master_opt_file);
$tinfo->{'master_opt'}= mtr_get_opts_from_file($master_opt_file);
foreach my $opt (@$extra_master_opt)
foreach my $opt (@{$tinfo->{'master_opt'}})
{
my $value;
@ -191,7 +181,7 @@ sub collect_one_test_case($$$$$) {
if ( defined $value )
{
$tinfo->{'timezone'}= $value;
$extra_master_opt= [];
$tinfo->{'master_opt'}= [];
$tinfo->{'master_restart'}= 0;
last;
}
@ -206,13 +196,11 @@ sub collect_one_test_case($$$$$) {
{
$tinfo->{'result_file'}.= $::opt_result_ext;
}
$extra_master_opt= [];
$tinfo->{'master_opt'}= [];
$tinfo->{'master_restart'}= 0;
last;
}
}
$tinfo->{'master_opt'}= $extra_master_opt;
}
if ( -f $slave_opt_file )

View File

@ -669,6 +669,8 @@ sub mtr_mysqladmin_shutdown () {
last; # If we got here, we are done
}
sleep(5) if $::glob_win32; # FIXME next startup fails if no sleep
return $res;
}

View File

@ -100,31 +100,6 @@ require "lib/mtr_misc.pl";
$Devel::Trace::TRACE= 1;
my @skip_if_embedded_server=
(
"alter_table",
"bdb-deadlock",
"connect",
"flush_block_commit",
"grant2",
"grant_cache",
"grant",
"init_connect",
"innodb-deadlock",
"innodb-lock",
"mix_innodb_myisam_binlog",
"mysqlbinlog2",
"mysqlbinlog",
"mysqldump",
"mysql_protocols",
"ps_1general",
"rename",
"show_check",
"system_mysql_db_fix",
"user_var",
"variables",
);
# Used by gcov
our @mysqld_src_dirs=
(
@ -196,6 +171,7 @@ our $exe_mysqlbinlog;
our $exe_mysql_client_test;
our $exe_mysqld;
our $exe_mysqldump; # Called from test case
our $exe_mysqlshow; # Called from test case
our $exe_mysql_fix_system_tables;
our $exe_mysqltest;
our $exe_slave_mysqld;
@ -204,7 +180,7 @@ our $opt_bench= 0;
our $opt_small_bench= 0;
our $opt_big_test= 0; # Send --big-test to mysqltest
our $opt_extra_mysqld_opt; # FIXME not handled
our @opt_extra_mysqld_opt;
our $opt_compress;
our $opt_current_test;
@ -241,6 +217,7 @@ our $opt_ndbcluster_port;
our $opt_ndbconnectstring;
our $opt_no_manager; # Does nothing now, we never use manager
our $opt_manager_port; # Does nothing now, we never use manager
our $opt_old_master;
@ -495,12 +472,13 @@ sub command_line_setup () {
'master_port=i' => \$opt_master_myport,
'slave_port=i' => \$opt_slave_myport,
'ndbcluster_port=i' => \$opt_ndbcluster_port,
'manager-port' => \$opt_manager_port,
# Test case authoring
'record' => \$opt_record,
# ???
'mysqld=s' => \$opt_extra_mysqld_opt,
'mysqld=s' => \@opt_extra_mysqld_opt,
# Run test on running server
'extern' => \$opt_extern,
@ -823,6 +801,14 @@ sub executable_setup () {
{
$exe_mysqldump= "$glob_basedir/client/mysqldump";
}
if ( -f "$glob_basedir/client/.libs/mysqlshow" )
{
$exe_mysqlshow= "$glob_basedir/client/.libs/mysqlshow";
}
else
{
$exe_mysqlshow= "$glob_basedir/client/mysqlshow";
}
if ( -f "$glob_basedir/client/.libs/mysqlbinlog" )
{
$exe_mysqlbinlog= "$glob_basedir/client/.libs/mysqlbinlog";
@ -850,6 +836,7 @@ sub executable_setup () {
$path_client_bindir= "$glob_basedir/bin";
$exe_mysqltest= "$path_client_bindir/mysqltest";
$exe_mysqldump= "$path_client_bindir/mysqldump";
$exe_mysqlshow= "$path_client_bindir/mysqlshow";
$exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog";
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
$exe_mysql= "$path_client_bindir/mysql";
@ -953,13 +940,25 @@ sub environment_setup () {
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'MYSQL_TEST_WINDIR'}= $glob_mysql_test_dir;
$ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'};
$ENV{'MASTER_WINMYSOCK'}= $master->[0]->{'path_mysock'};
$ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'};
$ENV{'MASTER_MYPORT'}= $master->[0]->{'path_myport'};
$ENV{'MASTER_MYPORT1'}= $master->[1]->{'path_myport'};
$ENV{'SLAVE_MYPORT'}= $slave->[0]->{'path_myport'};
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME
$ENV{'MYSQL_TCP_PORT'}= 3306;
if ( $glob_cygwin_perl )
{
foreach my $key ('MYSQL_TEST_WINDIR','MASTER_MYSOCK')
{
$ENV{$key}= `cygpath -w $ENV{$key}`;
$ENV{$key} =~ s,\\,\\\\,g;
chomp($ENV{$key});
}
}
}
@ -1809,11 +1808,12 @@ sub mysqld_arguments ($$$$$) {
if ( $opt_with_openssl )
{
mtr_add_arg($args, "%s--ssl-ca=%s/SSL/cacert.pem", $prefix, $glob_basedir);
mtr_add_arg($args, "%s--ssl-cert=%s/SSL/server-cert.pem", $prefix,
$glob_basedir);
mtr_add_arg($args, "%s--ssl-key=%s/SSL/server-key.pem", $prefix,
$glob_basedir);
mtr_add_arg($args, "%s--ssl-ca=%s/std_data/cacert.pem", $prefix,
$glob_mysql_test_dir);
mtr_add_arg($args, "%s--ssl-cert=%s/std_data/server-cert.pem", $prefix,
$glob_mysql_test_dir);
mtr_add_arg($args, "%s--ssl-key=%s/std_data/server-key.pem", $prefix,
$glob_mysql_test_dir);
}
if ( $opt_warnings )
@ -1852,7 +1852,7 @@ sub mysqld_arguments ($$$$$) {
}
}
foreach my $arg ( @$extra_opt )
foreach my $arg ( @opt_extra_mysqld_opt, @$extra_opt )
{
mtr_add_arg($args, "%s%s", $prefix, $arg);
}
@ -2046,6 +2046,14 @@ sub run_mysqltest ($$) {
" --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
}
my $cmdline_mysqlshow= "$exe_mysqlshow -uroot " .
"--socket=$master->[0]->{'path_mysock'} --password=";
if ( $opt_debug )
{
$cmdline_mysqlshow .=
" --debug=d:t:A,$opt_vardir/log/mysqlshow.trace";
}
my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog --no-defaults --local-load=$opt_tmpdir";
@ -2078,6 +2086,7 @@ sub run_mysqltest ($$) {
$ENV{'MYSQL'}= $cmdline_mysql;
$ENV{'MYSQL_DUMP'}= $cmdline_mysqldump;
$ENV{'MYSQL_SHOW'}= $cmdline_mysqlshow;
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
@ -2151,9 +2160,12 @@ sub run_mysqltest ($$) {
if ( $opt_with_openssl )
{
mtr_add_arg($args, "--ssl-ca=%s/SSL/cacert.pem", $glob_basedir);
mtr_add_arg($args, "--ssl-cert=%s/SSL/client-cert.pem", $glob_basedir);
mtr_add_arg($args, "--ssl-key=%s/SSL/client-key.pem", $glob_basedir);
mtr_add_arg($args, "--ssl-ca=%s/std_data/cacert.pem",
$glob_mysql_test_dir);
mtr_add_arg($args, "--ssl-cert=%s/std_data/client-cert.pem",
$glob_mysql_test_dir);
mtr_add_arg($args, "--ssl-key=%s/std_data/client-key.pem",
$glob_mysql_test_dir);
}
mtr_add_arg($args, "-R");

View File

@ -170,7 +170,8 @@ cd ..
BASEDIR=`pwd`
cd $CWD
MYSQL_TEST_DIR=$BASEDIR/mysql-test
export MYSQL_TEST_DIR
MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR
export MYSQL_TEST_DIR MYSQL_TEST_WINDIR
STD_DATA=$MYSQL_TEST_DIR/std_data
hostname=`hostname` # Installed in the mysql privilege table

View File

@ -12,10 +12,9 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
commit;
set autocommit=1;
begin;
create table t1 (a int not null) engine=bdb;
begin;
insert into t1 values (1),(2),(3);
select * from t1;
a
@ -26,7 +25,6 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
commit;
create table t1 (a int not null) engine=bdb;
create table t2 (a int not null) engine=bdb;
create table t3 (a int not null) engine=bdb;

View File

@ -78,4 +78,4 @@ drop database mysqltest;
prepare stmt4 from ' show full processlist ';
execute stmt4;
Id User Host db Command Time State Info
number root localhost test Query time NULL show full processlist
number root localhost test Execute time NULL show full processlist

File diff suppressed because it is too large Load Diff

View File

@ -14,15 +14,13 @@ insert into t1 values (1),(2),(3);
select * from t1;
show status like "Qcache_queries_in_cache";
drop table t1;
commit;
set autocommit=1;
begin;
create table t1 (a int not null) engine=bdb;
begin;
insert into t1 values (1),(2),(3);
select * from t1;
show status like "Qcache_queries_in_cache";
drop table t1;
commit;
create table t1 (a int not null) engine=bdb;
create table t2 (a int not null) engine=bdb;
create table t3 (a int not null) engine=bdb;

View File

@ -253,6 +253,8 @@ let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
# With prior read locking
# Note that this test generate an error since the rpl_stmt_seq.inc
# tries to insert into t1.
LOCK TABLES mysqltest1.t1 READ;
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= false;