Fix memory leak

This commit is contained in:
alekseygolub 2023-05-01 18:00:26 +00:00
parent 3d1affbddb
commit 64d232f1aa
3 changed files with 5 additions and 5 deletions

View File

@ -346,7 +346,7 @@ DatabaseAndTable DatabaseCatalog::getTableImpl(
catch (const Exception & e) catch (const Exception & e)
{ {
if (exception) if (exception)
exception->emplace(*e.clone()); exception->emplace(e);
} }
if (!table) if (!table)

View File

@ -8,9 +8,9 @@ test1
13 14 15 13 14 15
16 17 18 16 17 18
0 0 0 0 0 0
20 21 22 10 11 12
23 24 25 13 14 15
26 27 28 16 17 18
0 0 0 0 0 0
Test 2: check exceptions Test 2: check exceptions
OK OK

View File

@ -25,7 +25,7 @@ SELECT * FROM \"http://localhost:11111/test/b.tsv\"
""" """
${CLICKHOUSE_CLIENT} -q "DROP DATABASE test2;" ${CLICKHOUSE_CLIENT} -q "DROP DATABASE test2;"
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"http://localhost:11111/test/c.tsv\"" ${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"http://localhost:11111/test/b.tsv\""
################# #################
echo "Test 2: check exceptions" echo "Test 2: check exceptions"