mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into maint1.mysql.com:/data/localhome/tsmith/bk/maint/51 include/m_ctype.h: Auto merged mysql-test/Makefile.am: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysql-test/r/rpl_ssl.result: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/multi_update.test: Auto merged mysql-test/t/rpl_row_until.test: Auto merged mysql-test/t/rpl_ssl.test: Auto merged mysql-test/t/rpl_stm_until.test: Auto merged mysys/charset-def.c: Auto merged mysys/charset.c: Auto merged sql/item_create.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_update.cc: Auto merged strings/ctype-big5.c: Auto merged strings/ctype-gbk.c: Auto merged strings/ctype-sjis.c: Auto merged strings/ctype-uca.c: Auto merged strings/ctype.c: Auto merged BitKeeper/deleted/.del-binlog_innodb.result: Delete: mysql-test/r/binlog_innodb.result BitKeeper/deleted/.del-binlog_innodb.test: Delete: mysql-test/t/binlog_innodb.test mysql-test/r/binlog_innodb.result: Fix merge of two independent binlog_innodb tests (from -rpl and -maint) mysql-test/t/binlog_innodb.test: Fix merge of two independent binlog_innodb tests (from -rpl and -maint) mysql-test/r/innodb.result: Use local (manual merge) mysql-test/r/multi_update.result: Use remote (manual merge) mysql-test/t/rpl_log_pos.test: Manual merge mysql-test/r/rpl_log_pos.result: Manual merge, part 2
This commit is contained in:
@ -11,6 +11,7 @@ drop table if exists t1, t2;
|
||||
flush tables;
|
||||
--require r/true.require
|
||||
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
|
||||
--source include/ndb_not_readonly.inc
|
||||
enable_query_log;
|
||||
|
||||
# Check that server2 has NDB support
|
||||
@ -22,11 +23,8 @@ drop table if exists t1, t2;
|
||||
flush tables;
|
||||
--require r/true.require
|
||||
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
|
||||
--source include/ndb_not_readonly.inc
|
||||
enable_query_log;
|
||||
|
||||
# Check should be here as well...
|
||||
# # Check that second master mysqld has come out of redonly mode
|
||||
# --source include/ndb_not_readonly.inc
|
||||
|
||||
# Set the default connection to 'server1'
|
||||
connection server1;
|
||||
|
@ -2,8 +2,5 @@
|
||||
disable_query_log;
|
||||
--require r/true.require
|
||||
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster';
|
||||
--source include/ndb_not_readonly.inc
|
||||
enable_query_log;
|
||||
|
||||
|
||||
|
||||
|
||||
|
12
mysql-test/include/ndb_master-slave.inc
Normal file
12
mysql-test/include/ndb_master-slave.inc
Normal file
@ -0,0 +1,12 @@
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
||||
connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
||||
|
||||
connection slave;
|
||||
-- source include/have_ndb.inc
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
|
||||
# Set the default connection to 'master'
|
||||
connection master;
|
@ -1,31 +1,30 @@
|
||||
# Check that server has come out ot readonly mode
|
||||
--disable_query_log
|
||||
let $counter= 100;
|
||||
#
|
||||
# wait for server to connect properly to cluster
|
||||
#
|
||||
set @saved_log = @@sql_log_bin;
|
||||
set sql_log_bin = 0;
|
||||
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND
|
||||
delete from mysql.ndb_apply_status where server_id=0;
|
||||
let $mysql_errno= 1;
|
||||
let $counter= 600;
|
||||
while ($mysql_errno)
|
||||
{
|
||||
--error 0, 1005
|
||||
create table check_read_only(a int) engine=NDB;
|
||||
sleep 0.1;
|
||||
if (!$counter)
|
||||
# Table is readonly until the mysqld has connected properly
|
||||
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG
|
||||
replace into mysql.ndb_apply_status values(0,0,"",0,0);
|
||||
if ($mysql_errno)
|
||||
{
|
||||
die("Failed while waiting for mysqld to come out of readonly mode");
|
||||
if (!$counter)
|
||||
{
|
||||
die("Failed while waiting for mysqld to come out of readonly mode");
|
||||
}
|
||||
dec $counter;
|
||||
--sleep 0.1
|
||||
}
|
||||
dec $counter;
|
||||
}
|
||||
|
||||
let $counter= 100;
|
||||
let $mysql_errno= 1;
|
||||
while ($mysql_errno)
|
||||
{
|
||||
--error 0, 1036
|
||||
insert into check_read_only values(1);
|
||||
sleep 0.1;
|
||||
if (!$counter)
|
||||
{
|
||||
die("Failed while waiting for mysqld to come out of readonly mode");
|
||||
}
|
||||
dec $counter;
|
||||
}
|
||||
drop table check_read_only;
|
||||
--enable_query_log
|
||||
delete from mysql.ndb_apply_status where server_id=0;
|
||||
set sql_log_bin = @saved_log;
|
||||
#
|
||||
# connected
|
||||
#
|
||||
|
6
mysql-test/include/show_slave_status.inc
Normal file
6
mysql-test/include/show_slave_status.inc
Normal file
@ -0,0 +1,6 @@
|
||||
# Include file to show the slave status, masking out some information
|
||||
# that varies depending on where the test is executed.
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
Reference in New Issue
Block a user