mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Show create query for temporary tables in system.tables
This commit is contained in:
parent
ede755d3bc
commit
af3ccb49f1
@ -199,7 +199,11 @@ protected:
|
||||
|
||||
// create_table_query
|
||||
if (columns_mask[src_index++])
|
||||
res_columns[res_index++]->insertDefault();
|
||||
{
|
||||
auto temp_db = DatabaseCatalog::instance().getDatabaseForTemporaryTables();
|
||||
ASTPtr ast = temp_db ? temp_db->tryGetCreateTableQuery(table.second->getStorageID().getTableName(), context) : nullptr;
|
||||
res_columns[res_index++]->insert(ast ? queryToString(ast) : "");
|
||||
}
|
||||
|
||||
// engine_full
|
||||
if (columns_mask[src_index++])
|
||||
|
@ -2,7 +2,7 @@
|
||||
1
|
||||
1
|
||||
1
|
||||
t_00693 Memory 1 [] 1970-01-01 00:00:00 [] [] Memory \N \N
|
||||
t_00693 Memory 1 [] 1970-01-01 00:00:00 [] [] CREATE TEMPORARY TABLE t_00693 (`x` UInt8) ENGINE = Memory Memory \N \N
|
||||
1
|
||||
1
|
||||
1
|
||||
|
Loading…
Reference in New Issue
Block a user