summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorunknown <tsmith/tim@siva.hindu.god>2006-12-22 13:43:48 -0700
committerunknown <tsmith/tim@siva.hindu.god>2006-12-22 13:43:48 -0700
commitff509df77c9c14828b58ccb5a230df82c1040550 (patch)
treec018a7910abbef07db7a17d8fa589411d0b38c2a /mysql-test/include
parent8e1f54501af7e39333b9226f7bc5dcfff5d63c8a (diff)
parent610afd4243cb03f7763944ae89fc193759eb1ae1 (diff)
downloadmariadb-git-ff509df77c9c14828b58ccb5a230df82c1040550.tar.gz
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into siva.hindu.god:/usr/home/tim/m/bk/51 mysql-test/mysql-test-run.pl: Auto merged
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/have_multi_ndb.inc4
-rw-r--r--mysql-test/include/have_ndb.inc4
-rw-r--r--mysql-test/include/ndb_not_readonly.inc31
3 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
index 218a6852c41..819518b2674 100644
--- a/mysql-test/include/have_multi_ndb.inc
+++ b/mysql-test/include/have_multi_ndb.inc
@@ -24,5 +24,9 @@ flush tables;
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
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;
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
index 8cbeab07a4f..77857106488 100644
--- a/mysql-test/include/have_ndb.inc
+++ b/mysql-test/include/have_ndb.inc
@@ -4,4 +4,8 @@ disable_query_log;
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
enable_query_log;
+# Check that master mysqld has come out of redonly mode
+--source include/ndb_not_readonly.inc
+
+
diff --git a/mysql-test/include/ndb_not_readonly.inc b/mysql-test/include/ndb_not_readonly.inc
new file mode 100644
index 00000000000..df67dced8ab
--- /dev/null
+++ b/mysql-test/include/ndb_not_readonly.inc
@@ -0,0 +1,31 @@
+# Check that server has come out ot readonly mode
+--disable_query_log
+let $counter= 100;
+let $mysql_errno= 1;
+while ($mysql_errno)
+{
+ --error 0, 1005
+ create table check_read_only(a int) engine=NDB;
+ sleep 0.1;
+ if (!$counter)
+ {
+ die("Failed while waiting for mysqld to come out of readonly mode");
+ }
+ 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