summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-07-13 11:11:20 -0400
committerunknown <cmiller@zippy.(none)>2006-07-13 11:11:20 -0400
commit3ff8200ac17fda202b2adc0a4f7a2bb91c8078d0 (patch)
treeabade15123a2fd253ad9ebc948ac5aeeaacd3181 /tests
parenta7dddd3b67e70292c0813e80ad255f1dc2f3a867 (diff)
parent4823bc50413d11a1f8329db9cde5bc5173d365c8 (diff)
downloadmariadb-git-3ff8200ac17fda202b2adc0a4f7a2bb91c8078d0.tar.gz
Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into zippy.(none):/home/cmiller/work/mysql/m50-maint--07C2P configure.in: Auto merged mysql-test/mysql-test-run.pl: Auto merged tests/mysql_client_test.c: manual merge
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 7ad902afb6c..04eb427b35f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -58,6 +58,7 @@ static unsigned int iter_count= 0;
static my_bool have_innodb= FALSE;
static const char *opt_basedir= "./";
+static const char *opt_vardir= "mysql-test/var";
static longlong opt_getopt_ll_test= 0;
@@ -14883,6 +14884,7 @@ static void test_bug17667()
struct buffer_and_length *statement_cursor;
FILE *log_file;
+ char *master_log_filename;
myheader("test_bug17667");
@@ -14894,7 +14896,13 @@ static void test_bug17667()
}
sleep(1); /* The server may need time to flush the data to the log. */
- log_file= fopen("var/log/master.log", "r");
+
+ master_log_filename = (char *) malloc(strlen(opt_vardir) + strlen("/log/master.log") + 1);
+ strcpy(master_log_filename, opt_vardir);
+ strcat(master_log_filename, "/log/master.log");
+ log_file= fopen(master_log_filename, "r");
+ free(master_log_filename);
+
if (log_file != NULL) {
for (statement_cursor= statements; statement_cursor->buffer != NULL;
@@ -14918,7 +14926,7 @@ static void test_bug17667()
}
else
{
- fprintf(stderr, "Could not find the log file, var/log/master.log, so "
+ fprintf(stderr, "Could not find the log file, VARDIR/log/master.log, so "
"test_bug17667 is \ninconclusive. Run test from the "
"mysql-test/mysql-test-run* program \nto set up the correct "
"environment for this test.\n\n");
@@ -15062,6 +15070,8 @@ static struct my_option client_test_long_options[] =
{"user", 'u', "User for login if not current user", (char **) &opt_user,
(char **) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"vardir", 'v', "Data dir for tests.", (gptr*) &opt_vardir,
+ (gptr*) &opt_vardir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"getopt-ll-test", 'g', "Option for testing bug in getopt library",
(char **) &opt_getopt_ll_test, (char **) &opt_getopt_ll_test, 0,
GET_LL, REQUIRED_ARG, 0, 0, LONGLONG_MAX, 0, 0, 0},