1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed wrong merge

Optimize new pushed code
This commit is contained in:
monty@mysql.com
2005-11-02 14:43:25 +02:00
parent 438e8b6d6a
commit 164b469660
2 changed files with 3 additions and 5 deletions

View File

@ -121,7 +121,7 @@ int mysql_update(THD *thd,
bool safe_update= thd->options & OPTION_SAFE_UPDATES;
bool used_key_is_modified, transactional_table;
int res;
int error=0;
int error;
uint used_index= MAX_KEY;
bool need_sort= TRUE;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@ -132,7 +132,7 @@ int mysql_update(THD *thd,
ha_rows updated, found;
key_map old_used_keys;
TABLE *table;
SQL_SELECT *select= 0;
SQL_SELECT *select;
READ_RECORD info;
SELECT_LEX *select_lex= &thd->lex->select_lex;
bool need_reopen;
@ -237,8 +237,7 @@ int mysql_update(THD *thd,
}
// Don't count on usage of 'only index' when calculating which key to use
table->used_keys.clear_all();
if (limit)
select= make_select(table, 0, 0, conds, 0, &error);
select= make_select(table, 0, 0, conds, 0, &error);
if (error || !limit ||
(select && select->check_quick(thd, safe_update, limit)))
{