File Reference : test002.ksh
I run the following under test / cache / GateWay directory for check memory leaks
[lakshya@localhost Gateway]$ CSQL_CONF=${PWD}/cache/Gateway/csql.conf
[lakshya@localhost Gateway]$ input=${PWD}/cache/Gateway/mysqlinputtest1.sql
[lakshya@localhost Gateway]$ REL_PATH=.
[lakshya@localhost Gateway]$ rm -f /tmp/csql.conf
[lakshya@localhost Gateway]$ cp $REL_PATH/csql.conf /tmp
[lakshya@localhost Gateway]$ export CSQL_CONFIG_FILE=/tmp/csql.conf
[lakshya@localhost Gateway]$ export DSN=myodbc3
[lakshya@localhost Gateway]$ echo DSN=$DSN >>$CSQL_CONFIG_FILE
[lakshya@localhost Gateway]$ isql $DSN < $REL_PATH/mysqlinputtest1.sql
[lakshya@localhost Gateway]$ rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
[lakshya@localhost Gateway]$ touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
[lakshya@localhost Gateway]$ for (( a=1; a<2; a++ )); do echo "1:t$a NULL NULL NULL"; done >> /tmp/csql/csqltable.conf
[lakshya@localhost Gateway]$ $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
[lakshya@localhost Gateway]$ pid=$!
[lakshya@localhost Gateway]$ $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/csqlinputtest1.sql
[lakshya@localhost Gateway]$ $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/csqlinputtest1.sql
[lakshya@localhost Gateway]$ valgrind --tool=memcheck --leak-check=full --show-reachable=yes csql -g -s csqlinputtest1.sql
and found memory leaks
Error Summary:
==10141== 64 bytes in 1 blocks are still reachable in loss record 12 of 30
==10141== at 0x4005CCC: operator new(unsigned) (vg_replace_malloc.c:163)
==10141== by 0x4072213: SqlLogConnection::populateCachedTableList() (SqlLogConnection.cxx:185)
==10141== by 0x4072389: SqlLogConnection::connect(char*, char*) (SqlLogConnection.cxx:70)
==10141== by 0x408F378: SqlGwConnection::connect(char*, char*) (SqlGwConnection.cxx:31)
==10141== by 0x8049A61: main (isql.cxx:99)