From 7dd2ec0f1b3cc4b6cfb192b314e246d12350c5f0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jan 2006 00:09:04 +0300 Subject: [PATCH] BUG#15935: post-review fixes: added comment --- sql/sql_update.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index edd16bb4bee..48a8cf93917 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -243,6 +243,16 @@ int mysql_update(THD *thd, DISK_BUFFER_SIZE, MYF(MY_WME))) goto err; + /* + When we get here, we have one of the following options: + A. used_index == MAX_KEY + This means we should use full table scan, and start it with + init_read_record call + B. used_index != MAX_KEY + B.1 quick select is used, start the scan with init_read_record + B.2 quick select is not used, this is full index scan (with LIMIT) + Full index scan must be started with init_read_record_idx + */ if (used_index == MAX_KEY || (select && select->quick)) init_read_record(&info,thd,table,select,0,1); else