summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-01-24 19:41:42 +0100
committerunknown <serg@serg.mylan>2005-01-24 19:41:42 +0100
commita82fd1eaec9067bbed9cceb9294734a8d09b72da (patch)
tree0c73a61f5c88d003eae464001af7656745e9ba4e /sql/sql_update.cc
parent7eb825a07280dfeb1bae3def25a3bc0add544a74 (diff)
parent7109999b92ec8541a61ca5babc5b06f4315478a8 (diff)
downloadmariadb-git-a82fd1eaec9067bbed9cceb9294734a8d09b72da.tar.gz
merged
BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4: Auto merged client/mysql.cc: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/mi_packrec.c: Auto merged myisam/sort.c: Auto merged mysql-test/r/fulltext.result: Auto merged sql/item_create.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/log.cc: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.h: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_db.cc: Auto merged sql/tztime.cc: Auto merged tests/client_test.c: Auto merged
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index d2220cd67c3..f9ad513ea6a 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -120,7 +120,7 @@ int mysql_update(THD *thd,
bool used_key_is_modified, transactional_table, log_delayed;
int res;
int error=0;
- uint used_index;
+ uint used_index= MAX_KEY;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
uint want_privilege;
#endif
@@ -134,7 +134,6 @@ int mysql_update(THD *thd,
SELECT_LEX *select_lex= &thd->lex->select_lex;
DBUG_ENTER("mysql_update");
- LINT_INIT(used_index);
LINT_INIT(timestamp_query_id);
if (open_tables(thd, table_list, &table_count))
@@ -273,7 +272,7 @@ int mysql_update(THD *thd,
matching rows before updating the table!
*/
table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
- if ( (used_index != MAX_KEY) && old_used_keys.is_set(used_index))
+ if (used_index < MAX_KEY && old_used_keys.is_set(used_index))
{
table->key_read=1;
table->file->extra(HA_EXTRA_KEYREAD);