Commits on Nov 16, 2014
Commits on Nov 15, 2014
  1. Fix SQLDescribeCol with cbColNameMax == 0

    freddy77 committed Nov 15, 2014
    This condition is just to get column name but didn't return correct
    Signed-off-by: Frediano Ziglio <>
  2. Add test for SQLDescribeCol with cbColNameMax == 0

    freddy77 committed Nov 15, 2014
    SQLDescribeCol can return the length required for the name passing 0 as
    cbColNameMax. This is not working with current code.
    Signed-off-by: Frediano Ziglio <>
Commits on Aug 10, 2014
  1. Skip correctly comments parsing sql commands in ODBC prepare_call

    freddy77 committed Aug 8, 2014
    Reported by Richard Hughes.
    If some kind of quote was embedded into the command FreeTDS would
    interpret it as string instead of comment.
Commits on May 19, 2014
  1. Fix buffer overflow writing data from server to bcp file.

    freddy77 committed May 19, 2014
    Calling dbconvert with values <0 for destination length could cause
    buffer overflows. Compute output length properly to avoid these overflows.
    Signed-off-by: Frediano Ziglio <>
  2. Do not create buffer row for TDS7+

    freddy77 committed May 19, 2014
    In TDS7+ buffer row contains all blobs while in TDS5 blobs are send after
    the fixed and variable types. This cause the buffer to require lot of
    space. Not using buffer but sending directly to the wire avoid these
    huge allocations.
    The code was also underestimating the buffer size causing buffer overflow.
    Signed-off-by: Frediano Ziglio <>
Commits on May 17, 2014
  1. Fix sending multiple bits using protocol 5.0

    freddy77 committed May 17, 2014
    Bit using protocol 5.0 are collapsed together.
  2. Disable parallel tests for Automake

    freddy77 committed Apr 18, 2014
    For some reason compiling fails if they are turned on.
    Newer Automake turn this option on by default so disable it.
    Signed-off-by: Frediano Ziglio <>
  3. As reported in, newer versions of gcc o…

    freddy77 committed Jun 2, 2013
    …n Ubuntu (and soon in Debian) are configured to fail to resolve references to libraries not explicitly listed on the linker commandline. This patch fixes the build so that whenever we're going to use the symbol from libgcrypt, we also make sure to use the libgcrypt cflags/ldflags.
    Signed-off-by: Steve Langasek <>
    Signed-off-by: Frediano Ziglio <>
Commits on May 8, 2014
  1. Always send correct store procedure name length for protocol 7.0

    freddy77 committed May 8, 2014
    Sending store procedure names for internal RPCs the length was not always
    correct resulting in invalid parameters.
    Signed-off-by: Frediano Ziglio <>
Commits on Mar 1, 2014
  1. Correct link to Cython project website.

    Ramiro Morales authored and freddy77 committed Feb 28, 2014
  2. Add section about pymssql Python module.

    Ramiro Morales authored and freddy77 committed Jan 13, 2014
Commits on Jan 7, 2014
Commits on Dec 19, 2013
  1. Add support for ctlib to Nmakefile

    Samuel Ferencik authored and freddy77 committed Dec 19, 2013
    Signed-off-by: Samuel Ferencik <>
Commits on Nov 19, 2013
  1. Make readconf test work when distributed

    freddy77 committed Nov 19, 2013
    Distribute, needed by the test.
    Correctly attempt to find file in the current directory.
Commits on Nov 18, 2013
  1. Raise the string limit during login to 128.

    freddy77 committed Nov 18, 2013
    Protocol >5.0 support such long strings so do not limit dblib to 30.
Commits on Oct 19, 2013
  1. doc/userguide.sgml: Fix documentation of "encryption" freetds.conf se…

    msabramo authored and freddy77 committed Oct 17, 2013
    …tting. "required" => "require". "desidered" => "desired".
Commits on Oct 18, 2013
  1. Fix wrong getopt() option strings so that -d arguments are parsed cor…

    vorlonofportland authored and freddy77 committed Sep 11, 2013
    The code treats -d as an alias to -D, but the trailing colon is missing in
    the getopt string, which means getopt doesn't return the next argument in
    optarg and the code segfaults instead.
    Of course, as a result this option has never worked, and it's not documented
    in usage, so it would be an equally reasonable fix to drop support for -d
    as an alias.
  2. Handle a lack of login/password information without segfaulting.

    vorlonofportland authored and freddy77 committed Sep 11, 2013
    If datacopy is called incorrectly with, e.g., /dev/null on stdin, it won't
    get any database login/password information.  We should print an error
    message and exit instead of throwing a segfault trying to copy a null
    Rather than exiting immediately, though, just try to connect to the
    databases without a username/password, because hey, you never know.
Commits on Oct 8, 2013
  1. Fix linking under Solaris

    freddy77 committed Oct 8, 2013
    Due to wrong header inclusion order symbols got local binding preventing
    from linking system functions like strlen.
    So avoiding including headers while we use hidden visibility using gcc.
    Fix from Justin T Pryzby
    Signed-off-by: Frediano Ziglio <>
Commits on Sep 14, 2013
Commits on Sep 12, 2013
  1. Avoid loosing sync with server discarding unknown environment

    freddy77 committed Sep 12, 2013
    If unknown environment is double byte encoded we must skip 2 bytes so
    skip considering only token byte length.
    Signed-off-by: Frediano Ziglio <>
Commits on Aug 21, 2013
  1. Prevent core connecting to a no-sql server.

    freddy77 committed Aug 21, 2013
    Connecting to a different protocol (like MySQL) can lead FreeTDS to crash.
    This is due on how we deal with packets having a length of 0.
    In this case code assume that buffer is sufficient but then try to copy
    8 bytes into a not allocated (NULL) buffer leading to a core.
    Prevent this checking for header packet length (which must be >=8).
    0.92 has same check.
    Signed-off-by: Frediano Ziglio <>
Commits on Jun 6, 2013
  1. Pass correctly dberr value to error handler callback.

    freddy77 committed Jun 6, 2013
    Do not pass server error values as dblib error ones.
    Resolve bug #59 reported by Mikhail Teterin.
    Signed-off-by: Frediano Ziglio <>
  2. Fix dbwillconvert result

    freddy77 committed Jun 6, 2013
    dbwillconvert have to return TRUE or FALSE.
    Bug #58 reported by Mikhail Teterin
    Signed-off-by: Frediano Ziglio <>
Commits on May 19, 2013
  1. Remove warning caused by patch for BCP load

    freddy77 committed May 19, 2013
    Signed-off-by: Frediano Ziglio <>
Commits on May 6, 2013
  1. Fix large variable columns inserting BCP data

    freddy77 committed May 5, 2013
    BCP-copying wide rows (>255 bytes, from file into server-table) results in an
    error in bcp_sendrow() and a bogus state in Sybase SQL Server.
    Signed-off-by: Eduard Heimann <>
    Signed-off-by: Frediano Ziglio <>
Commits on Apr 12, 2013
  1. Fix getting SQL_DESC_UNSIGNED for unsigned types

    freddy77 committed Apr 12, 2013
    SQL_DESC_UNSIGNED was always set to SQL_FALSE.
Commits on Apr 4, 2013
  1. Fix if malloc(0) return NULL

    freddy77 committed Apr 4, 2013
    If SQLPutData is called with size of 0 should just success not appending
    data. This works with mostly implementation but not if malloc(0) returns
    NULL. In this case malloc(0) is called which is detected as a memory error.
Commits on Feb 27, 2013
  1. Fix double iconv conversion

    freddy77 committed Feb 24, 2013
    Double iconv is used if system iconv is not able to convert directly from
    a charset to another. This happen with some iconv implementations (like
    Solaris or HP-UX).
    Use always tds_iconv instead of tds_sys_iconv (mainly in tds_iconv_fread).
    Do not read too much characters in tds_iconv but only required ones to be able
    to continue reading correctly on next call.
Commits on Nov 21, 2012
  1. Add -D parameter to freebcp

    freddy77 committed Nov 21, 2012
    Allow to specify database name for freebcp.
    This allow to insert data in Azure which does not allow USE statement.
Commits on Nov 7, 2012
  1. Fix sspi if Kerberos is used

    freddy77 committed Nov 4, 2012
    Authentication require more roud trips for Kerberos.
    Patch slightly modified from Ken Collins.
    Tested by Ken Collins.
Commits on Oct 26, 2012
  1. Set correctly scroll options for CTLib

    freddy77 committed Oct 26, 2012
    Patch from Martin Wilck.
    Type and concurrency of cursor were not set for cursors causing cursor in
    CTLib to fail.
    Also added symbolic constant for type and concurrency.
Commits on Sep 30, 2012
  1. Remove autogenerated file

    freddy77 committed Sep 30, 2012