freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Eduard Heimann <eheimann AT pe-fittinge.de>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Status of support for Time type
- Date: Mon, 06 May 2013 14:05:56 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/06/13 11:17, Frediano Ziglio wrote:
> I'm trying to merge it. Some hunks scary me a bit (well, the patch was
> reversed but it's just an extra option to patch).
>
Hi, the same patch, but this time not reversed:
I am very sorry.
Eduard
- --
Eduard Heimann, Hörmannsdorf 9, D-94104 Tittling
Tel: 08504 955249 Fax: 08504 955248
Mail mailto:eheimann AT pe-fittinge.de Web: http://www.pe-fittinge.de
Eine Haustüre ohne Schloß ist wie eMail ohne http://www.GNUPG.org
GPG key ID: 0xB542BD21 http://keyserver.ubuntu.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGHnKQACgkQUzMNXFvaJEbuUwCfSlwP81YMQ1wFvTAUb/9enM9w
mKUAoJtCPQXvdbuTAxwIhmxMc4K7QU4H
=ftys
-----END PGP SIGNATURE-----
Only in freetds-0.91.dev.20120624-bcpfix: ID Only in freetds-0.91.dev.20120624-bcpfix: Makefile Only in freetds-0.91.dev.20120624-bcpfix: PWD Only in freetds-0.91.dev.20120624-bcpfix: config.log Only in freetds-0.91.dev.20120624-bcpfix: config.status Only in freetds-0.91.dev.20120624-bcpfix/doc: Makefile Only in freetds-0.91.dev.20120624-bcpfix/include: Makefile Only in freetds-0.91.dev.20120624-bcpfix/include: config.h Only in freetds-0.91.dev.20120624-bcpfix/include: freetds_sysconfdir.h Only in freetds-0.91.dev.20120624-bcpfix/include: stamp-h1 diff -ur freetds-0.91.dev.20120624/include/tds.h freetds-0.91.dev.20120624-bcpfix/include/tds.h --- freetds-0.91.dev.20120624/include/tds.h 2011-08-12 18:29:36.000000000 +0200 +++ freetds-0.91.dev.20120624-bcpfix/include/tds.h 2013-01-08 20:46:30.000000000 +0100 @@ -716,13 +716,13 @@ x==SYBVOID || \ x==SYBUNIQUE) #define is_nullable_type(x) ( \ - x==SYBBITN || \ + x==SYBBITN || \ x==SYBINTN || \ x==SYBFLTN || \ x==SYBMONEYN || \ x==SYBDATETIMN || \ x==SYBVARCHAR || \ - x==SYBBINARY || \ + /*EVEVEV x==SYBBINARY ||*/ \ x==SYBVARBINARY || \ x==SYBTEXT || \ x==SYBNTEXT || \ Only in freetds-0.91.dev.20120624-bcpfix/include: tds_sysdep_public.h Only in freetds-0.91.dev.20120624-bcpfix: libtool Only in freetds-0.91.dev.20120624-bcpfix/samples: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/apps: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/apps: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/apps/fisql: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/apps/fisql: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/ctlib: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/ctlib: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/ctlib/unittests: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/ctlib/unittests: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/dblib: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/dblib: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/dblib/unittests: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/dblib/unittests: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/odbc: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/odbc: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/odbc/unittests: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/odbc/unittests: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/pool: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/pool: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/replacements: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/replacements: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/server: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/server: Makefile Only in freetds-0.91.dev.20120624-bcpfix/src/tds: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/tds: Makefile diff -ur freetds-0.91.dev.20120624/src/tds/bulk.c freetds-0.91.dev.20120624-bcpfix/src/tds/bulk.c --- freetds-0.91.dev.20120624/src/tds/bulk.c 2011-06-02 21:19:30.000000000 +0200 +++ freetds-0.91.dev.20120624-bcpfix/src/tds/bulk.c 2013-05-05 08:42:37.000000000 +0200 @@ -584,19 +584,23 @@ if ((get_col_data(bcpinfo, bindcol, offset)) != TDS_SUCCEED) { return TDS_FAIL; } - /* unknown but zero */ - tds_put_smallint(tds, 0); - tds_put_byte(tds, bindcol->column_type); - tds_put_byte(tds, 0xff - blob_cols); - /* - * offset of txptr we stashed during variable - * column processing - */ - tds_put_smallint(tds, bindcol->column_textpos); - tds_put_int(tds, bindcol->bcp_column_data->datalen); - tds_put_n(tds, bindcol->bcp_column_data->data, bindcol->bcp_column_data->datalen); + /* maybe the same code in bcp_moretext ? */ + tdsdump_log(TDS_DBG_INFO1, "is_blob_type col=%u datalen=%u data=%x\n", + i, bindcol->bcp_column_data->datalen, bindcol->bcp_column_data->data); + if (bindcol->bcp_column_data->datalen && bindcol->bcp_column_data->data) { + /* unknown but zero */ + tds_put_smallint(tds, 0); + tds_put_byte(tds, bindcol->column_type); + tds_put_byte(tds, 0xff - blob_cols); + /* + * offset of txptr we stashed during variable + * column processing + */ + tds_put_smallint(tds, bindcol->column_textpos); + tds_put_int(tds, bindcol->bcp_column_data->datalen); + tds_put_n(tds, bindcol->bcp_column_data->data, bindcol->bcp_column_data->datalen); + } /*else server table gets into very strange&broken state */ blob_cols++; - } } } @@ -676,9 +680,9 @@ static int tds_bcp_add_variable_columns(TDSBCPINFO *bcpinfo, tds_bcp_get_col_data get_col_data, tds_bcp_null_error null_error, int offset, TDS_UCHAR* rowbuffer, int start, int *pncols) { - TDS_SMALLINT offsets[256]; - int i, row_pos; - int ncols = 0; + TDS_USMALLINT offsets[256]; + unsigned int i, row_pos; + unsigned int ncols = 0; assert(bcpinfo); assert(rowbuffer); @@ -705,7 +709,7 @@ tdsdump_log(TDS_DBG_FUNC, "%4s %8s %8s %8s\n", "col", "ncols", "row_pos", "cpbytes"); for (i = 0; i < bcpinfo->bindinfo->num_cols; i++) { - int cpbytes = 0; + unsigned int cpbytes = 0; TDSCOLUMN *bcpcol = bcpinfo->bindinfo->columns[i]; /* @@ -772,16 +776,27 @@ ncols--; /* trailing NULL columns are not sent and are not included in the offset table */ if (ncols) { +/*EVEVEVE*/ TDS_UCHAR *padj = rowbuffer + row_pos; - TDS_UCHAR *poff = offsets[ncols] > 0xFF? padj + ncols + 1 : padj; - - *padj++ = 1 + ncols; - *poff++ = 1 + ncols; + TDS_UCHAR *poff = padj; + unsigned int pfx_top = offsets[ncols] / 256; - for (i=0; i <= ncols; i++) { - padj[i] = offsets[ncols-i] >> 8; - poff[i] = offsets[ncols-i] & 0xFF; + *poff++ = ncols + 1; + /* this is some kind of run-length-prefix encoding */ + while (pfx_top) { + unsigned int n_pfx = 0; + unsigned int n; + for (n = 0; n <= ncols ; ++n) + if ((offsets[n] / 256) < pfx_top) + ++n_pfx; + *poff++ = n_pfx + 1; + --pfx_top; } + + tdsdump_log(TDS_DBG_FUNC, "ncols=%u padj=%x poff=%x [%u]\n", ncols, padj, poff, offsets[ncols]); + + for (i=0; i <= ncols; i++) + poff[i] = offsets[ncols-i] & 0xFF; row_pos = (int)(poff + ncols + 1 - rowbuffer); } Only in freetds-0.91.dev.20120624-bcpfix/src/tds/unittests: .deps Only in freetds-0.91.dev.20120624-bcpfix/src/tds/unittests: Makefile Only in freetds-0.91.dev.20120624-bcpfix/vms: Makefile Only in freetds-0.91.dev.20120624-bcpfix/win32: Makefile Only in freetds-0.91.dev.20120624-bcpfix/win32/msvc6: Makefile diff -ur freetds-0.91.dev.20120624/win32/version.rc freetds-0.91.dev.20120624-bcpfix/win32/version.rc --- freetds-0.91.dev.20120624/win32/version.rc 2012-06-24 18:39:29.000000000 +0200 +++ freetds-0.91.dev.20120624-bcpfix/win32/version.rc 2013-04-23 11:07:49.000000000 +0200 @@ -6,8 +6,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,90,9999,12176 - PRODUCTVERSION 0,90,9999,12176 + FILEVERSION 0,90,9999,13113 + PRODUCTVERSION 0,90,9999,13113 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -25,14 +25,14 @@ VALUE "Comments", "\0" VALUE "CompanyName", "FreeTDS.org\0" VALUE "FileDescription", "FreeTDS\0" - VALUE "FileVersion", "0, 90, 9999, 12176\0" + VALUE "FileVersion", "0, 90, 9999, 13113\0" VALUE "InternalName", "FreeTDS\0" VALUE "LegalCopyright", "Copyright © 2004-2010 under terms of GNU LGPL\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "FreeTDS.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "FreeTDS ODBC Driver\0" - VALUE "ProductVersion", "0, 90, 9999, 12176\0" + VALUE "ProductVersion", "0, 90, 9999, 13113\0" VALUE "SpecialBuild", "\0" END END
-
Re: [freetds] Status of support for Time type,
Frediano Ziglio, 05/02/2013
-
Re: [freetds] Status of support for Time type,
James K. Lowden, 05/02/2013
-
Re: [freetds] Status of support for Time type,
Frediano Ziglio, 05/04/2013
-
Re: [freetds] Status of support for Time type,
Eduard Heimann, 05/04/2013
-
Re: [freetds] Status of support for Time type,
James K. Lowden, 05/04/2013
-
Re: [freetds] Status of support for Time type,
Eduard Heimann, 05/05/2013
-
Re: [freetds] Status of support for Time type,
Frediano Ziglio, 05/06/2013
- Re: [freetds] Status of support for Time type, Eduard Heimann, 05/06/2013
- Re: [freetds] Status of support for Time type, Frediano Ziglio, 05/06/2013
-
Re: [freetds] Status of support for Time type,
Frediano Ziglio, 05/06/2013
-
Re: [freetds] Status of support for Time type,
Eduard Heimann, 05/05/2013
-
Re: [freetds] Status of support for Time type,
James K. Lowden, 05/04/2013
-
Re: [freetds] Status of support for Time type,
Eduard Heimann, 05/04/2013
-
Re: [freetds] Status of support for Time type,
Frediano Ziglio, 05/04/2013
-
Re: [freetds] Status of support for Time type,
James K. Lowden, 05/02/2013
Archive powered by MHonArc 2.6.24.