summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2002-11-30 19:33:30 +0200
committerbell@sanja.is.com.ua <>2002-11-30 19:33:30 +0200
commit2ccb0eeb4fe09b4d688a34326411bb53b61f65cf (patch)
treeed41081be7cf06300b971cb3433b3445dc8977df /sql/sql_delete.cc
parent6a8e2a9cbc91ff7e9eb9958a0c5e758685f6c3b8 (diff)
parent9da705ef2ffd2f157565a6fa9522d7de6d1aa95e (diff)
downloadmariadb-git-2ccb0eeb4fe09b4d688a34326411bb53b61f65cf.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-crash-4.1
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 07958ebcfab..fe1a967f936 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -51,6 +51,12 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
if (setup_conds(thd, delete_table_list, &conds) ||
setup_ftfuncs(&thd->lex.select_lex))
DBUG_RETURN(-1);
+ if (find_real_table_in_list(table_list->next,
+ table_list->db, table_list->real_name))
+ {
+ my_error(ER_INSERT_TABLE_USED, MYF(0), table_list->real_name);
+ DBUG_RETURN(-1);
+ }
const_cond= (!conds || conds->const_item());
safe_update=test(thd->options & OPTION_SAFE_UPDATES);