diff options
author | gshchepa/uchum@gleb.loc <> | 2007-07-20 04:21:46 +0500 |
---|---|---|
committer | gshchepa/uchum@gleb.loc <> | 2007-07-20 04:21:46 +0500 |
commit | 95d43074cc3cfaed299eb989ae92ddc3ebd70d19 (patch) | |
tree | 941c34ec63e96fde4aaf03e42d8b59e44d9ca70b /mysql-test/include | |
parent | c404cd7c9cc4383d2e73f301588a131b635e33ca (diff) | |
parent | 4223b125237282fba7f42503d5eef2c4845f80e6 (diff) | |
download | mariadb-git-95d43074cc3cfaed299eb989ae92ddc3ebd70d19.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.1
into gleb.loc:/home/uchum/work/bk/5.1-opt
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/have_ndb.inc | 14 | ||||
-rw-r--r-- | mysql-test/include/innodb_trx_weight.inc | 51 | ||||
-rw-r--r-- | mysql-test/include/ndb_master-slave.inc | 7 |
3 files changed, 66 insertions, 6 deletions
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc index 3d9cbf5a379..cfc5b5d0ff8 100644 --- a/mysql-test/include/have_ndb.inc +++ b/mysql-test/include/have_ndb.inc @@ -1,6 +1,10 @@ # Check that server is compiled and started with support for NDB -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; +#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; +# always make sure we have both mysql servers started ok before test starts +# there are some initial startup bugs that are avoided by doing this, avoiding sporadic +# failures in mysql-test-run +--source include/have_multi_ndb.inc diff --git a/mysql-test/include/innodb_trx_weight.inc b/mysql-test/include/innodb_trx_weight.inc new file mode 100644 index 00000000000..56d3d47da36 --- /dev/null +++ b/mysql-test/include/innodb_trx_weight.inc @@ -0,0 +1,51 @@ +-- connect (con1,localhost,root,,) +-- connect (con2,localhost,root,,) + +-- connection con1 +SET autocommit=0; +SELECT * FROM t1 FOR UPDATE; +-- if ($con1_extra_sql_present) { + -- eval $con1_extra_sql +-- } + +-- connection con2 +SET autocommit=0; +SELECT * FROM t2 FOR UPDATE; +-- if ($con2_extra_sql_present) { + -- eval $con2_extra_sql +-- } + +-- if ($con1_should_be_rolledback) { + -- connection con1 + -- send + INSERT INTO t2 VALUES (0); + + -- connection con2 + INSERT INTO t1 VALUES (0); + ROLLBACK; + + -- connection con1 + -- error ER_LOCK_DEADLOCK + -- reap +-- } +# else +-- if (!$con1_should_be_rolledback) { + -- connection con2 + -- send + INSERT INTO t1 VALUES (0); + + -- connection con1 + INSERT INTO t2 VALUES (0); + ROLLBACK; + + -- connection con2 + -- error ER_LOCK_DEADLOCK + -- reap +-- } + +-- connection default + +DELETE FROM t5_nontrans; + +-- disconnect con1 +-- disconnect con2 diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc index 81dd63be78a..1568072202b 100644 --- a/mysql-test/include/ndb_master-slave.inc +++ b/mysql-test/include/ndb_master-slave.inc @@ -4,7 +4,12 @@ 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 +# Check that server is compiled and started with support for NDB +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; -- source include/master-slave-reset.inc |