Skip to Content.
Sympa Menu

freetds - Re: [freetds] New Sybase datatype?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] New Sybase datatype?
  • Date: Fri, 16 Mar 2007 09:45:02 +0100

>
> crawford charles wrote:
> >
> > I believe I have encountered a new (to me anyway)
> > datatype. The value is 0x7B, and it looks like it
> > could be similar to a INTN (0x26) or FLTN (0x6d)
> > from its form.
> >
> > I searched the 3.6 and 3.8 Sybase TD Functional spec,
> > and the FreeTDS 0.64 code base and documentation. I'd
> > appreciate any help.
>
> I would be happy to help but am very time-constrained of late.
>
> The easiest thing for me would be if you could modify
> src/dblib/unittest/rpc.c to provoke the new datatype from the
> server. The
> library should complain and leave enough information in the
> TDSDUMP log to
> get started. Then I'll see if the sybase server I have
> access to behaves
> the same way. If so, I would think the work to add the new
> type would be
> quick.
>
> And then, you know, we'd have to update the docs. ;-)
>
> Regards,
>

Mmmm.... some time ago I though about writing a table to specify types
informations like:
- size (if fixed)
- size length (that is varsize, if variable)
- nullable
- if blob
- if collate
- if numeric
- tds version ?? (2 bits, tds5 only and tds7 only are sufficient)
- bitmask of possible sizes possible ??
- ...
It would be fine to put all these infos in a structure or in packing
then in a single integer.
This structure should be used to return information not spreading all
these info in many functions (tds_get_varint_size and similar).

I tried enabling time/date in capability and I discovered that
- if libTDS encounter a not-supported type it try to handle it... very
bad, IMHO should close connection
- TDS_MAX_CAPABILITY is fixed and used for a structure. And now is not
sufficient for store TIME/DATA capability :( This naturally break binary
compatibility with previous version. I start thinking about fully
privatize libTDS like

Index: include/Makefile.am
===================================================================
RCS file: /cvsroot/freetds/freetds/include/Makefile.am,v
retrieving revision 1.32
diff -u -1 -0 -r1.32 Makefile.am
--- include/Makefile.am 21 Dec 2005 14:02:49 -0000 1.32
+++ include/Makefile.am 16 Mar 2007 08:40:38 -0000
@@ -1,30 +1,30 @@
AUTOMAKE_OPTIONS = 1.5.3

include_HEADERS = bkpublic.h cspublic.h cstypes.h
ctpublic.h \
sqldb.h sqlfront.h \
sybdb.h sybfront.h \
- syberror.h \
- tds.h tdsconvert.h tdssrv.h \
- tdsver.h
+ syberror.h

nodist_include_HEADERS = tds_sysdep_public.h

noinst_HEADERS = tds_configs.h \
tds_sysdep_private.h \
md4.h md5.h des.h \
replacements.h \
tdsstring.h \
tdsodbc.h \
tdsiconv.h \
dblib.h \
ctlib.h \
tdsthread.h \
tdsbytes.h \
- replacements/readpassphrase.h
+ replacements/readpassphrase.h \
+ tds.h tdsver.h tdsconvert.h \
+ tdssrv.h

DISTCLEANFILES = tds_sysdep_public.h freetds_sysconfdir.h

freetds_sysconfdir.h: Makefile
echo '#define FREETDS_SYSCONFDIR "$(sysconfdir)"' >$@

all-am: freetds_sysconfdir.h
Index: src/tds/Makefile.am
===================================================================
RCS file: /cvsroot/freetds/freetds/src/tds/Makefile.am,v
retrieving revision 1.61
diff -u -1 -0 -r1.61 Makefile.am
--- src/tds/Makefile.am 26 Dec 2006 12:53:02 -0000 1.61
+++ src/tds/Makefile.am 16 Mar 2007 08:40:40 -0000
@@ -5,27 +5,20 @@

noinst_LTLIBRARIES = libtds.la
libtds_la_SOURCES= mem.c token.c util.c login.c read.c \
write.c convert.c numeric.c config.c query.c iconv.c \
locale.c challenge.c threadsafe.c vstrbuild.c md4.c md5.c \
des.c tdsstring.c getmac.c data.c net.c \
tds_checks.c tds_checks.h enum_cap.h log.c
libtds_la_LDFLAGS=
libtds_la_LIBADD=

-install-exec-local: libtds.la
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG)
".libs/libtds.a" "$(DESTDIR)$(libdir)/libtds.a"
-
-uninstall-local:
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/libtds.a"
-
noinst_HEADERS = tds_willconvert.h encodings.h num_limits.h
EXTRA_DIST = tds_willconvert.h encodings.h num_limits.h

if HAVE_DOXYGEN
doxyfile: $(srcdir)/tds.dox
cp $(srcdir)/tds.dox doxyfile

## The doxygen configuration file understands environment variables.

doxy: doxyfile $(libtds_la_SOURCES)


That is: no library installed, no include installed.

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page