mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main sql/ha_ndbcluster.cc: Auto merged
This commit is contained in:
commit
8b4362b63a
1 changed files with 28 additions and 4 deletions
|
|
@ -4467,6 +4467,7 @@ int ha_ndbcluster::delete_table(const char *name)
|
|||
|
||||
int ha_ndbcluster::drop_table()
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
Ndb *ndb= get_ndb();
|
||||
NdbDictionary::Dictionary *dict= ndb->getDictionary();
|
||||
|
||||
|
|
@ -4474,8 +4475,21 @@ int ha_ndbcluster::drop_table()
|
|||
DBUG_PRINT("enter", ("Deleting %s", m_tabname));
|
||||
|
||||
release_metadata();
|
||||
if (dict->dropTable(m_tabname))
|
||||
while (dict->dropTable(m_tabname))
|
||||
{
|
||||
const NdbError err= dict->getNdbError();
|
||||
switch (err.status)
|
||||
{
|
||||
case NdbError::TemporaryError:
|
||||
if (!thd->killed)
|
||||
continue; // retry indefinitly
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ERR_RETURN(dict->getNdbError());
|
||||
}
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
|
@ -4884,14 +4898,24 @@ int ndbcluster_drop_database(const char *path)
|
|||
List_iterator_fast<char> it(drop_list);
|
||||
while ((tabname=it++))
|
||||
{
|
||||
if (dict->dropTable(tabname))
|
||||
while (dict->dropTable(tabname))
|
||||
{
|
||||
const NdbError err= dict->getNdbError();
|
||||
if (err.code != 709)
|
||||
switch (err.status)
|
||||
{
|
||||
case NdbError::TemporaryError:
|
||||
if (!thd->killed)
|
||||
continue; // retry indefinitly
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (err.code != 709) // 709: No such table existed
|
||||
{
|
||||
ERR_PRINT(err);
|
||||
ret= ndb_to_mysql_error(&err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue