I have Run the following under test / cache / CacheTable directory
[lakshya@localhost CacheTable]$export DSN=myodbc3
[lakshya@localhost CacheTable]$REL_PATH=.isql $DSN < ${REL_PATH}/createt5.sql
[lakshya@localhost CacheTable]$rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
[lakshya@localhost CacheTable]$touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
created a file x.ksh. The contents of this file is as follows
for((a=5;a<=15;a++))
do
echo "insert into t5 values($a,$a+1);"
echo "insert into t6 values($a,$a+1);"
done>> inserttarget.sql
[lakshya@localhost CacheTable]$isql $DSN < inserttarget.sql
Started the csqlserver in another SHELL
Executed the command (cachetable -t t5 -D -c "f1>=10" ) with valgrind tool as
[lakshya@localhost CacheTable]$ valgrind --tool=memcheck --leak-check=full --show-reachable=yes cachetable -t t5 -D -c "f1>=10"
And i found Memory Leak
Error Summary :
==26435== 152 (84 direct, 68 indirect) bytes in 1 blocks are definitely lost in loss record 18 of 28
==26435== at 0x4005CCC: operator new(unsigned) (vg_replace_malloc.c:163)
==26435== by 0x4026974: CacheTableLoader::load(DatabaseManager*, bool) (CacheTableLoader.cxx:268)
==26435== by 0x4027FBB: CacheTableLoader::load(bool) (CacheTableLoader.cxx:187)
==26435== by 0x8048E24: main (cachetable.cxx:107)
refer test030.ksh