freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Sybase large identifier support
- Date: Wed, 16 Nov 2011 02:03:40 -0500
On Mon, 14 Nov 2011 12:22:49 +0100
"Ludo Brands" <ludo.brands AT free.fr> wrote:
> Is support for large identifiers planned?
Planned, no. Possible, possibly.
I had to write a little parser to understand your capabilities, output
attached. TDS_REQ_LARGEIDENT is bit 83, which you'll note is byte 11,
and FreeTDS sends 9 capability bytes.
I haven't looked into it, but I would hope that you could add two bytes
to the defaultcaps variable defined in src/tds/mem.c.
There also might be a baked-in assumption about 30-character identifier
names, but I doubt it. DBMAXNAME is defined as 30 but used in
only two places. (Don't name your database with more than 30
characters.) Otherwise you should be OK because most of the code
doesn't care which version of the protocol you're using.
> A nasty problem with this version of ASE is that the maximum
> identifier length is 28 even with quoted_identifier off. The docs
> specify a length of 30 when quoted_identifier off. The server always
> returns "The identifier that starts with '...' is too long. Maximum
> length is 28."
Wow. If they keep shrinking the identifiers and the company, it's a
race between being bought be Computer Associates and have zero-length
table names.
--jkl
reading 22 capabilities
request
byte 9 is 0
byte 8 is 8
60 ( 8): RESERVED
byte 7 is e
52 ( 8): TDS_DATA_VOID
51 ( 4): TDS_DATA_INT8
50 ( 2): TDS_DATA_BITN
byte 6 is 6d
47 (40): TDS_PROTO_DYNAMIC
46 (20): TDS_DATA_BOUNDARY
44 ( 8): TDS_REQ_URGEVT
43 ( 4): TDS_PROTO_BULK
41 ( 1): TDS_CON_LOGICAL
byte 5 is 7f
39 (40): TDS_CON_OOB
38 (20): TDS_CSR_MULTI
37 (10): TDS_CSR_REL
36 ( 8): TDS_CSR_ABS
35 ( 4): TDS_CSR_LAST
34 ( 2): TDS_CSR_FIRST
33 ( 1): TDS_CSR_PREV
byte 4 is ff
32 (80): TDS_DATA_MONEYN
31 (40): TDS_DATA_DATETIMEN
30 (20): TDS_DATA_INTN
29 (10): TDS_DATA_LBIN
28 ( 8): TDS_DATA_LCHAR
27 ( 4): TDS_DATA_DEC
26 ( 2): TDS_DATA_IMAGE
25 ( 1): TDS_DATA_TEXT
byte 3 is ff
24 (80): TDS_DATA_NUM
23 (40): TDS_DATA_FLT8
22 (20): TDS_DATA_FLT4
21 (10): TDS_DATA_DATE4
20 ( 8): TDS_DATA_DATE8
19 ( 4): TDS_DATA_MNY4
18 ( 2): TDS_DATA_MNY8
17 ( 1): TDS_DATA_VBIN
byte 2 is ff
16 (80): TDS_DATA_BIN
15 (40): TDS_DATA_VCHAR
14 (20): TDS_DATA_CHAR
13 (10): TDS_DATA_BIT
12 ( 8): TDS_DATA_INT4
11 ( 4): TDS_DATA_INT2
10 ( 2): TDS_DATA_INT1
9 ( 1): TDS_REQ_PARAM
byte 1 is fe
8 (80): TDS_REQ_MSG
7 (40): TDS_REQ_DYNF
6 (20): TDS_REQ_CURSOR
5 (10): TDS_REQ_BCP
4 ( 8): TDS_REQ_MSTMT
3 ( 4): TDS_REQ_EVT
2 ( 2): TDS_REQ_RPC
response
byte 9 is 0
byte 8 is 0
byte 7 is 0
byte 6 is 0
byte 5 is 2
34 ( 2): TDS_RES_NOSTRIPBLANKS
byte 4 is 68
31 (40): TDS_DATA_NOSENSITIVITY
30 (20): TDS_PROTO_NOBULK
28 ( 8): TDS_CON_NOINBAND
byte 3 is 0
byte 2 is 0
byte 1 is 0
reading 24 capabilities
request
byte 12 is 7
91 ( 4): unknown
90 ( 2): unknown
89 ( 1): TDS_REQ_MIGRATE
byte 11 is cd
88 (80): unknown
87 (40): TDS_REQ_DBRPC2
84 ( 8): TDS_REQ_BLOB_NCHAR_16
83 ( 4): TDS_REQ_LARGEIDENT
81 ( 1): TDS_CAP_CLUSTERFAILOVER
byte 10 is ff
80 (80): TDS_DATA_UNITEXT
79 (40): TDS_REQ_SRVPKTSIZE
78 (20): TDS_CSR_KEYSETDRIVEN
77 (10): TDS_CSR_SEMISENSITIVE
76 ( 8): TDS_CSR_INSENSITIVE
75 ( 4): TDS_CSR_SENSITIVE
74 ( 2): TDS_CSR_SCROLL
73 ( 1): TDS_DATA_INTERVAL
byte 9 is 85
72 (80): TDS_DATA_TIME
67 ( 4): TDS_IMAGE_NCHAR
65 ( 1): TDS_CUR_IMPLICIT
byte 8 is ee
64 (80): TDS_DATA_UINTN
63 (40): TDS_DATA_UINT8
62 (20): TDS_DATA_UINT4
60 ( 8): RESERVED
59 ( 4): TDS_WIDETABLE
58 ( 2): TDS_DATA_COLUMNSTATUS
byte 7 is ef
56 (80): unknown
55 (40): TDS_OBJECT_CHAR
54 (20): TDS_OBJECT_JAVA1
52 ( 8): TDS_DATA_VOID
51 ( 4): TDS_DATA_INT8
50 ( 2): TDS_DATA_BITN
49 ( 1): TDS_DATA_FLTN
byte 6 is 65
47 (40): TDS_PROTO_DYNAMIC
46 (20): TDS_DATA_BOUNDARY
43 ( 4): TDS_PROTO_BULK
41 ( 1): TDS_CON_LOGICAL
byte 5 is 7f
39 (40): TDS_CON_OOB
38 (20): TDS_CSR_MULTI
37 (10): TDS_CSR_REL
36 ( 8): TDS_CSR_ABS
35 ( 4): TDS_CSR_LAST
34 ( 2): TDS_CSR_FIRST
33 ( 1): TDS_CSR_PREV
byte 4 is ff
32 (80): TDS_DATA_MONEYN
31 (40): TDS_DATA_DATETIMEN
30 (20): TDS_DATA_INTN
29 (10): TDS_DATA_LBIN
28 ( 8): TDS_DATA_LCHAR
27 ( 4): TDS_DATA_DEC
26 ( 2): TDS_DATA_IMAGE
25 ( 1): TDS_DATA_TEXT
byte 3 is ff
24 (80): TDS_DATA_NUM
23 (40): TDS_DATA_FLT8
22 (20): TDS_DATA_FLT4
21 (10): TDS_DATA_DATE4
20 ( 8): TDS_DATA_DATE8
19 ( 4): TDS_DATA_MNY4
18 ( 2): TDS_DATA_MNY8
17 ( 1): TDS_DATA_VBIN
byte 2 is ff
16 (80): TDS_DATA_BIN
15 (40): TDS_DATA_VCHAR
14 (20): TDS_DATA_CHAR
13 (10): TDS_DATA_BIT
12 ( 8): TDS_DATA_INT4
11 ( 4): TDS_DATA_INT2
10 ( 2): TDS_DATA_INT1
9 ( 1): TDS_REQ_PARAM
byte 1 is d6
8 (80): TDS_REQ_MSG
7 (40): TDS_REQ_DYNF
5 (10): TDS_REQ_BCP
3 ( 4): TDS_REQ_EVT
2 ( 2): TDS_REQ_RPC
response
byte 8 is 0
byte 7 is 6
51 ( 4): TDS_DATA_NODATE
50 ( 2): TDS_BLOB_NONCHAR_SCSU
byte 6 is 80
48 (80): TDS_BLOB_NONCHAR_16
byte 5 is 6
35 ( 4): TDS_DATA_NOINT8
34 ( 2): TDS_RES_NOSTRIPBLANKS
byte 4 is 48
31 (40): TDS_DATA_NOSENSITIVITY
28 ( 8): TDS_CON_NOINBAND
byte 3 is 0
byte 2 is 0
byte 1 is 0
-
[freetds] Sybase large identifier support,
Ludo Brands, 11/14/2011
-
Re: [freetds] Sybase large identifier support,
James K. Lowden, 11/16/2011
- [freetds] RE : Sybase large identifier support, Ludo Brands, 11/16/2011
-
Re: [freetds] Sybase large identifier support,
James K. Lowden, 11/16/2011
Archive powered by MHonArc 2.6.24.