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

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
246 changed files with 3488 additions and 1500 deletions

View File

@@ -6883,6 +6883,14 @@ view_err:
if (!error && (new_name != table_name || new_db != db))
{
thd_proc_info(thd, "rename");
/*
Workaround InnoDB ending the transaction when the table instance
is unlocked/closed (close_cached_table below), otherwise the trx
state will differ between the server and storage engine layers.
*/
ha_autocommit_or_rollback(thd, 0);
/*
Then do a 'simple' rename of the table. First we need to close all
instances of 'source' table.
@@ -7430,6 +7438,11 @@ view_err:
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
/*
If LOCK TABLES list is not empty and contains this table,
unlock the table and remove the table from this list.
*/
mysql_lock_remove(thd, thd->locked_tables, table, FALSE);
/* Remove link to old table and rename the new one */
close_temporary_table(thd, table, 1, 1);
/* Should pass the 'new_name' as we store table name in the cache */