1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/my/mysql-4.0


sql/sql_table.cc:
  Auto merged
This commit is contained in:
unknown
2004-10-06 01:25:55 +03:00
7 changed files with 116 additions and 158 deletions

View File

@@ -2209,11 +2209,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
DBUG_RETURN(-1); /* purecov: inspected */
if (to->file->external_lock(thd, F_WRLCK))
{
/* We must always unlock, even when lock failed. */
(void) to->file->external_lock(thd, F_UNLCK);
DBUG_RETURN(-1);
}
to->file->extra(HA_EXTRA_WRITE_CACHE);
from->file->info(HA_STATUS_VARIABLE);
to->file->deactivate_non_unique_index(from->file->records);
@@ -2313,11 +2309,11 @@ copy_data_between_tables(TABLE *from,TABLE *to,
error=1;
if (ha_commit(thd))
error=1;
err:
free_io_cache(from);
*copied= found_count;
*deleted=delete_count;
/* we must always unlock the table on return. */
if (to->file->external_lock(thd,F_UNLCK))
error=1;
DBUG_RETURN(error > 0 ? -1 : 0);