summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-25 14:41:50 -0700
committerunknown <jimw@mysql.com>2005-05-25 14:41:50 -0700
commit55301a10b48b18982c4d569742416cd8fab7f7a6 (patch)
tree7d35096ef8333d70d2b25625c3d240ac6713aeb6
parentd8dbb83848a27c23325de6ebe7c9140b6810ce73 (diff)
downloadmariadb-git-55301a10b48b18982c4d569742416cd8fab7f7a6.tar.gz
Fix MERGE tables on Microsoft Windows. This a backport of the
fix from the main 5.0 tree. (Bug #10687) myisammrg/myrg_open.c: Call fn_format() if file has a path. mysys/my_getwd.c: Check for '/' even if it is not FN_LIBCHAR in has_path()
-rw-r--r--myisammrg/myrg_open.c4
-rw-r--r--mysys/my_getwd.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index 0dc2f4f9768..f9cdc2bb205 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -67,7 +67,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
while ((length=my_b_gets(&file,buff,FN_REFLEN-1)))
{
if ((end=buff+length)[-1] == '\n')
- end[-1]='\0';
+ *--end='\0';
if (!buff[0])
continue; /* Skip empty lines */
if (buff[0] == '#')
@@ -86,6 +86,8 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
sizeof(name_buff)-1-dir_length));
VOID(cleanup_dirname(buff,name_buff));
}
+ else
+ fn_format(buff, buff, "", "", 0);
if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0))))
goto err;
if (!m_info) /* First file */
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index 89f949eca27..5663ceaa60e 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -208,7 +208,10 @@ int test_if_hard_path(register const char *dir_name)
my_bool has_path(const char *name)
{
- return test(strchr(name, FN_LIBCHAR))
+ return test(strchr(name, FN_LIBCHAR))
+#if FN_LIBCHAR != '/'
+ || test(strchr(name,'/'))
+#endif
#ifdef FN_DEVCHAR
|| test(strchr(name, FN_DEVCHAR))
#endif