diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-19 11:21:24 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-19 11:21:24 +0200 |
commit | d4885416b7810f39a71f5c6aa28950a6e2e1e0c3 (patch) | |
tree | 2c2ad483bc3b231cd58c6b29bb7e1426ea14cd70 /sql/sql_update.cc | |
parent | 7e9f53acdf259a4a474f646a162399cb7ee6f947 (diff) | |
parent | 4b2378a1484ec3aa9be43f585c231c402eacf806 (diff) | |
download | mariadb-git-d4885416b7810f39a71f5c6aa28950a6e2e1e0c3.tar.gz |
manual merge from mysql-5.1-bugteam
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 25c1fd6fa1e..c52467531a9 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -477,7 +477,14 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { thd->examined_row_count++; - if (!(select && select->skip_record())) + bool skip_record= FALSE; + if (select && select->skip_record(thd, &skip_record)) + { + error= 1; + table->file->unlock_row(); + break; + } + if (!skip_record) { if (table->file->was_semi_consistent_read()) continue; /* repeat the read of the same row if it still exists */ @@ -584,7 +591,8 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { thd->examined_row_count++; - if (!(select && select->skip_record())) + bool skip_record; + if (!select || (!select->skip_record(thd, &skip_record) && !skip_record)) { if (table->file->was_semi_consistent_read()) continue; /* repeat the read of the same row if it still exists */ |