Skip to content

Commit

Permalink
Added error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
rahim-kanji committed Dec 29, 2023
1 parent 465ff35 commit 7cd7027
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/tap/tests/test_binlog_fast_forward-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ std::vector<std::string> adminQ_set1 = {
int pull_replication(MYSQL *mysql, int server_id) {
MARIADB_RPL_EVENT *event= NULL;
MARIADB_RPL *rpl= mariadb_rpl_init(mysql);
if (!rpl) {
fprintf(stderr, "File %s, line %d, Error: mariadb_rpl_init failed\n", __FILE__, __LINE__);
return exit_status();
}
rpl->server_id= server_id;
rpl->start_position= 4;
rpl->flags= MARIADB_RPL_BINLOG_SEND_ANNOTATE_ROWS;

if (mariadb_rpl_open(rpl))
if (mariadb_rpl_open(rpl)) {
fprintf(stderr, "File %s, line %d, Error: %s\n", __FILE__, __LINE__, mariadb_rpl_error(rpl));
return exit_status();

}
int num_heartbeats = 0;
int num_events = 0;

Expand Down

0 comments on commit 7cd7027

Please sign in to comment.