1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

merge with 3.23 to get:

- Fix for empty table/column names


mysql-test/t/create.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/grant.pl:
  Auto merged
sql/filesort.cc:
  merge with 3.23
sql/sql_table.cc:
  merge with 3.23
tests/grant.res:
  merge with 3.23
This commit is contained in:
unknown
2003-03-15 04:41:57 +02:00
7 changed files with 42 additions and 20 deletions

View File

@@ -1164,6 +1164,8 @@ bool check_db_name(char *name)
bool check_table_name(const char *name, uint length)
{
const char *end= name+length;
if (!length || length > NAME_LEN)
return 1;
while (name != end)
{
@@ -1187,6 +1189,8 @@ bool check_table_name(const char *name, uint length)
bool check_column_name(const char *name)
{
const char *start= name;
while (*name)
{
#if defined(USE_MB) && defined(USE_MB_IDENT)
@@ -1204,7 +1208,8 @@ bool check_column_name(const char *name)
return 1;
name++;
}
return 0;
/* Error if empty or too long column name */
return (name == start || (uint) (name - start) > NAME_LEN);
}
/*