summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-04-05 15:40:56 +0300
committerunknown <marko@hundin.mysql.fi>2004-04-05 15:40:56 +0300
commitec3bfc4cace8061eccbba08dd5992e26ffdaf647 (patch)
tree4323b0449cdac3fc86a61de5852a8c5d459b0019 /innobase
parentfac3642cc850d86dd927dec456aea19bae706918 (diff)
downloadmariadb-git-ec3bfc4cace8061eccbba08dd5992e26ffdaf647.tar.gz
InnoDB: Backport fil_path_to_mysql_datadir from MySQL 4.1.x
innobase/fil/fil0fil.c: Backport fil_path_to_mysql_datadir from 4.1 innobase/include/fil0fil.h: Backport fil_path_to_mysql_datadir from 4.1 sql/ha_innodb.cc: Backport fil_path_to_mysql_datadir from 4.1
Diffstat (limited to 'innobase')
-rw-r--r--innobase/fil/fil0fil.c5
-rw-r--r--innobase/include/fil0fil.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 44f1777bb33..5d45b254afe 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -77,6 +77,11 @@ out of the LRU-list and keep a count of pending operations. When an operation
completes, we decrement the count and return the file node to the LRU-list if
the count drops to zero. */
+/* When mysqld is run, the default directory "." is the mysqld datadir,
+but in the MySQL Embedded Server Library and ibbackup it is not the default
+directory, and we must set the base file path explicitly */
+const char* fil_path_to_mysql_datadir = ".";
+
ulint fil_n_pending_log_flushes = 0;
ulint fil_n_pending_tablespace_flushes = 0;
diff --git a/innobase/include/fil0fil.h b/innobase/include/fil0fil.h
index ad3149f0b36..ef41ca21d2c 100644
--- a/innobase/include/fil0fil.h
+++ b/innobase/include/fil0fil.h
@@ -16,6 +16,11 @@ Created 10/25/1995 Heikki Tuuri
#include "ut0byte.h"
#include "os0file.h"
+/* When mysqld is run, the default directory "." is the mysqld datadir, but in
+ibbackup we must set it explicitly; the path must NOT contain the trailing
+'/' or '\' */
+extern const char* fil_path_to_mysql_datadir;
+
/* 'null' (undefined) page offset in the context of file spaces */
#define FIL_NULL ULINT32_UNDEFINED