当前位置: 首页>>代码示例>>C++>>正文


C++ TestConnections::start_binlog方法代码示例

本文整理汇总了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);
}
开发者ID:Robert-Xie,项目名称:maxscale-system-test,代码行数:29,代码来源:setup_binlog_crc_none.cpp

示例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;
}
开发者ID:mariadb-corporation,项目名称:maxscale-system-test,代码行数:31,代码来源:setup_binlog.cpp


注:本文中的TestConnections::start_binlog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。