Package: unixodbc
Version: 2.2.14p2-2
Severity: normal
Tags: upstream patch
The isql command-line utility core dumps when using the -b ("batch mode")
option, where the exact same execution works without it.
-b is a useful flag for scripts because it skips output (like the SQL>
prompt and the 4-line "welcome" message) that is only useful to human
users.
The problem is a pair of extra declarations that mask the true
variables in isql.c. I am attaching a patch that we have been using for
some time with UnixODBC 2.2.14 on Solaris to fix this problem.
>From what I gather googling around for answers, the issue is fixed upstream in
2.3.0 and up. If the Debian maintainers of UnixODBC want to stick with 2.2.14
for Squeeze, it would be nice to be able to fit this patch in.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages unixodbc depends on:
ii libc6 2.11.2-7 Embedded GNU C Library: Shared lib
ii libltdl7 2.2.6b-2 A system independent dlopen wrappe
ii libreadline6 6.1-3 GNU readline and history libraries
ii odbcinst1debian2 2.2.14p2-2 Support library for accessing odbc
unixodbc recommends no packages.
Versions of packages unixodbc suggests:
ii libmyodbc 5.1.6-1 the MySQL ODBC driver
pn odbc-postgresql <none> (no description available)
pn tdsodbc <none> (no description available)
ii unixodbc-bin 2.2.14p2-2 Graphical tools for ODBC managemen
-- no debconf information
--- isql.c.orig Thu Sep 17 13:18:45 2009
+++ isql.c Thu Sep 17 13:19:01 2009
@@ -243,9 +243,6 @@
}
else
{
- char *line;
- int malloced;
-
line = fgets( line_buffer, line_buffer_size, stdin );
if ( !line ) /* EOF - ctrl D */
{