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


mysys/my_getwd.c:
  Added test to see if FN_LIBCHAR != '/' before doing comparison to avoid redundant comparison
sql/ha_myisammrg.cc:
  Replaced missing / in format string
This commit is contained in:
unknown 2005-05-23 12:31:22 -05:00
parent 1b2a2c8647
commit 67c5514b90
2 changed files with 5 additions and 2 deletions

View File

@ -208,7 +208,10 @@ int test_if_hard_path(register const char *dir_name)
my_bool has_path(const char *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 #ifdef FN_DEVCHAR
|| test(strchr(name, FN_DEVCHAR)) || test(strchr(name, FN_DEVCHAR))
#endif #endif

View File

@ -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 This means that it might not be possible to move the DATADIR of
an embedded server without changing the paths in the .MRG file. 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); tables->db, tables->real_name);
/* /*
If a MyISAM table is in the same directory as the MERGE table, If a MyISAM table is in the same directory as the MERGE table,