summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorgkodinov/kgeorge@rakia.(none) <>2006-09-05 13:12:30 +0300
committergkodinov/kgeorge@rakia.(none) <>2006-09-05 13:12:30 +0300
commit68b9ae4d14230514de87203f184eb892086d2084 (patch)
tree46ccb1fdf17163d2c06a25212defe887cd042e92 /sql/sql_parse.cc
parentcf3bed86b553fa410a5ef73cfdd397a491f0bdd3 (diff)
parent3758b975f8c535917c9507b005ccc8ff5a76bfb8 (diff)
downloadmariadb-git-68b9ae4d14230514de87203f184eb892086d2084.tar.gz
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into rakia.(none):/home/kgeorge/mysql/autopush/B21392-4.1-opt
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 89ecceeb1bf..59c4026ba7f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4863,6 +4863,7 @@ bool add_to_list(THD *thd, SQL_LIST &list,Item *item,bool asc)
table_options A set of the following bits:
TL_OPTION_UPDATING Table will be updated
TL_OPTION_FORCE_INDEX Force usage of index
+ TL_OPTION_ALIAS an alias in multi table DELETE
lock_type How table should be locked
use_index List of indexed used in USE INDEX
ignore_index List of indexed used in IGNORE INDEX
@@ -4888,7 +4889,8 @@ 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 (!test(table_options & TL_OPTION_ALIAS) &&
+ check_table_name(table->table.str,table->table.length) ||
table->db.str && check_db_name(table->db.str))
{
net_printf(thd, ER_WRONG_TABLE_NAME, table->table.str);