From freddy77 at gmail.com Tue Jul 13 12:23:23 2021 From: freddy77 at gmail.com (Frediano Ziglio) Date: Tue, 13 Jul 2021 17:23:23 +0100 Subject: [freetds] FreeTDS 1.3 released Message-ID: Hi, the final 1.3 version has been released. Just a minor change since release candidate 2 (compatibility with C++). Summary of Changes in release 1.3 -------------------------------------------- User visible (not in a particular order): - Generic: - Support UTF-8 columns using MSSQL 2019; - Do not accept TDS protocol versions "4.6" (never really supported) and "8.0"; - Minor portability issues; - Fix log elision for login; - Detect some possible minor memory failure in application; - Support long (more than 64k) SSPI packets (never encountered but you never know); - Fix unicode columns for ASA database; - Avoid using BCP with old protocols; - (*) Fix bulk copy using big endian machines; - (*) Fix Sybase uni(var)char and unsigned types for big endian machines; - (*) Do not send nullable data during bulk copy if type is not nullable; - ODBC: - Added "Timeout" setting; - Applications: - Improve defncopy utility: - Fix some declaration; - Fix Sybase support; - (*) Fix datacopy and freebcp logging; - CT-Library: - Minor fix for variant type; - Better support for timeout setting; - (*) Support some missing types (like nullable unsigned integers) for Sybase; - DB-library: - Unify date format (all systems can use the same syntax); - (*) Allows to pass 0 as type for bcp_bind; - (*) Fix DBSETLSERVERPRINCIPAL macro; - (*) Do not limit queries length for bcp using Sybase; - (*) Add KEEP_NULLS to BCP hints. (*) Feature backported in stable 1.2 branch. Implementation: - Move replacement headers under freetds directory for coherence with other internal headers; - Lots of style updates; - Optimize UTF-8 encoding for ODBC, reuse common code. Kind Regards, Frediano From john at capps.com Mon Sep 20 06:49:21 2021 From: john at capps.com (John Kendall) Date: Mon, 20 Sep 2021 10:49:21 +0000 Subject: [freetds] Configure Build so OpenSSL is statically linked Message-ID: Hi, Folks. I?ve tried, but I can?t seem to find the ./configure options that will build a libct with openssl?s libssl and libcrypt statically linked to it. Has anyone done this? Thanks in advance for any direction. John From freddy77 at gmail.com Mon Sep 20 07:49:22 2021 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 20 Sep 2021 12:49:22 +0100 Subject: [freetds] Configure Build so OpenSSL is statically linked In-Reply-To: References: Message-ID: Hi, I suppose you want only OpenSSL static, rest dynamic. Usually you first compile/install the static library, then tell configure where/how to find the static compiled library. Usually ./configure --help can help. In this case there are --with-openssl (flag) and OPENSSL_CFLAGS/OPENSSL_LIBS (environment) to play with. To be complete I would add PKG_CONFIG_xxx environments (as configure is using pkg-config also) but usually it is not necessary to use these. If you are using Unix an alternative could be the usage of LD_RUN_PATH. This environment is used by the linker automatically and tells the executable where to find libraries. What's the environment? Linux, Windows, MacOS or any other? Regards, Frediano Il giorno lun 20 set 2021 alle ore 11:55 John Kendall ha scritto: > Hi, Folks. > I?ve tried, but I can?t seem to find the ./configure options that will > build a libct with openssl?s libssl and libcrypt statically linked to it. > Has anyone done this? > Thanks in advance for any direction. > John > > From john at capps.com Mon Sep 20 12:37:10 2021 From: john at capps.com (John Kendall) Date: Mon, 20 Sep 2021 16:37:10 +0000 Subject: [freetds] Configure Build so OpenSSL is statically linked In-Reply-To: References: Message-ID: <5BF5E8EB-F269-4264-8F13-0073508276B2@capps.com> Hi, Frediano. Yes, only OpenSSL static, the rest dynamic. I?m on MacOS. I?ve got the latest OpenSSL (3.0) compiled and installed. The static libs are in /usr/local/lib: $ ls /usr/local/lib/*.a /usr/local/lib/libcrypto.a /usr/local/lib/libssl.a It was no problem getting things built with dynamic libraries. ./configure --with-openssl=/usr/local ; make. ## works I?ve tried a few things to get them to statically link: adding --disable-rpath setting LDFLAGS setting OPENSSL_CFLAGS But I don?t know how to set them. I don?t know about PKG_CONFIG. Any ideas would be appreciated. Thanks, John > On Sep 20, 2021, at 4:49 AM, Frediano Ziglio wrote: > > Hi, > I suppose you want only OpenSSL static, rest dynamic. > Usually you first compile/install the static library, then tell configure > where/how to find the static compiled library. > Usually ./configure --help can help. In this case there are --with-openssl > (flag) and OPENSSL_CFLAGS/OPENSSL_LIBS > (environment) to play with. To be complete I would add PKG_CONFIG_xxx > environments (as configure is using > pkg-config also) but usually it is not necessary to use these. > If you are using Unix an alternative could be the usage of LD_RUN_PATH. > This environment is used by the linker > automatically and tells the executable where to find libraries. > What's the environment? Linux, Windows, MacOS or any other? > > Regards, > Frediano > > > Il giorno lun 20 set 2021 alle ore 11:55 John Kendall ha > scritto: > >> Hi, Folks. >> I?ve tried, but I can?t seem to find the ./configure options that will >> build a libct with openssl?s libssl and libcrypt statically linked to it. >> Has anyone done this? >> Thanks in advance for any direction. >> John >> >> > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > https://url.emailprotection.link/?bJEGsdiRerNQN7JRfjMqgXe68LbBYu-rv2C7HPzTHQuhzVAo-yNSHfzQD9RVtliGYOCjuKIT7m3cEHkHaHRh5zrjuN6udVxLgKmkPC0ZzEi67RKGlnT9ZjHSG9lzH2nS5 From freddy77 at gmail.com Mon Sep 20 14:27:58 2021 From: freddy77 at gmail.com (Frediano Ziglio) Date: Mon, 20 Sep 2021 19:27:58 +0100 Subject: [freetds] Configure Build so OpenSSL is statically linked In-Reply-To: <5BF5E8EB-F269-4264-8F13-0073508276B2@capps.com> References: <5BF5E8EB-F269-4264-8F13-0073508276B2@capps.com> Message-ID: Hi, Il giorno lun 20 set 2021 alle ore 17:39 John Kendall ha scritto: > Hi, Frediano. > > Yes, only OpenSSL static, the rest dynamic. I?m on MacOS. I?ve got the > latest OpenSSL (3.0) compiled and installed. > The static libs are in /usr/local/lib: > > $ ls /usr/local/lib/*.a > /usr/local/lib/libcrypto.a /usr/local/lib/libssl.a > > It was no problem getting things built with dynamic libraries. > > ./configure --with-openssl=/usr/local ; make. ## works > > I suppose it works with dynamic libraries. Are the dynamic libraries in the same directory? > I?ve tried a few things to get them to statically link: > > adding --disable-rpath > It should not help > setting LDFLAGS > I would work on OPENSSL_LIBS instead. Some linker prefers to have the full path of the static libraries, like export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a' > setting OPENSSL_CFLAGS > > This should be the same for static and not static (at least usually) But I don?t know how to set them. > I don?t know about PKG_CONFIG. Any ideas would be appreciated. > > I hope it is not necessary to change these. pkg-config is a program that helps configure to find libraries and settings. PKG_CONFIG variable tells configure where to find this program/script. PKG_CONFIG_PATH tell pkg-config where to look for *.pc files containing configuration for libraries. For instance on my system (Linux): $ pkg-config --cflags --libs openssl -lssl -lcrypto Given what you told me I would try $ export OPENSSL_CFLAGS='-I/usr/local/include' $ export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a' $ ./configure --with-openssl $ make Thanks, > John > > Frediano > > > On Sep 20, 2021, at 4:49 AM, Frediano Ziglio wrote: > > > > Hi, > > I suppose you want only OpenSSL static, rest dynamic. > > Usually you first compile/install the static library, then tell configure > > where/how to find the static compiled library. > > Usually ./configure --help can help. In this case there are > --with-openssl > > (flag) and OPENSSL_CFLAGS/OPENSSL_LIBS > > (environment) to play with. To be complete I would add PKG_CONFIG_xxx > > environments (as configure is using > > pkg-config also) but usually it is not necessary to use these. > > If you are using Unix an alternative could be the usage of LD_RUN_PATH. > > This environment is used by the linker > > automatically and tells the executable where to find libraries. > > What's the environment? Linux, Windows, MacOS or any other? > > > > Regards, > > Frediano > > > > > > Il giorno lun 20 set 2021 alle ore 11:55 John Kendall > ha > > scritto: > > > >> Hi, Folks. > >> I?ve tried, but I can?t seem to find the ./configure options that will > >> build a libct with openssl?s libssl and libcrypt statically linked to > it. > >> Has anyone done this? > >> Thanks in advance for any direction. > >> John > >> > From john at capps.com Mon Sep 20 17:03:51 2021 From: john at capps.com (John Kendall) Date: Mon, 20 Sep 2021 21:03:51 +0000 Subject: [freetds] Configure Build so OpenSSL is statically linked In-Reply-To: References: <5BF5E8EB-F269-4264-8F13-0073508276B2@capps.com> Message-ID: <3E099428-8A3A-4430-B7F6-A3A000F623B4@capps.com> > On Sep 20, 2021, at 11:27 AM, Frediano Ziglio wrote: > > Hi, > > Il giorno lun 20 set 2021 alle ore 17:39 John Kendall ha > scritto: > >> Hi, Frediano. >> >> Yes, only OpenSSL static, the rest dynamic. I?m on MacOS. I?ve got the >> latest OpenSSL (3.0) compiled and installed. >> The static libs are in /usr/local/lib: >> >> $ ls /usr/local/lib/*.a >> /usr/local/lib/libcrypto.a /usr/local/lib/libssl.a >> >> It was no problem getting things built with dynamic libraries. >> >> ./configure --with-openssl=/usr/local ; make. ## works > > I suppose it works with dynamic libraries. Are the dynamic libraries in > the same directory? Yes. >> I?ve tried a few things to get them to statically link: >> >> adding --disable-rpath >> > > It should not help > > >> setting LDFLAGS >> > > I would work on OPENSSL_LIBS instead. Some linker prefers to have the full > path of the static libraries, like > export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a' > > >> setting OPENSSL_CFLAGS >> > > This should be the same for static and not static (at least usually) > >> But I don?t know how to set them. >> I don?t know about PKG_CONFIG. Any ideas would be appreciated. >> > > I hope it is not necessary to change these. pkg-config is a program that > helps configure to find libraries and settings. > PKG_CONFIG variable tells configure where to find this program/script. > PKG_CONFIG_PATH tell pkg-config where > to look for *.pc files containing configuration for libraries. For instance > on my system (Linux): > > $ pkg-config --cflags --libs openssl -lssl -lcrypto My install doesn?t seem to have the pkg-config utility. Hopefully it isn't necessary. > > Given what you told me I would try > > $ export OPENSSL_CFLAGS='-I/usr/local/include' > $ export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a' > $ ./configure --with-openssl > $ make This gave lots of linker errors, however it did produce a libct.dylib. But the library did not work. Any other ideas? I appreciate your help. > > Thanks, >> John >> >> > Frediano > >> >>> On Sep 20, 2021, at 4:49 AM, Frediano Ziglio wrote: >>> >>> Hi, >>> I suppose you want only OpenSSL static, rest dynamic. >>> Usually you first compile/install the static library, then tell configure >>> where/how to find the static compiled library. >>> Usually ./configure --help can help. In this case there are >> --with-openssl >>> (flag) and OPENSSL_CFLAGS/OPENSSL_LIBS >>> (environment) to play with. To be complete I would add PKG_CONFIG_xxx >>> environments (as configure is using >>> pkg-config also) but usually it is not necessary to use these. >>> If you are using Unix an alternative could be the usage of LD_RUN_PATH. >>> This environment is used by the linker >>> automatically and tells the executable where to find libraries. >>> What's the environment? Linux, Windows, MacOS or any other? >>> >>> Regards, >>> Frediano >>> >>> >>> Il giorno lun 20 set 2021 alle ore 11:55 John Kendall >> ha >>> scritto: >>> >>>> Hi, Folks. >>>> I?ve tried, but I can?t seem to find the ./configure options that will >>>> build a libct with openssl?s libssl and libcrypt statically linked to >> it. >>>> Has anyone done this? >>>> Thanks in advance for any direction. >>>> John >>>> >> > _______________________________________________ > FreeTDS mailing list > FreeTDS at lists.ibiblio.org > https://url.emailprotection.link/?bJEGsdiRerNQN7JRfjMqgXe68LbBYu-rv2C7HPzTHQuhzVAo-yNSHfzQD9RVtliGYOCjuKIT7m3cEHkHaHRh5zrjuN6udVxLgKmkPC0ZzEi67RKGlnT9ZjHSG9lzH2nS5 From TilleA at rki.de Thu Sep 30 05:25:29 2021 From: TilleA at rki.de (Tille, Andreas) Date: Thu, 30 Sep 2021 09:25:29 +0000 Subject: [freetds] Failure to receive xml query result larger than 2GB Message-ID: Hi, I have a query which returns a result as XML which is larger than 2GB. When doing this on Windows via sqlcmd -S myserver -d mydb -E -i myquery.sql > myresult.xml a 2.7GB XML file myresult.xml is created. If I try this with freetds 1.2.3 under Debian 11 I get: sqsh -w 256 -h -S myserver -U myuser -D mydb -i myquery.sql -o myresult.xml I get Msg 6365, Level 16, State 1 Server 'myserver', Line 70 An XML operation resulted an XML data type exceeding 2GB in size. Operation aborted. I used this query successfully a long time but I used a Python3 script to run it. This stopped working some days ago when the amount of data seemed to exceed some limit. The actual error message that was thrown by the Python3 script is An XML operation resulted an XML data type exceeding 2GB in size. Operation aborted. DB-Lib error message 20018, severity 16: General SQL Server error: Check messages from the SQL Server Any idea why sqlcmd on Windows is succeeding here why sqsh and Python3 are throwing this error? Kind regards Andreas.