summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2006-04-13 10:48:24 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2006-04-13 10:48:24 +0200
commit8c691d299b7f87523d3b84dc32ef0937be01f04b (patch)
treee1364c40403bc995dcbef0062bd3c07f2147b292 /client
parent4e6190ac4812c312280beed4cd102f1ce7824c16 (diff)
parent1435a91daadff59314606f4b8053261972fb388a (diff)
downloadmariadb-git-8c691d299b7f87523d3b84dc32ef0937be01f04b.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new client/mysqltest.c: Auto merged sql/ha_ndbcluster.cc: Auto merged mysql-test/t/disabled.def: manual merge
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index e20e4689504..cfd69e45ba7 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1596,9 +1596,9 @@ wait_for_position:
It may be that the slave SQL thread has not started yet, though START
SLAVE has been issued ?
*/
- if (tries++ == 3)
+ if (tries++ == 30)
die("could not sync with master ('%s' returned NULL)", query_buf);
- sleep(1); /* So at most we will wait 3 seconds and make 4 tries */
+ sleep(1); /* So at most we will wait 30 seconds and make 31 tries */
mysql_free_result(res);
goto wait_for_position;
}
@@ -1664,14 +1664,14 @@ int do_save_master_pos()
{
ulonglong epoch=0, tmp_epoch= 0;
int count= 0;
-
- do
+ int do_continue= 1;
+ while (do_continue)
{
const char binlog[]= "binlog";
const char latest_trans_epoch[]=
"latest_trans_epoch=";
- const char latest_applied_binlog_epoch[]=
- "latest_applied_binlog_epoch=";
+ const char latest_handled_binlog_epoch[]=
+ "latest_handled_binlog_epoch=";
if (count)
sleep(1);
if (mysql_query(mysql, query= "show engine ndb status"))
@@ -1701,26 +1701,32 @@ int do_save_master_pos()
start_lineno, latest_trans_epoch, query);
}
/* latest_applied_binlog_epoch */
- while (*status && strncmp(status, latest_applied_binlog_epoch,
- sizeof(latest_applied_binlog_epoch)-1))
+ while (*status && strncmp(status, latest_handled_binlog_epoch,
+ sizeof(latest_handled_binlog_epoch)-1))
status++;
if (*status)
{
- status+= sizeof(latest_applied_binlog_epoch)-1;
+ status+= sizeof(latest_handled_binlog_epoch)-1;
tmp_epoch= strtoull(status, (char**) 0, 10);
}
else
die("line %u: result does not contain '%s' in '%s'",
- start_lineno, latest_applied_binlog_epoch, query);
+ start_lineno, latest_handled_binlog_epoch, query);
break;
}
}
- mysql_free_result(res);
if (!row)
die("line %u: result does not contain '%s' in '%s'",
start_lineno, binlog, query);
count++;
- } while (tmp_epoch < epoch && count <= 3);
+ if (tmp_epoch >= epoch)
+ do_continue= 0;
+ else if (count > 30)
+ {
+ break;
+ }
+ mysql_free_result(res);
+ }
}
}
#endif