Commit aedf7686 authored by Kentoku SHIBA's avatar Kentoku SHIBA

skip test if target engine is not available

parent 20ac70c8
# This test tests by executing basic SQL # This test tests by executing basic SQL
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for using functions # This test tests for using functions
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for ha features # This test tests for ha features
--let $SKIP_REASON=
if ($USE_HA_TEST) if ($USE_HA_TEST)
{ {
--disable_warnings --disable_warnings
...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3) ...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
--connection child2_3
DROP DATABASE IF EXISTS auto_test_remote3;
}
if ($USE_CHILD_GROUP3)
{
--connection child3_1
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_2
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_3
DROP DATABASE IF EXISTS auto_test_local;
}
--disable_query_log
--disable_result_log
--source ha_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
SELECT engine, support FROM information_schema.engines; SELECT engine, support FROM information_schema.engines;
--echo Need $TEST_ENGINE_TYPE engine --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
skip Need $TEST_ENGINE_TYPE engine;
} }
if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`) if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
{ {
SELECT name FROM mysql.func; SELECT name FROM mysql.func;
--echo Need $TEST_FUNC_NAME function --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
skip Need $TEST_FUNC_NAME function;
} }
# This test tests for Spider's bug fixes # This test tests for Spider's bug fixes
--let $SKIP_REASON=
source include/have_log_bin.inc; source include/have_log_bin.inc;
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2) ...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_REPLICATION)
{
--connection slave1_1
DROP DATABASE IF EXISTS auto_test_local;
}
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source slave_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for VP's bug fixes # This test tests for VP's bug fixes
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests by executing basic SQL # This test tests by executing basic SQL
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for using functions # This test tests for using functions
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for ha features # This test tests for ha features
--let $SKIP_REASON=
if ($USE_HA_TEST) if ($USE_HA_TEST)
{ {
--disable_warnings --disable_warnings
...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3) ...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
--connection child2_3
DROP DATABASE IF EXISTS auto_test_remote3;
}
if ($USE_CHILD_GROUP3)
{
--connection child3_1
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_2
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_3
DROP DATABASE IF EXISTS auto_test_local;
}
--disable_query_log
--disable_result_log
--source ha_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
SELECT engine, support FROM information_schema.engines; SELECT engine, support FROM information_schema.engines;
--echo Need $TEST_ENGINE_TYPE engine --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
skip Need $TEST_ENGINE_TYPE engine;
} }
if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`) if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
{ {
SELECT name FROM mysql.func; SELECT name FROM mysql.func;
--echo Need $TEST_FUNC_NAME function --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
skip Need $TEST_FUNC_NAME function;
} }
# This test tests for Spider's bug fixes # This test tests for Spider's bug fixes
--let $SKIP_REASON=
source include/have_log_bin.inc; source include/have_log_bin.inc;
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2) ...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_REPLICATION)
{
--connection slave1_1
DROP DATABASE IF EXISTS auto_test_local;
}
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source slave_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for VP's bug fixes # This test tests for VP's bug fixes
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
if ($INIT_TEST_ENGINE) if ($INIT_TEST_ENGINE)
{ {
if (`SELECT IF('$TEST_ENGINE_TYPE' = 'InnoDB', 1, 0)`) --echo Deinit $TEST_ENGINE_TYPE engine
{
--source ../include/deinit_innodb_plugin.inc
let $INIT_TEST_ENGINE=0;
}
if ($INIT_TEST_ENGINE)
{
--echo Unknown $TEST_ENGINE_TYPE engine for deinit
skip Unknown $TEST_ENGINE_TYPE engine for deinit;
}
} }
...@@ -3,14 +3,8 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,14 +3,8 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
(support = 'YES' OR support = 'DEFAULT') AND (support = 'YES' OR support = 'DEFAULT') AND
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
if (`SELECT IF('$TEST_ENGINE_TYPE' = 'InnoDB', 1, 0)`) if (!$SKIP_REASON)
{ {
--source ../include/init_innodb_plugin.inc --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
let $INIT_TEST_ENGINE=1;
}
if (!$INIT_TEST_ENGINE)
{
--echo Unknown $TEST_ENGINE_TYPE engine for init
skip Unknown $TEST_ENGINE_TYPE engine for init;
} }
} }
# This test tests by executing basic SQL # This test tests by executing basic SQL
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for using functions # This test tests for using functions
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for ha features # This test tests for ha features
--let $SKIP_REASON=
if ($USE_HA_TEST) if ($USE_HA_TEST)
{ {
--disable_warnings --disable_warnings
...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3) ...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
--connection child2_3
DROP DATABASE IF EXISTS auto_test_remote3;
}
if ($USE_CHILD_GROUP3)
{
--connection child3_1
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_2
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_3
DROP DATABASE IF EXISTS auto_test_local;
}
--disable_query_log
--disable_result_log
--source ha_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
SELECT engine, support FROM information_schema.engines; SELECT engine, support FROM information_schema.engines;
--echo Need $TEST_ENGINE_TYPE engine --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
skip Need $TEST_ENGINE_TYPE engine;
} }
if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`) if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
{ {
SELECT name FROM mysql.func; SELECT name FROM mysql.func;
--echo Need $TEST_FUNC_NAME function --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
skip Need $TEST_FUNC_NAME function;
} }
# This test tests for Spider's bug fixes # This test tests for Spider's bug fixes
--let $SKIP_REASON=
source include/have_log_bin.inc; source include/have_log_bin.inc;
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2) ...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_REPLICATION)
{
--connection slave1_1
DROP DATABASE IF EXISTS auto_test_local;
}
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source slave_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for VP's bug fixes # This test tests for VP's bug fixes
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests by executing basic SQL # This test tests by executing basic SQL
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for using functions # This test tests for using functions
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for ha features # This test tests for ha features
--let $SKIP_REASON=
if ($USE_HA_TEST) if ($USE_HA_TEST)
{ {
--disable_warnings --disable_warnings
...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3) ...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
--connection child2_3
DROP DATABASE IF EXISTS auto_test_remote3;
}
if ($USE_CHILD_GROUP3)
{
--connection child3_1
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_2
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_3
DROP DATABASE IF EXISTS auto_test_local;
}
--disable_query_log
--disable_result_log
--source ha_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
SELECT engine, support FROM information_schema.engines; SELECT engine, support FROM information_schema.engines;
--echo Need $TEST_ENGINE_TYPE engine --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
skip Need $TEST_ENGINE_TYPE engine;
} }
if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`) if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
{ {
SELECT name FROM mysql.func; SELECT name FROM mysql.func;
--echo Need $TEST_FUNC_NAME function --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
skip Need $TEST_FUNC_NAME function;
} }
# This test tests for Spider's bug fixes # This test tests for Spider's bug fixes
--let $SKIP_REASON=
source include/have_log_bin.inc; source include/have_log_bin.inc;
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2) ...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_REPLICATION)
{
--connection slave1_1
DROP DATABASE IF EXISTS auto_test_local;
}
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source slave_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for VP's bug fixes # This test tests for VP's bug fixes
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests by executing basic SQL # This test tests by executing basic SQL
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2) ...@@ -24,6 +25,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for using functions # This test tests for using functions
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for ha features # This test tests for ha features
--let $SKIP_REASON=
if ($USE_HA_TEST) if ($USE_HA_TEST)
{ {
--disable_warnings --disable_warnings
...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3) ...@@ -47,6 +48,40 @@ if ($USE_CHILD_GROUP3)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
--connection child2_3
DROP DATABASE IF EXISTS auto_test_remote3;
}
if ($USE_CHILD_GROUP3)
{
--connection child3_1
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_2
DROP DATABASE IF EXISTS auto_test_local;
--connection child3_3
DROP DATABASE IF EXISTS auto_test_local;
}
--disable_query_log
--disable_result_log
--source ha_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE ...@@ -3,6 +3,5 @@ if (!`SELECT count(*) FROM information_schema.engines WHERE
engine = '$TEST_ENGINE_TYPE'`) engine = '$TEST_ENGINE_TYPE'`)
{ {
SELECT engine, support FROM information_schema.engines; SELECT engine, support FROM information_schema.engines;
--echo Need $TEST_ENGINE_TYPE engine --let $SKIP_REASON= "Need $TEST_ENGINE_TYPE engine"
skip Need $TEST_ENGINE_TYPE engine;
} }
if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`) if (!`SELECT count(*) FROM mysql.func WHERE name = '$TEST_FUNC_NAME'`)
{ {
SELECT name FROM mysql.func; SELECT name FROM mysql.func;
--echo Need $TEST_FUNC_NAME function --let $SKIP_REASON= "Need $TEST_FUNC_NAME function"
skip Need $TEST_FUNC_NAME function;
} }
# This test tests for Spider's bug fixes # This test tests for Spider's bug fixes
--let $SKIP_REASON=
source include/have_log_bin.inc; source include/have_log_bin.inc;
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2) ...@@ -34,6 +35,34 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_REPLICATION)
{
--connection slave1_1
DROP DATABASE IF EXISTS auto_test_local;
}
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source slave_test_deinit.inc
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
# This test tests for VP's bug fixes # This test tests for VP's bug fixes
--let $SKIP_REASON=
--disable_warnings --disable_warnings
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2) ...@@ -25,6 +26,28 @@ if ($USE_CHILD_GROUP2)
} }
--enable_warnings --enable_warnings
if ($SKIP_REASON)
{
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--skip $SKIP_REASON
}
--echo --echo
--echo test select 1 --echo test select 1
--connection master_1 --connection master_1
......
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