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

Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge

into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
This commit is contained in:
kroki/tomash@moonlight.intranet
2006-08-09 13:37:20 +04:00
25 changed files with 260 additions and 4952 deletions

View File

@ -6380,7 +6380,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
if (!table)
DBUG_RETURN(0); // End of memory
alias_str= alias ? alias->str : table->table.str;
if (check_table_name(table->table.str,table->table.length))
if (check_table_name(table->table.str, table->table.length))
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
DBUG_RETURN(0);
@ -6406,6 +6406,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
DBUG_RETURN(0); /* purecov: inspected */
if (table->db.str)
{
if (table->is_derived_table() == FALSE && check_db_name(table->db.str))
{
my_error(ER_WRONG_DB_NAME, MYF(0), table->db.str);
DBUG_RETURN(0);
}
ptr->db= table->db.str;
ptr->db_length= table->db.length;
}