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)
{
if (exception)
exception->emplace(*e.clone());
exception->emplace(e);
}
if (!table)

View File

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

View File

@ -25,7 +25,7 @@ SELECT * FROM \"http://localhost:11111/test/b.tsv\"
"""
${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"