Commit c492ffcf authored by reggie@mdk10.(none)'s avatar reggie@mdk10.(none)

BUG#10687 - Merge engine fails under Windows

This final cset is to fix a syntax problem in ha_myisammrg.cc where a / was left out of a format string.
It also adds a check in has_path to avoid a possible redundant comparison.

ha_myisammrg.cc:
  Replaced missing / in format string
my_getwd.c:
  Added test to see if FN_LIBCHAR != '/' before doing comparison to avoid redundant comparison
parent 799b773a
......@@ -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)) || test(strchr(name,'/'))
return test(strchr(name, FN_LIBCHAR))
#if FN_LIBCHAR != '/'
|| test(strchr(name,'/'))
#endif
#ifdef FN_DEVCHAR
|| test(strchr(name, FN_DEVCHAR))
#endif
......
......@@ -406,7 +406,7 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
This means that it might not be possible to move the DATADIR of
an embedded server without changing the paths in the .MRG file.
*/
uint length= my_snprintf(buff, FN_REFLEN, "%s%s/%s", mysql_data_home,
uint length= my_snprintf(buff, FN_REFLEN, "%s/%s/%s", mysql_data_home,
tables->db, tables->real_name);
/*
If a MyISAM table is in the same directory as the MERGE table,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment