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

Make drop table work

This commit is contained in:
David Hall
2016-02-18 16:36:15 -06:00
parent deb94b245e
commit f458cb46cc
4 changed files with 18 additions and 25 deletions

View File

@@ -2094,13 +2094,14 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
return rc;
}
int ha_calpont_impl_delete_table_(const char *name, cal_connection_info& ci)
int ha_calpont_impl_delete_table_(const char *db, const char *name, cal_connection_info& ci)
{
#ifdef INFINIDB_DEBUG
cout << "ha_calpont_impl_delete_table: " << name << endl;
cout << "ha_calpont_impl_delete_table: " << db << name << endl;
#endif
THD *thd = current_thd;
std::string tbl(name);
std::string schema(db);
std::string stmt(idb_mysql_query_str(thd));
algorithm::to_upper(stmt);
// @bug 4158 allow table name with 'restrict' in it (but not by itself)
@@ -2124,12 +2125,10 @@ int ha_calpont_impl_delete_table_(const char *name, cal_connection_info& ci)
return 1;
}
TABLE_LIST *first_table= (TABLE_LIST*) thd->lex->select_lex.table_list.first;
string db = first_table->table->s->db.str;
string emsg;
stmt = idb_mysql_query_str(thd);
stmt += ";";
int rc = ProcessDDLStatement(stmt, db, tbl, tid2sid(thd->thread_id), emsg);
int rc = ProcessDDLStatement(stmt, schema, tbl, tid2sid(thd->thread_id), emsg);
if (rc != 0)
push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 9999, emsg.c_str());
return rc;