1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-24 10:12:58 +03:00

MCOL-218: Make drop database work in the columnstore engine.

This commit is contained in:
Ben Thompson
2016-10-19 15:23:02 -05:00
parent 7c9e6e84c2
commit 87ac01c3d4
2 changed files with 20 additions and 9 deletions

View File

@@ -2043,7 +2043,16 @@ int ha_calpont_impl_delete_table_(const char *db, const char *name, cal_connecti
}
string emsg;
stmt = thd->query();
if (thd->lex->sql_command == SQLCOM_DROP_DB)
{
std::string tableName = std::string(name);
tableName.erase(0,tableName.rfind("/")+1);
stmt = std::string("DROP TABLE ") + std::string(tableName);
}
else
{
stmt = thd->query();
}
stmt += ";";
int rc = ProcessDDLStatement(stmt, schema, tbl, tid2sid(thd->thread_id), emsg);
// cout << "ProcessDDLStatement rc=" << rc << endl;