Assume that the test database exists

The tests should not drop the test database and then recreate it. This
adds an unnecessary burden on replication which will cause false positives
when replication is not fast enough.

This is commit `2410c23e6664bef7e449dfd5a767121f309559fe` from develop
cherry-picked to 2.1.
This commit is contained in:
Markus Mäkelä 2017-07-11 22:27:42 +03:00
parent 563fdb4db5
commit e48fb6a071
3 changed files with 1 additions and 7 deletions

View File

@ -150,10 +150,7 @@ int main(int argc, char *argv[])
Test->repl->connect();
conn = Test->open_rwsplit_connection();
execute_query(conn, (char *) "DROP DATABASE IF EXISTS test");
execute_query(conn, (char *) "CREATE DATABASE test");
execute_query(conn, (char *) "USE test;");
create_t1(conn);
mysql_close(conn);
Test->tprintf("Table t1 is created\n");

View File

@ -126,8 +126,7 @@ int main(int argc, char *argv[])
/** Clean up */
Test->repl->connect();
execute_query(Test->repl->nodes[0], "DROP DATABASE test");
execute_query(Test->repl->nodes[0], "CREATE DATABASE test");
execute_query(Test->repl->nodes[0], "DROP TABLE IF EXISTS t1;");
int rval = Test->global_result;
delete Test;

View File

@ -24,8 +24,6 @@ int main(int argc, char *argv[])
test.repl->connect();
MYSQL *conn = test.open_rwsplit_connection();
execute_query(conn, "DROP DATABASE IF EXISTS test;");
execute_query(conn, "CREATE DATABASE test;");
execute_query(conn, "USE test;");
create_t1(conn);
mysql_close(conn);