From 4904160d263a149eedcf29f4425433945d4bdd2e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Aug 2006 10:16:37 +0200 Subject: fflush(NULL) before abort so that all pending writes are performed --- tests/mysql_client_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index b65528eccb6..7cdd82f3779 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -122,7 +122,7 @@ static void client_disconnect(); void die(const char *file, int line, const char *expr) { fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr); - fflush(stderr); + fflush(NULL); abort(); } -- cgit v1.2.1 From e4f91a7369646077872817ba5afc16370a9647ba Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Aug 2006 11:29:41 +0200 Subject: Change the 'sleep' into an explicit FLUSH LOGS command --- tests/mysql_client_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 7cdd82f3779..89b07143873 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -14930,7 +14930,9 @@ static void test_bug17667() myquery(rc); } - sleep(1); /* The server may need time to flush the data to the log. */ + /* Make sure the server has written the logs to disk before reading it */ + rc= mysql_query(mysql, "flush logs"); + myquery(rc); master_log_filename = (char *) malloc(strlen(opt_vardir) + strlen("/log/master.log") + 1); strcpy(master_log_filename, opt_vardir); -- cgit v1.2.1