diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-06-06 13:19:29 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-06-06 13:19:29 +0200 |
commit | 142a162c665704ce5b4d5b671d05a068661c088a (patch) | |
tree | def1ebab09889a8f09a9fcd074c8a672689376af /sql/sql_delete.cc | |
parent | cbf4019a1b3ec82bdcd9a65db114908a920fb01c (diff) | |
parent | 60a9d9bbb94ac03159bcc2d75b649abb1c9dc956 (diff) | |
download | mariadb-git-142a162c665704ce5b4d5b671d05a068661c088a.tar.gz |
manual merge from mysql-trunk-bugfixing
Conflicts:
Text conflict in mysql-test/r/archive.result
Contents conflict in mysql-test/r/innodb_bug38231.result
Text conflict in mysql-test/r/mdl_sync.result
Text conflict in mysql-test/suite/binlog/t/disabled.def
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result
Text conflict in mysql-test/t/archive.test
Contents conflict in mysql-test/t/innodb_bug38231.test
Text conflict in mysql-test/t/mdl_sync.test
Text conflict in sql/sp_head.cc
Text conflict in sql/sql_show.cc
Text conflict in sql/table.cc
Text conflict in sql/table.h
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 730cb711a05..ece72e97d0d 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -25,8 +25,7 @@ #include "sql_cache.h" // query_cache_* #include "sql_base.h" // open_temprary_table #include "sql_table.h" // build_table_filename -#include "lock.h" // lock_and_wait_for_table_name, - // unlock_table_name +#include "lock.h" // unlock_table_name #include "sql_view.h" // check_key_in_view, mysql_frm_type #include "sql_parse.h" // mysql_init_select #include "sql_acl.h" // *_ACL @@ -243,6 +242,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, free_underlaid_joins(thd, &thd->lex->select_lex); DBUG_RETURN(TRUE); } + thd->examined_row_count+= examined_rows; /* Filesort has already found and selected the rows we want to delete, so we don't need the where clause @@ -260,7 +260,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, free_underlaid_joins(thd, select_lex); DBUG_RETURN(TRUE); } - if (usable_index==MAX_KEY) + if (usable_index==MAX_KEY || (select && select->quick)) init_read_record(&info, thd, table, select, 1, 1, FALSE); else init_read_record_idx(&info, thd, table, 1, usable_index); @@ -289,6 +289,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, while (!(error=info.read_record(&info)) && !thd->killed && ! thd->is_error()) { + thd->examined_row_count++; // thd->is_error() is tested to disallow delete row on error if (!(select && select->skip_record())&& ! thd->is_error() ) { |