提交 f81d9b4e 编写于 作者: V Vitaly Baranov

Fix DROP DICTIONARY IF EXISTS db.dict - now it doesn't throw exceptions

even if db doesn't exist.
上级 57740788
......@@ -164,7 +164,7 @@ BlockIO InterpreterDropQuery::executeToDictionary(
auto ddl_guard = (!no_ddl_lock ? context.getDDLGuard(database_name, dictionary_name) : nullptr);
DatabasePtr database = tryGetDatabase(database_name, false);
DatabasePtr database = tryGetDatabase(database_name, if_exists);
if (!database || !database->isDictionaryExist(context, dictionary_name))
{
......
DROP TABLE IF EXISTS dictdb.table_for_dict;
DROP DICTIONARY IF EXISTS dictdb.dict_exists;
DROP DATABASE IF EXISTS dictdb;
CREATE DATABASE dictdb ENGINE = Ordinary;
......@@ -37,4 +39,6 @@ LAYOUT(FLAT());
SELECT dictGetFloat64('dictdb.dict_exists', 'value', toUInt64(1));
DROP DATABASE IF EXISTS dictdb;
DROP TABLE dictdb.table_for_dict;
DROP DICTIONARY dictdb.dict_exists;
DROP DATABASE dictdb;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册