diff --git a/dbcon/mysql/ha_calpont_ddl.cpp b/dbcon/mysql/ha_calpont_ddl.cpp index 68f963825..611f1da3b 100755 --- a/dbcon/mysql/ha_calpont_ddl.cpp +++ b/dbcon/mysql/ha_calpont_ddl.cpp @@ -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; }