mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/5.0
This commit is contained in:
@@ -1592,7 +1592,7 @@ char *get_field(MEM_ROOT *mem, Field *field)
|
||||
|
||||
bool check_db_name(char *name)
|
||||
{
|
||||
uint name_length= 0; // name length in symbols
|
||||
char *start= name;
|
||||
/* Used to catch empty names and names with end space */
|
||||
bool last_char_is_space= TRUE;
|
||||
|
||||
@@ -1609,7 +1609,6 @@ bool check_db_name(char *name)
|
||||
name+system_charset_info->mbmaxlen);
|
||||
if (len)
|
||||
{
|
||||
name_length++;
|
||||
name += len;
|
||||
continue;
|
||||
}
|
||||
@@ -1617,13 +1616,12 @@ bool check_db_name(char *name)
|
||||
#else
|
||||
last_char_is_space= *name==' ';
|
||||
#endif
|
||||
name_length++;
|
||||
if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
|
||||
*name == FN_EXTCHAR)
|
||||
return 1;
|
||||
name++;
|
||||
}
|
||||
return (last_char_is_space || name_length > NAME_LEN);
|
||||
return last_char_is_space || (uint) (name - start) > NAME_LEN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user