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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user