本文整理汇总了C++中TestConnections::start_binlog方法的典型用法代码示例。如果您正苦于以下问题:C++ TestConnections::start_binlog方法的具体用法?C++ TestConnections::start_binlog怎么用?C++ TestConnections::start_binlog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestConnections
的用法示例。
在下文中一共展示了TestConnections::start_binlog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
int global_result = 0;
Test->read_env();
Test->print_env();
Test->binlog_cmd_option = 2;
Test->start_binlog();
Test->repl->connect();
create_t1(Test->repl->nodes[0]);
global_result += insert_into_t1(Test->repl->nodes[0], 4);
printf("Sleeping to let replication happen\n"); fflush(stdout);
sleep(30);
for (int i = 0; i < Test->repl->N; i++) {
printf("Checking data from node %d (%s)\n", i, Test->repl->IP[i]); fflush(stdout);
global_result += select_from_t1(Test->repl->nodes[i], 4);
}
Test->repl->close_connections();
Test->copy_all_logs(); return(global_result);
}
示例2: main
int main(int argc, char *argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
Test->set_timeout(3000);
int options_set = 3;
if (Test->smoke)
{
options_set = 1;
}
Test->repl->connect();
execute_query(Test->repl->nodes[0], (char *) "DROP TABLE IF EXISTS t1;");
Test->repl->close_connections();
sleep(5);
for (int option = 0; option < options_set; option++)
{
Test->binlog_cmd_option = option;
Test->start_binlog();
test_binlog(Test);
}
Test->check_log_err("SET NAMES utf8mb4", false);
Test->check_log_err("set autocommit=1", false);
Test->check_log_err("select USER()", false);
int rval = Test->global_result;
delete Test;
return rval;
}