diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
commit | a3d80d952d7b99680ca4a3a89e128ecc0d490c10 (patch) | |
tree | 0d72ee69e037cdd09618ddb53652dd1b220890dc /sql/sql_update.cc | |
parent | ec06ba24553d2d83b3a6a6bc4d8150910b01ee7c (diff) | |
parent | 966661c8cc75dd7d540a5fe40b4d893c40e91d26 (diff) | |
download | mariadb-git-a3d80d952d7b99680ca4a3a89e128ecc0d490c10.tar.gz |
merge with 5.1
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 15251e956be..60bbd0d886a 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -470,12 +470,11 @@ int mysql_update(THD *thd, thd_proc_info(thd, "Searching rows for update"); ha_rows tmp_limit= limit; - while (!(error=info.read_record(&info)) && - !thd->killed && !thd->is_error()) + while (!(error=info.read_record(&info)) && !thd->killed) { update_virtual_fields(thd, table); thd->examined_row_count++; - if (!select || select->skip_record(thd) > 0) + if (!select || (error= select->skip_record(thd)) > 0) { if (table->file->was_semi_consistent_read()) continue; /* repeat the read of the same row if it still exists */ @@ -494,7 +493,15 @@ int mysql_update(THD *thd, } } else + { table->file->unlock_row(); + if (error < 0) + { + /* Fatal error from select->skip_record() */ + error= 1; + break; + } + } } if (thd->killed && !error) error= 1; // Aborted |