sql_cmd in unittests

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
   looking at http://freetds.sourceforge.net/up/out83/test/ reveal
that new sql_cmd stuff produce a leak (we do not close INPUT file so
we have a leak). Well... not that hard, just add a call to close file
and is fixed. However before changing all unittests I would change a
bit even sql_cmd:
- sql_cmd is always called with INPUT as second argument, so I would
remove this argument (also because sql_cmd refer to sql_file but for
user supplied files is not valid)
- perhaps is better to automatically close file on feof

I think also it would be interesting to have additional options in sql
commands and in sql_cmd. For instance instead of processing next sql
command we could add some special comments in sql script and an
additional argument to sql_cmd to specify a name for a specific
command. Another addition would be to automatically execute and
process next command (like "go -ec" in script where -e is execute and
-c is continue....)

freddy77
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.