ct-lib error handling
Fergus Smith <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've come across this same problem in every version of FreeTDS I've tried. http://lists.ibiblio.org/pipermail/freetds/2007q3/022165.html Running against MSSQL the error isn't trapped. I think the ct-lib error handler isn't working properly. The test environments are; TDS version: 4.2 Version: freetds vdev.0.96.85 Windows 7 SP1 Sybase ASE 12.5.4 Microsoft SQL Server 2012 (SP1) Running on windows against sybase this is the relevant part of the dump file; ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ct.c:994:ct_send() succeeded ct.c:1129:ct_results(0058B5C0, 0031A910) token.c:549:tds_process_tokens(00588068, 0031A768, 0031A75C, 0x6914) util.c:165:Changed query state from PENDING to READING packet.c:639:Received packet 0000 04 01 00 dd 00 00 00 00-e5 c9 00 fc 0a 00 00 05 |........ ........| 0010 10 05 5a 5a 5a 5a 5a 00-01 00 ae 00 53 74 6f 72 |..ZZZZZ. ....Stor| 0020 65 64 20 70 72 6f 63 65-64 75 72 65 20 27 63 75 |ed proce dure 'cu| 0030 73 74 6f 6d 65 72 64 62-5f 74 73 74 2e 2e 73 70 |stomerdb _tst..sp| 0040 44 6f 65 73 4e 6f 74 45-78 69 73 74 27 20 6e 6f |DoesNotE xist' no| 0050 74 20 66 6f 75 6e 64 2e-20 53 70 65 63 69 66 79 |t found. Specify| 0060 20 6f 77 6e 65 72 2e 6f-62 6a 65 63 74 6e 61 6d | owner.o bjectnam| 0070 65 20 6f 72 20 75 73 65-20 73 70 5f 68 65 6c 70 |e or use sp_help| 0080 20 74 6f 20 63 68 65 63-6b 20 77 68 65 74 68 65 | to chec k whethe| 0090 72 20 74 68 65 20 6f 62-6a 65 63 74 20 65 78 69 |r the ob ject exi| 00a0 73 74 73 20 28 73 70 5f-68 65 6c 70 20 6d 61 79 |sts (sp_ help may| 00b0 20 70 72 6f 64 75 63 65-20 6c 6f 74 73 20 6f 66 | produce lots of| 00c0 20 6f 75 74 70 75 74 29-2e 0a 06 61 73 65 63 64 | output) ...asecd| 00d0 74 00 01 00 fd 02 00 02-00 00 00 00 00 |t....... .....| token.c:564:processing result tokens. marker is e5(EED) token.c:115:tds_process_default_tokens() marker is e5(EED) token.c:2339:tds_process_msg() reading message 2812 from server token.c:2411:tds_process_msg() calling client msg handler ctutil.c:142:_ct_handle_server_message(005872A0, 00588068, 0031A660) ct.c:4330:ct_diag_storeservermsg(005871D8, 00587ED0, 0031A0F4) token.c:2424:tds_process_msg() returning TDS_SUCCESS token.c:564:processing result tokens. marker is fd(DONE) token.c:2075:tds_process_end: more_results = 0 was_cancelled = 0 error = 1 done_count_valid = 0 token.c:2092: rows_affected = 0 token.c:2095:tds_process_end() state set to TDS_IDLE util.c:165:Changed query state from READING to IDLE util.c:83:logic error: cannot change query state from IDLE to PENDING util.c:165:Changed query state from IDLE to IDLE ct.c:1186:ct_results() process_result_tokens returned 0 (type 4052) ct.c:1292:ct_results() results state = 0 ct.c:1293:ct_results() command type = 148 ct.c:1294:ct_results() dynamic cmd = 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- On windows against MS SQL this is the same part of the dump file; ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ct.c:994:ct_send() succeeded ct.c:1129:ct_results(0084C658, 0032AB00) token.c:549:tds_process_tokens(00847FD0, 0032A958, 0032A94C, 0x6914) util.c:165:Changed query state from PENDING to READING packet.c:639:Received packet 0000 04 01 00 c8 00 3d 01 00-aa b4 00 fc 0a 00 00 3e |.....=.. .......>| 0010 10 45 00 43 00 6f 00 75-00 6c 00 64 00 20 00 6e |.E.C.o.u .l.d. .n| 0020 00 6f 00 74 00 20 00 66-00 69 00 6e 00 64 00 20 |.o.t. .f .i.n.d. | 0030 00 73 00 74 00 6f 00 72-00 65 00 64 00 20 00 70 |.s.t.o.r .e.d. .p| 0040 00 72 00 6f 00 63 00 65-00 64 00 75 00 72 00 65 |.r.o.c.e .d.u.r.e| 0050 00 20 00 27 00 62 00 69-00 6c 00 6c 00 69 00 6e |. .'.b.i .l.l.i.n| 0060 00 67 00 5f 00 64 00 65-00 76 00 2e 00 2e 00 73 |.g._.d.e .v.....s| 0070 00 70 00 52 00 75 00 61-00 69 00 72 00 69 00 50 |.p.R.u.a .i.r.i.P| 0080 00 50 00 47 00 65 00 74-00 44 00 65 00 66 00 61 |.P.G.e.t .D.e.f.a| 0090 00 75 00 6c 00 74 00 73-00 27 00 2e 00 0f 41 00 |.u.l.t.s .'....A.| 00a0 4c 00 50 00 2d 00 4d 00-41 00 54 00 52 00 49 00 |L.P.-.M. A.T.R.I.| 00b0 58 00 53 00 51 00 4c 00-53 00 56 00 00 01 00 fe |X.S.Q.L. S.V.....| 00c0 02 00 e0 00 00 00 00 00- |........| token.c:564:processing result tokens. marker is aa(ERROR) token.c:115:tds_process_default_tokens() marker is aa(ERROR) token.c:2339:tds_process_msg() reading message 2812 from server token.c:2411:tds_process_msg() calling client msg handler ctutil.c:142:_ct_handle_server_message(008472A0, 00847FD0, 0032A850) ct.c:4330:ct_diag_storeservermsg(008471D8, 00847ED0, 0032A2E4) token.c:2424:tds_process_msg() returning TDS_SUCCESS token.c:564:processing result tokens. marker is fe(DONEPROC) token.c:2075:tds_process_end: more_results = 0 was_cancelled = 0 error = 1 done_count_valid = 0 token.c:2092: rows_affected = 0 token.c:2095:tds_process_end() state set to TDS_IDLE util.c:165:Changed query state from READING to IDLE util.c:83:logic error: cannot change query state from IDLE to PENDING util.c:165:Changed query state from IDLE to IDLE ct.c:1186:ct_results() process_result_tokens returned 0 (type 4053) token.c:549:tds_process_tokens(00847FD0, 0032A958, 0032A94C, 0x6914) token.c:552:tds_process_tokens() state is COMPLETED ct.c:1186:ct_results() process_result_tokens returned 1 (type 4052) ct.c:235:ct_describe_cmd_state(3) ct.c:235:ct_describe_cmd_state(2) ct.c:223:setting command state to READY (from SENT) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I was wondering has anyone made an attempt to fix this? Thanks a million, Fergus