Commit 3a9af055 authored by mskold@mysql.com's avatar mskold@mysql.com

Post review fix of ndbcluster_drop_database

parent 71c7c0d3
/* Copyright (C) 2000-2003 MySQL AB
/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -4327,6 +4327,7 @@ int ndbcluster_drop_database(const char *path)
uint i;
char *tabname;
List<char> drop_list;
int ret= 0;
ha_ndbcluster::set_dbname(path, (char *)&dbname);
DBUG_PRINT("enter", ("db: %s", dbname));
......@@ -4353,10 +4354,15 @@ int ndbcluster_drop_database(const char *path)
ndb->setDatabaseName(dbname);
List_iterator_fast<char> it(drop_list);
while ((tabname=it++))
if (dict->dropTable(tabname))
ERR_RETURN(dict->getNdbError());
DBUG_RETURN(0);
{
if (!dict->dropTable(tabname))
{
const NdbError err= dict->getNdbError();
if (err.code != 709)
ret= ndb_to_mysql_error(&err);
}
}
DBUG_RETURN(ret);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment