From eecdbe9c7bbbfeeafc9aae3991a962aee93733d7 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Wed, 7 Mar 2018 22:39:05 +0300 Subject: [PATCH] Update InterpreterShowCreateQuery.cpp --- dbms/src/Interpreters/InterpreterShowCreateQuery.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp b/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp index 7132a356f02..186c8e58338 100644 --- a/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp +++ b/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp @@ -41,16 +41,16 @@ BlockInputStreamPtr InterpreterShowCreateQuery::executeImpl() const ASTShowCreateQuery & ast = typeid_cast(*query_ptr); if (ast.temporary && !ast.database.empty()) - throw Exception("Can't add database When using `TEMPORARY`", ErrorCodes::SYNTAX_ERROR); + throw Exception("Temporary databases are not possible.", ErrorCodes::SYNTAX_ERROR); - ASTPtr createQuery = (ast.temporary ? context.getCreateExternalQuery(ast.table) : + ASTPtr create_query = (ast.temporary ? context.getCreateExternalQuery(ast.table) : context.getCreateQuery(ast.database, ast.table)); - if (!createQuery && ast.temporary) - throw Exception("Unable to show the create query of " + ast.table + ", It maybe created by system."); + if (!create_query && ast.temporary) + throw Exception("Unable to show the create query of " + ast.table + ". Maybe it is created by the system."); std::stringstream stream; - formatAST(*createQuery, stream, false, true); + formatAST(*create_query, stream, false, true); String res = stream.str(); MutableColumnPtr column = ColumnString::create();