Merge branch '2.2' into 2.3
This commit is contained in:
@ -25,38 +25,20 @@ int main(int argc, char* argv[])
|
||||
|
||||
Test->tprintf("Connecting to RWSplit %s\n", Test->maxscales->IP[0]);
|
||||
|
||||
sprintf(&sys1[0], sysbench_prepare, Test->sysbench_dir, Test->sysbench_dir, Test->maxscales->IP[0]);
|
||||
sprintf(&sys1[0], SYSBENCH_PREPARE, Test->maxscales->IP[0]);
|
||||
|
||||
Test->tprintf("Preparing sysbench tables\n%s\n", sys1);
|
||||
Test->set_timeout(10000);
|
||||
Test->add_result(system(sys1), "Error executing sysbench prepare\n");
|
||||
|
||||
char* readonly;
|
||||
char* ro_on = (char*) "on";
|
||||
char* ro_off = (char*) "off";
|
||||
|
||||
Test->stop_timeout();
|
||||
|
||||
current_port = port[0];
|
||||
|
||||
Test->tprintf("Trying test with port %d\n", current_port);
|
||||
|
||||
if (current_port == Test->maxscales->readconn_slave_port[0])
|
||||
{
|
||||
readonly = ro_on;
|
||||
}
|
||||
else
|
||||
{
|
||||
readonly = ro_off;
|
||||
}
|
||||
|
||||
sprintf(&sys1[0],
|
||||
sysbench_command_long,
|
||||
Test->sysbench_dir,
|
||||
Test->sysbench_dir,
|
||||
Test->maxscales->IP[0],
|
||||
current_port,
|
||||
readonly);
|
||||
sprintf(&sys1[0], SYSBENCH_COMMAND_LONG, Test->maxscales->IP[0],
|
||||
current_port);
|
||||
Test->set_log_copy_interval(300);
|
||||
Test->tprintf("Executing sysbench \n%s\n", sys1);
|
||||
if (system(sys1) != 0)
|
||||
@ -69,6 +51,8 @@ int main(int argc, char* argv[])
|
||||
printf("Dropping sysbanch tables!\n");
|
||||
fflush(stdout);
|
||||
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "DROP TABLE sbtest1");
|
||||
/*
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "DROP TABLE sbtest1");
|
||||
if (!Test->smoke)
|
||||
{
|
||||
@ -76,8 +60,9 @@ int main(int argc, char* argv[])
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "DROP TABLE sbtest3");
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "DROP TABLE sbtest4");
|
||||
}
|
||||
*/
|
||||
|
||||
// global_result += execute_query(Test->maxscales->conn_rwsplit[0], (char *) "DROP TABLE sbtest");
|
||||
Test->global_result += execute_query(Test->maxscales->conn_rwsplit[0], (char *) "DROP TABLE sbtest1");
|
||||
|
||||
printf("closing connections to MaxScale!\n");
|
||||
fflush(stdout);
|
||||
@ -90,8 +75,5 @@ int main(int argc, char* argv[])
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
fflush(stdout);
|
||||
Test->tprintf("Logs copied!\n");
|
||||
fflush(stdout);
|
||||
return rval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user