1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-20 01:42:27 +03:00

Merge pull request #435 from mariadb-corporation/1325

MCOL-1325 rename table fails when database different than current dat…
This commit is contained in:
Roman Nozdrin
2018-04-05 02:47:10 +03:00
committed by GitHub

View File

@@ -2074,16 +2074,14 @@ int ha_calpont_impl_rename_table_(const char* from, const char* to, cal_connecti
stmt = stmt1.str();
string db;
if ( thd->db )
db = thd->db;
else if ( fromPair.first.length() !=0 )
if ( fromPair.first.length() !=0 )
db = fromPair.first;
else
db = toPair.first;
else if ( thd->db )
db = thd->db;
int rc = ProcessDDLStatement(stmt, db, "", tid2sid(thd->thread_id), emsg);
if (rc != 0)
push_warning(thd, Sql_condition::WARN_LEVEL_ERROR, 9999, emsg.c_str());
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, emsg.c_str());
return rc;
}