1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr/home/bar/mysql-5.1-new.b17870v1
This commit is contained in:
bar@mysql.com
2006-04-19 09:50:17 +05:00
6 changed files with 142 additions and 7 deletions

View File

@ -72,12 +72,19 @@ uint filename_to_tablename(const char *from, char *to, uint to_length)
uint tablename_to_filename(const char *from, char *to, uint to_length)
{
uint errors;
uint errors, length;
if (from[0] == '#' && !strncmp(from, MYSQL50_TABLE_NAME_PREFIX,
MYSQL50_TABLE_NAME_PREFIX_LENGTH))
return my_snprintf(to, to_length, "%s", from + 9);
return strconvert(system_charset_info, from,
&my_charset_filename, to, to_length, &errors);
length= strconvert(system_charset_info, from,
&my_charset_filename, to, to_length, &errors);
if (check_if_legal_tablename(to) &&
length + 4 < to_length)
{
memcpy(to + length, "@@@", 4);
length+= 3;
}
return length;
}