diff options
author | unknown <serg@serg.mylan> | 2003-10-15 12:25:44 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-10-15 12:25:44 +0200 |
commit | b192ab5edc45bf221f99ed53ce4d975160d830fa (patch) | |
tree | 39df3a873ccd4aba6541c6659c5508843742f8be /sql/sql_update.cc | |
parent | 9456073f90354e82c8b31335bac1d486c88f2f4a (diff) | |
parent | bbfa68d10202df2bf6bc8193d3355fb22f31cff7 (diff) | |
download | mariadb-git-b192ab5edc45bf221f99ed53ce4d975160d830fa.tar.gz |
merged
BitKeeper/etc/ignore:
auto-union
myisam/myisamdef.h:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/table.cc:
Auto merged
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 2ecc526a612..4cf5f740d17 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -85,7 +85,7 @@ int mysql_update(THD *thd, /* Calculate "table->used_keys" based on the WHERE */ table->used_keys=table->keys_in_use; - table->quick_keys=0; + table->quick_keys.clear_all(); #ifndef NO_EMBEDDED_ACCESS_CHECKS want_privilege=table->grant.want_privilege; table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege); @@ -149,7 +149,7 @@ int mysql_update(THD *thd, } // Don't count on usage of 'only index' when calculating which key to use - table->used_keys=0; + table->used_keys.clear_all(); select=make_select(table,0,0,conds,&error); if (error || (select && select->check_quick(safe_update, limit)) || !limit) @@ -164,7 +164,7 @@ int mysql_update(THD *thd, DBUG_RETURN(0); } /* If running in safe sql mode, don't allow updates without keys */ - if (!table->quick_keys) + if (table->quick_keys.is_clear_all()) { thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; if (safe_update && !using_limit) @@ -192,7 +192,7 @@ int mysql_update(THD *thd, matching rows before updating the table! */ table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS); - if (old_used_keys & ((key_map) 1 << used_index)) + if (old_used_keys.is_set(used_index)) { table->key_read=1; table->file->extra(HA_EXTRA_KEYREAD); @@ -501,8 +501,7 @@ int multi_update::prepare(List<Item> ¬_used_values, SELECT_LEX_UNIT *unit) if (!tables_to_update) { - my_error(ER_NOT_SUPPORTED_YET, MYF(0), - "You didn't specify any tables to UPDATE"); + my_error(ER_NO_TABLES_USED, MYF(0)); DBUG_RETURN(1); } @@ -533,7 +532,7 @@ int multi_update::prepare(List<Item> ¬_used_values, SELECT_LEX_UNIT *unit) update.link_in_list((byte*) tl, (byte**) &tl->next); tl->shared= table_count++; table->no_keyread=1; - table->used_keys=0; + table->used_keys.clear_all(); table->pos_in_table_list= tl; } } |