summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-04-17 15:44:30 +0200
committerunknown <serg@janus.mylan>2007-04-17 15:44:30 +0200
commit4c7e7e480694121f5d0a97fd42f48180acfdd58d (patch)
tree640d6e3f226b4c4f61bd064ab87bc85943445a53 /sql/sql_delete.cc
parent46e6f519f7ed9491e008d9bff9d16bba03c1a58a (diff)
parentd9a964365ba6f7f83962e2101e6297d9661bf4bb (diff)
downloadmariadb-git-4c7e7e480694121f5d0a97fd42f48180acfdd58d.tar.gz
Merge janus.mylan:/usr/home/serg/Abk/mysql-5.0
into janus.mylan:/usr/home/serg/Abk/mysql-5.1-build sql/sql_delete.cc: Auto merged sql/sql_lex.cc: Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index a2095a8382e..4e865a12b66 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -394,8 +394,6 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
{
Item *fake_conds= 0;
SELECT_LEX *select_lex= &thd->lex->select_lex;
- const char *operation = thd->lex->sql_command == SQLCOM_TRUNCATE ?
- "TRUNCATE" : "DELETE";
DBUG_ENTER("mysql_prepare_delete");
List<Item> all_fields;
@@ -410,14 +408,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
DBUG_RETURN(TRUE);
if (!table_list->updatable || check_key_in_view(thd, table_list))
{
- my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, operation);
+ my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE");
DBUG_RETURN(TRUE);
}
{
TABLE_LIST *duplicate;
if ((duplicate= unique_table(thd, table_list, table_list->next_global, 0)))
{
- update_non_unique_table_error(table_list, operation, duplicate);
+ update_non_unique_table_error(table_list, "DELETE", duplicate);
DBUG_RETURN(TRUE);
}
}
@@ -935,8 +933,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if (!dont_send_ok)
{
enum legacy_db_type table_type;
- if (mysql_frm_type(thd, path, &table_type) == FRMTYPE_VIEW)
- goto trunc_by_del;
+ mysql_frm_type(thd, path, &table_type);
if (table_type == DB_TYPE_UNKNOWN)
{
my_error(ER_NO_SUCH_TABLE, MYF(0),