1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
This commit is contained in:
mskold@mysql.com
2006-01-17 18:35:15 +01:00
5 changed files with 119 additions and 40 deletions

View File

@ -3842,6 +3842,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
uint *index_drop_buffer;
uint index_add_count;
uint *index_add_buffer;
bool committed= 0;
DBUG_ENTER("mysql_alter_table");
thd->proc_info="init";
@ -4759,6 +4760,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
DBUG_PRINT("info", ("Committing after add/drop index"));
if (ha_commit_stmt(thd) || ha_commit(thd))
goto err;
committed= 1;
}
}
/*end of if (! new_table) for add/drop index*/
@ -4890,7 +4892,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
VOID(pthread_mutex_unlock(&LOCK_open));
goto err;
}
#ifdef XXX_TO_BE_DONE_LATER_BY_WL1892
if (! need_copy_table)
{
if (! table)
@ -4907,7 +4908,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
}
}
#endif
if (thd->lock || new_name != table_name) // True if WIN32
{
/*
@ -4957,11 +4957,14 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
wait_if_global_read_lock(), which could create a deadlock if called
with LOCK_open.
*/
error = ha_commit_stmt(thd);
if (ha_commit(thd))
error=1;
if (error)
goto err;
if (!committed)
{
error = ha_commit_stmt(thd);
if (ha_commit(thd))
error=1;
if (error)
goto err;
}
thd->proc_info="end";
DBUG_ASSERT(!(mysql_bin_log.is_open() && binlog_row_based &&