1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Partial backport of:

-----------------------------------------------------------
2497.392.1 Michael Widenius	2008-08-19
Fixes for Bug #38016 Maria: trying to access freed memory when
committing a transaction.
Don't write out states if they haven't changed.


sql/sql_table.cc:
  Call extra(HA_EXTRA_PREPARE_FOR_RENAME) before renaming a table.
This commit is contained in:
Konstantin Osipov
2009-12-11 14:12:47 +03:00
parent 1a122dc220
commit 42ed774073

View File

@ -7645,7 +7645,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
if (to->file->ha_end_bulk_insert() && error <= 0)
{
to->file->print_error(my_errno,MYF(0));
error=1;
error= 1;
}
to->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
@ -7673,6 +7673,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
to->file->ha_release_auto_increment();
if (to->file->ha_external_lock(thd,F_UNLCK))
error=1;
if (error < 0 && to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME))
error= 1;
DBUG_RETURN(error > 0 ? -1 : 0);
}