From f0ebc8561e662e129c02b870a63fced3547be9ec Mon Sep 17 00:00:00 2001 From: Chuan Liu Date: Thu, 21 Jan 2021 14:00:53 -0800 Subject: [PATCH] Fix duplicate table creation in global db (#498) --- production/catalog/src/ddl_executor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/production/catalog/src/ddl_executor.cpp b/production/catalog/src/ddl_executor.cpp index e63a7385c4a9..847394b0be18 100644 --- a/production/catalog/src/ddl_executor.cpp +++ b/production/catalog/src/ddl_executor.cpp @@ -8,6 +8,7 @@ #include #include "gaia/common.hpp" +#include "gaia/db/catalog.hpp" #include "gaia/exception.hpp" #include "db_helpers.hpp" #include "fbs_generator.hpp" @@ -693,7 +694,7 @@ inline gaia_id_t ddl_executor_t::find_db_id_no_lock(const string& dbname) const string ddl_executor_t::get_full_table_name(const string& db, const string& table) { - if (db.empty()) + if (db.empty() || db == c_empty_db_name) { return table; }