summaryrefslogtreecommitdiff
path: root/storage/maria/unittest/ma_test_loghandler_nologs-t.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/unittest/ma_test_loghandler_nologs-t.c')
-rw-r--r--storage/maria/unittest/ma_test_loghandler_nologs-t.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/storage/maria/unittest/ma_test_loghandler_nologs-t.c b/storage/maria/unittest/ma_test_loghandler_nologs-t.c
index 32ada1e58bd..24c93e428e1 100644
--- a/storage/maria/unittest/ma_test_loghandler_nologs-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_nologs-t.c
@@ -19,8 +19,8 @@
#include <tap.h>
#include "../trnman.h"
-extern my_bool maria_log_remove();
-extern void example_loghandler_init();
+extern my_bool maria_log_remove(const char *testdir);
+extern char *create_tmpdir(const char *progname);
#ifndef DBUG_OFF
static const char *default_dbug_option;
@@ -49,8 +49,8 @@ int main(int argc __attribute__((unused)), char *argv[])
bzero(&pagecache, sizeof(pagecache));
bzero(long_buffer, LONG_BUFFER_SIZE);
- maria_data_root= (char *)".";
- if (maria_log_remove())
+ maria_data_root= create_tmpdir(argv[0]);
+ if (maria_log_remove(0))
exit(1);
bzero(long_tr_id, 6);
@@ -78,7 +78,7 @@ int main(int argc __attribute__((unused)), char *argv[])
fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno);
exit(1);
}
- if (translog_init_with_table(".", LOG_FILE_SIZE, 50112, 0, &pagecache,
+ if (translog_init_with_table(maria_data_root, LOG_FILE_SIZE, 50112, 0, &pagecache,
LOG_FLAGS, 0, &translog_example_table_init,
0))
{
@@ -151,7 +151,7 @@ int main(int argc __attribute__((unused)), char *argv[])
fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno);
exit(1);
}
- if (translog_init_with_table(".", LOG_FILE_SIZE, 50112, 0, &pagecache,
+ if (translog_init_with_table(maria_data_root, LOG_FILE_SIZE, 50112, 0, &pagecache,
LOG_FLAGS, 0, &translog_example_table_init,
1))
{
@@ -189,7 +189,7 @@ int main(int argc __attribute__((unused)), char *argv[])
ok(1, "New log is OK");
- if (maria_log_remove())
+ if (maria_log_remove(maria_data_root))
exit(1);
exit(0);
}