diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-27 17:12:44 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-27 17:12:44 +0300 |
commit | ad6d95d3cb420557cfc7efa658181a8d20b4c154 (patch) | |
tree | 984bb45ca187a6cc38c7132a9600d91515df564e /sql/sql_update.cc | |
parent | 9bc9855c16f815e71223398ef17cd6052becc44e (diff) | |
parent | 7909541953de43c7b7d16513c8d612cfe405af67 (diff) | |
download | mariadb-git-ad6d95d3cb420557cfc7efa658181a8d20b4c154.tar.gz |
Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
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 fc45b3d31a2..f6165b8d4b2 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -467,11 +467,10 @@ 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) { 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 */ @@ -490,7 +489,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 |