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
This commit is contained in:
Michael Widenius 2010-08-27 17:12:44 +03:00
commit ad6d95d3cb
246 changed files with 3488 additions and 1500 deletions

View file

@ -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