diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-23 13:05:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-23 13:05:01 +0000 |
commit | 553aa269b3f6eff0ac983abb6ee528763c8cb91e (patch) | |
tree | 57e424488c79c24775048b0581d256b84006091e /main/sqsh/tds-version.patch | |
parent | 78836b041c49dfc8220ab3c074cdd3e49d4a34b8 (diff) | |
download | aports-553aa269b3f6eff0ac983abb6ee528763c8cb91e.tar.bz2 aports-553aa269b3f6eff0ac983abb6ee528763c8cb91e.tar.xz |
main/sqsh: fix build against freetds-1.00
Diffstat (limited to 'main/sqsh/tds-version.patch')
-rw-r--r-- | main/sqsh/tds-version.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/sqsh/tds-version.patch b/main/sqsh/tds-version.patch new file mode 100644 index 0000000000..75907d10f0 --- /dev/null +++ b/main/sqsh/tds-version.patch @@ -0,0 +1,32 @@ +Regarding obsolete versions + +In the earlier days of FreeTDS, Microsoft did not release official specs for the TDS protocol. When MSSQL 2000 (product 8.0) was released, there was semi-official indications from the Microsoft community that the TDS protocol would be version 8.0. So the FreeTDS developers adopted that version for FreeTDS. Years later, when Microsoft started releasing official specs of the protocol, it became obvious that the TDS versions that FreeTDS had labeled 8.0 and 9.0 were actually versions 7.1 and 7.2 respectively. + +http://www.freetds.org/userguide/choosingtdsprotocol.htm#AEN910 + +diff --git a/src/cmd_connect.c b/src/cmd_connect.c +index e1d35cb..2956050 100644 +--- a/src/cmd_connect.c ++++ b/src/cmd_connect.c +@@ -860,8 +860,8 @@ int cmd_connect( argc, argv ) + /* Then we use freetds which uses enum instead of defines */ + else if (strcmp(tds_version, "7.0") == 0) + version = CS_TDS_70; +- else if (strcmp(tds_version, "8.0") == 0) +- version = CS_TDS_80; ++ else if (strcmp(tds_version, "7.1") == 0) ++ version = CS_TDS_71; + #endif + else version = CS_TDS_50; /* default version */ + +@@ -1258,8 +1258,8 @@ int cmd_connect( argc, argv ) + case CS_TDS_70: + env_set( g_env, "tds_version", "7.0" ); + break; +- case CS_TDS_80: +- env_set( g_env, "tds_version", "8.0" ); ++ case CS_TDS_71: ++ env_set( g_env, "tds_version", "7.1" ); + break; + #endif + default: |