summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-03-02 15:05:12 +0200
committerunknown <monty@donna.mysql.fi>2001-03-02 15:05:12 +0200
commitf05438e1566a4c159578d1e269c59de6d8689f6f (patch)
tree3c8b71a524434f2f1b081307e8233910b2a05594 /sql/sql_delete.cc
parent30566fc0a7d2dfb0587369f43258507ea81f0111 (diff)
downloadmariadb-git-f05438e1566a4c159578d1e269c59de6d8689f6f.tar.gz
Avoid table scans when using DELETE on a table on which no SELECT has been done.
Docs/manual.texi: Cleanups
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index bb8f8591577..707ff814716 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -156,6 +156,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
limit != HA_POS_ERROR ? TL_WRITE_LOW_PRIORITY :
lock_type)))
DBUG_RETURN(-1);
+ table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
thd->proc_info="init";
if (use_generate_table)
DBUG_RETURN(generate_table(thd,table_list,table));