1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Check for empty table/column names

mysql-test/t/create.test:
  Test for empty table/column name
tests/grant.pl:
  More tests
tests/grant.res:
  More tests
This commit is contained in:
unknown
2003-03-14 17:08:42 +02:00
parent f3eb7fe0c3
commit 03b0df9481
6 changed files with 35 additions and 10 deletions

View File

@@ -2758,8 +2758,7 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias,
if (!table)
DBUG_RETURN(0); // End of memory
alias_str= alias ? alias->str : table->table.str;
if (table->table.length > NAME_LEN ||
check_table_name(table->table.str,table->table.length) ||
if (check_table_name(table->table.str,table->table.length) ||
table->db.str && check_db_name(table->db.str))
{
net_printf(&thd->net,ER_WRONG_TABLE_NAME,table->table.str);