diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-10-19 20:38:59 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-10-19 20:38:59 +0200 |
commit | e1f681c99b3e5462c033aaafa94ac295e626cde2 (patch) | |
tree | 2da5eff1a0d03831c2d85b32a7bc3df6ec37b522 /sql/sql_update.cc | |
parent | 52c84d144d3b07966d9b3bab8694eb012eef69ce (diff) | |
parent | 807fef40fffbbb8e92564a52b902b504ba8cfcdc (diff) | |
download | mariadb-git-e1f681c99b3e5462c033aaafa94ac295e626cde2.tar.gz |
10.0-base -> 10.0-monty
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 4b536c71fd6..549e59329aa 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -406,7 +406,7 @@ int mysql_update(THD *thd, table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); select= make_select(table, 0, 0, conds, 0, &error); - if (error || !limit || + if (error || !limit || thd->is_error() || (select && select->check_quick(thd, safe_update, limit))) { delete select; @@ -498,13 +498,15 @@ int mysql_update(THD *thd, uint length= 0; SORT_FIELD *sortorder; ha_rows examined_rows; + ha_rows found_rows; table->sort.io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); if (!(sortorder=make_unireg_sortorder(order, &length, NULL)) || (table->sort.found_records= filesort(thd, table, sortorder, length, - select, limit, 1, - &examined_rows)) + select, limit, + true, + &examined_rows, &found_rows)) == HA_POS_ERROR) { goto err; |