1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG# 10687 - MERGE engine fails under Windows

This patch was submitted by Ingo and it appears to work correctly.


sql/ha_myisammrg.cc:
  use FN_LIBCHAR instead of / so buff works correctly on Windows
strings/my_vsnprintf.c:
  add support for %c to my_vsnprintf
This commit is contained in:
unknown
2005-05-19 16:02:14 -05:00
parent f4a584f501
commit 1da5382a9f
2 changed files with 10 additions and 3 deletions

View File

@ -406,8 +406,8 @@ 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%c%s/%s", mysql_data_home,
tables->db, tables->real_name); FN_LIBCHAR, 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,
we use the table name without a path. This means that the we use the table name without a path. This means that the
@ -422,6 +422,7 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
} }
else else
table_name=(*tbl)->path; table_name=(*tbl)->path;
DBUG_PRINT("info",("MyISAM table_name: '%s'", table_name));
*pos++= table_name; *pos++= table_name;
} }
*pos=0; *pos=0;

View File

@ -28,7 +28,8 @@
%#[l]u %#[l]u
%#[l]x %#[l]x
%#.#s Note first # is ignored %#.#s Note first # is ignored
%c
RETURN RETURN
length of result string length of result string
*/ */
@ -120,6 +121,11 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
to+= res_length; to+= res_length;
continue; continue;
} }
else if (*fmt == 'c')
{
*(to++)= (char) va_arg(ap, int);
continue;
}
/* We come here on '%%', unknown code or too long parameter */ /* We come here on '%%', unknown code or too long parameter */
if (to == end) if (to == end)
break; break;