2789
2789
static void do_sync_with_master2(long offset)
2791
2791
drizzle::connection_c& con= *cur_con;
2792
char query_buf[FN_REFLEN+128];
2794
2793
if (!master_pos.file[0])
2795
2794
die("Calling 'sync_with_master' without calling 'save_master_pos'");
2796
char query_buf[FN_REFLEN+128];
2797
2797
snprintf(query_buf, sizeof(query_buf), "select master_pos_wait('%s', %ld)", master_pos.file, master_pos.pos + offset);
2802
drizzle::result_c res;
2803
dt_query(con, res, query_buf);
2805
drizzle_row_t row= res.row_next();
2808
die("empty result in %s", query_buf);
2798
for (int tries= 0; tries < 30; tries++)
2800
drizzle::result_c res;
2801
dt_query(con, res, query_buf);
2803
drizzle_row_t row= res.row_next();
2805
die("empty result in %s", query_buf);
2813
It may be that the slave SQL thread has not started yet, though START
2814
SLAVE has been issued ?
2809
It may be that the slave SQL thread has not started yet, though START
2810
SLAVE has been issued ?
2818
show_query(con, "SHOW MASTER STATUS");
2819
show_query(con, "SHOW SLAVE STATUS");
2820
die("could not sync with master ('%s' returned NULL)", query_buf);
2822
2812
sleep(1); /* So at most we will wait 30 seconds and make 31 tries */
2823
goto wait_for_position;
2814
show_query(con, "SHOW MASTER STATUS");
2815
show_query(con, "SHOW SLAVE STATUS");
2816
die("could not sync with master ('%s' returned NULL)", query_buf);
2827
2819
static void do_sync_with_master(st_command* command)