rails-sqlserver/tiny_tds — pull request #134 by wbond (2013-08-20 18:11:13+00:00)
Title: Allow Support for 31+ Character Usernames/Passwords

This patch makes a simple change to the client initialization that allows for use with our patched version of FreeTDS (https://github.com/veracross/freetds) to properly handle logins for users with 31+ character usernames or passwords.

Currently in FreeTDS there is an arbitrary restriction that usernames and passwords may not be more than 30 characters long. This is due to the old TDS 4.2 and 5.0 login packet structure. http://freetds.schemamania.org/tds.html#login

With the TDS 7.0+ login packet, arbitrary length usernames and passwords are supported. http://freetds.schemamania.org/tds.html#login7

Via a very simple patch to FreeTDS (https://github.com/veracross/freetds/commit/f403ab9a985b9b84ebbb647464f5a664668abe62), we remove the unnecessary length restriction when working with the TDS protocol 7.0+.

This change to TinyTds is necessary so that the correct protocol version information is set when the username and password are checked.