1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Additional fixes for WL#1892

sql/ha_ndbcluster.cc:
  Additional fixes for WL#1892, disable autodiscover during add/drop index
sql/ha_ndbcluster.h:
  Additional fixes for WL#1892, disable autodiscover during add/drop index
sql/sql_table.cc:
  Additional fixes for WL#1892, removed double commit + added call to create_handler_files after create/drop index
mysql-test/r/ndb_alter_table_row.result:
  Additional fixes for WL#1892, changed test case
mysql-test/t/ndb_alter_table_row.test:
  Additional fixes for WL#1892, changed test case
This commit is contained in:
unknown
2006-01-17 12:53:49 +01:00
parent ebf577974e
commit 8656d587ba
5 changed files with 118 additions and 40 deletions

View File

@@ -3562,6 +3562,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";
@@ -4968,6 +4969,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*/
@@ -5099,7 +5101,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)
@@ -5116,7 +5117,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
{
/*
@@ -5166,11 +5166,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 &&