Skip to Content.
Sympa Menu

freetds - RE: [freetds] Freepascal with FreeTDS/UnixODBC

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] Freepascal with FreeTDS/UnixODBC
  • Date: Wed, 21 Jul 2004 09:57:27 +0200

>
> *This message was transferred with a trial version of
> CommuniGate(tm) Pro*
> The log I posted was with the failure, using Version 8.0.
> If you want, I'll post a log of a working transaction with V7.0
>

Just to sum up:

You got this warning

testodbc: iconv.c:411: tds_iconv_info_init: Assertion
`char_conv->to_wire == (iconv_t) - 1' failed.

>From log

pid: 15469:Received packet @ 00:46:57.529768
0000 e3 1f 00 01 08 56 00 49-00 53 00 54 00 41 00 5f |.....V.I .S.T.A._|
0010 00 4e 00 57 00 06 6d 00-61 00 73 00 74 00 65 00 |.N.W..m. a.s.t.e.|
0020 72 00 ab 7e 00 45 16 00-00 02 00 27 00 43 00 68 |r..~.E.. ...'.C.h|
0030 00 61 00 6e 00 67 00 65-00 64 00 20 00 64 00 61 |.a.n.g.e .d. .d.a|
0040 00 74 00 61 00 62 00 61-00 73 00 65 00 20 00 63 |.t.a.b.a .s.e. .c|
0050 00 6f 00 6e 00 74 00 65-00 78 00 74 00 20 00 74 |.o.n.t.e .x.t. .t|
0060 00 6f 00 20 00 27 00 56-00 49 00 53 00 54 00 41 |.o. .'.V .I.S.T.A|
0070 00 5f 00 4e 00 57 00 27-00 2e 00 12 4a 00 55 00 |._.N.W.' ....J.U.|
0080 50 00 49 00 54 00 45 00-52 00 5c 00 53 00 51 00 |P.I.T.E. R.\.S.Q.|
0090 4c 00 5f 00 53 00 45 00-52 00 56 00 45 00 52 00 |L._.S.E. R.V.E.R.|
00a0 00 00 00 e3 08 00 07 05-09 04 d0 00 34 00 e3 17 |........ ....4...|
00b0 00 02 0a 75 00 73 00 5f-00 65 00 6e 00 67 00 6c |...u.s._ .e.n.g.l|
00c0 00 69 00 73 00 68 00 00-ab 7e 00 47 16 00 00 01 |.i.s.h.. .~.G....|
00d0 00 27 00 43 00 68 00 61-00 6e 00 67 00 65 00 64 |.'.C.h.a .n.g.e.d|
00e0 00 20 00 6c 00 61 00 6e-00 67 00 75 00 61 00 67 |. .l.a.n .g.u.a.g|
00f0 00 65 00 20 00 73 00 65-00 74 00 74 00 69 00 6e |.e. .s.e .t.t.i.n|
0100 00 67 00 20 00 74 00 6f-00 20 00 75 00 73 00 5f |.g. .t.o . .u.s._|
0110 00 65 00 6e 00 67 00 6c-00 69 00 73 00 68 00 2e |.e.n.g.l .i.s.h..|
0120 00 12 4a 00 55 00 50 00-49 00 54 00 45 00 52 00 |..J.U.P. I.T.E.R.|
0130 5c 00 53 00 51 00 4c 00-5f 00 53 00 45 00 52 00 |\.S.Q.L. _.S.E.R.|
0140 56 00 45 00 52 00 00 00-00 ad 36 00 01 71 00 00 |V.E.R... ..6..q..|
0150 01 16 4d 00 69 00 63 00-72 00 6f 00 73 00 6f 00 |..M.i.c. r.o.s.o.|
0160 66 00 74 00 20 00 53 00-51 00 4c 00 20 00 53 00 |f.t. .S. Q.L. .S.|
0170 65 00 72 00 76 00 65 00-72 00 00 00 00 00 08 00 |e.r.v.e. r.......|
0180 02 f8 e3 13 00 04 04 34-00 30 00 39 00 36 00 04 |.......4 .0.9.6..|
0190 34 00 30 00 39 00 36 00-fd 00 00 00 00 00 00 00 |4.0.9.6. ........|
01a0 00 - |.|


pid: 15469:00:46:57.534290 looking for login token, got e3(ENVCHANGE)
pid: 15469:00:46:57.534661 tds_process_default_tokens() marker is
e3(ENVCHANGE)
pid: 15469:tds_get_string: reading 16 from wire to give 8 to client.
pid: 15469:tds_get_string: reading 12 from wire to give 6 to client.
pid: 15469:00:46:57.535791 looking for login token, got ab(INFO)
pid: 15469:00:46:57.536144 tds_process_default_tokens() marker is
ab(INFO)
pid: 15469:tds_get_string: reading 78 from wire to give 39 to client.
pid: 15469:tds_get_string: reading 36 from wire to give 18 to client.
pid: 15469:00:46:57.537292 looking for login token, got e3(ENVCHANGE)
pid: 15469:00:46:57.537805 tds_process_default_tokens() marker is
e3(ENVCHANGE)

This event it's

e3 08 00 07 05 09 04 d0 00 34 00

sql collation changed to LCID 0x409. In token.c (line 2251) we call
c(tds, 0x409). tds_srv_charset_changed calls
tds_srv_charset_changed(tds, "CP1252"). tds_srv_charset_changed calls
tds_iconv_get_info(tds, "CP1252"). Fail occur in tds_iconv_info_init so
tds_iconv_get_info have to call it. This means that tds_iconv_get_info
didn't find a server conversion (cf "search a charset from already
allocated charsets" in tds_iconv_get_info). However info =
tds->char_convs[tds->char_conv_count++] means that info should point to
a not used TDSICONV and not used TDSICONV structs should have to_wire
member set to (iconv_t) -1 (see iconv.c:944 and iconv.c:281). Now the
question is: why to_wire isn't (iconv_t) -1 ?? Memory corruption ?
char_conv_count invalid ?
This should be the first additional TDSICONV so code at iconv.c:933
should have been executed. Perhaps CHUNK_ALLOC in your environment it's
wrong defined? You should see a warning compiling FreeTDS... Many
question but no solution... It's the first time I see this error and
iconv support it's not that new...

What's your platform? RH9 if I remember however what processor are you
using ?

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page