summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authoringo@mysql.com <>2005-04-28 18:28:50 +0200
committeringo@mysql.com <>2005-04-28 18:28:50 +0200
commit1f0d0a6729690bfda6466130957393242d37cfe0 (patch)
tree0f234f007885333223f6233c5d1e6f54e303446f /mysys
parent29f8460e7bcf5d5ece576a9364be6caa78e34f92 (diff)
downloadmariadb-git-1f0d0a6729690bfda6466130957393242d37cfe0.tar.gz
BUG#5964 - 4.1 MERGE tables regression from 4.0
Changed the creation of the .MRG file so that only the table name is written when the MyISAM table is in the same database as the MERGE table, a relative path is used in other cases in mysqld, and possibly an absolute path is used in an embedded server. No test case is added as the external behaviour is unchanged. Only the file names within the .MRG file are changed.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_getwd.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index d6f647254e8..89f949eca27 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -192,3 +192,25 @@ int test_if_hard_path(register const char *dir_name)
return FALSE;
#endif
} /* test_if_hard_path */
+
+
+/*
+ Test if a name contains an (absolute or relative) path.
+
+ SYNOPSIS
+ has_path()
+ name The name to test.
+
+ RETURN
+ TRUE name contains a path.
+ FALSE name does not contain a path.
+*/
+
+my_bool has_path(const char *name)
+{
+ return test(strchr(name, FN_LIBCHAR))
+#ifdef FN_DEVCHAR
+ || test(strchr(name, FN_DEVCHAR))
+#endif
+ ;
+}