Skip to Content.
Sympa Menu

freetds - [freetds] Transaction weirdness

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John Anderson <panic AT semiosix.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Transaction weirdness
  • Date: Wed, 08 Oct 2003 19:51:10 -0000

Howdies

I'm doing a transaction that contains one select statement with
associated data retrieval and then a stored procedure execute statement.
Committing the transaction using either SQLTransact or SQLEndTran fails
with

Error: 0, SQLState: S1000, [FreeTDS][SQL Server]Could not perform COMMIT or
ROLLBACK

I'm hoping I'm not doing anything wrong - the code works OK on a win32
box with the standard ODBC driver. I've attached the freetds.log file.

bye
John

21:38:14.392926 tds_process_end: more_results = 0
21:38:14.392935 was_cancelled = 1
21:38:14.392942 error = 0
21:38:14.392949 done_count_valid = 0
change_autocommit: executing SET IMPLICIT_TRANSACTIONS ON
21:38:14.393250 tds_put_string converting 0 bytes of "SET
IMPLICIT_TRANSACTIONS ON"
21:38:14.393280 tds_put_string wrote 56 bytes
Sending packet @ 21:38:14.393299
0000 01 01 00 40 00 00 01 00-53 00 45 00 54 00 20 00 |...@.... S.E.T. .|
0010 49 00 4d 00 50 00 4c 00-49 00 43 00 49 00 54 00 |I.M.P.L. I.C.I.T.|
0020 5f 00 54 00 52 00 41 00-4e 00 53 00 41 00 43 00 |_.T.R.A. N.S.A.C.|
0030 54 00 49 00 4f 00 4e 00-53 00 20 00 4f 00 4e 00 |T.I.O.N. S. .O.N.|


Received header @ 21:38:14.394073
0000 04 01 00 11 00 36 01 00- |.....6..|


Received packet @ 21:38:14.394106
0000 fd 00 00 b9 00 00 00 00-00 |........ .|


21:38:14.394131 processing result tokens. marker is fd(DONE)
21:38:14.394150 tds_process_end: more_results = 0
21:38:14.394158 was_cancelled = 0
21:38:14.394166 error = 0
21:38:14.394172 done_count_valid = 0
21:38:14.394189 tds_process_result_tokens() state is COMPLETED
21:38:14.394807 tds_put_string converting 0 bytes of "select BookingStateID
from lstStates where name = 'start'"
21:38:14.394844 tds_put_string wrote 114 bytes
Sending packet @ 21:38:14.394864
0000 01 01 00 7a 00 00 01 00-73 00 65 00 6c 00 65 00 |...z.... s.e.l.e.|
0010 63 00 74 00 20 00 42 00-6f 00 6f 00 6b 00 69 00 |c.t. .B. o.o.k.i.|
0020 6e 00 67 00 53 00 74 00-61 00 74 00 65 00 49 00 |n.g.S.t. a.t.e.I.|
0030 44 00 20 00 66 00 72 00-6f 00 6d 00 20 00 6c 00 |D. .f.r. o.m. .l.|
0040 73 00 74 00 53 00 74 00-61 00 74 00 65 00 73 00 |s.t.S.t. a.t.e.s.|
0050 20 00 77 00 68 00 65 00-72 00 65 00 20 00 6e 00 | .w.h.e. r.e. .n.|
0060 61 00 6d 00 65 00 20 00-3d 00 20 00 27 00 73 00 |a.m.e. . =. .'.s.|
0070 74 00 61 00 72 00 74 00-27 00 |t.a.r.t. '.|


Received header @ 21:38:14.396097
0000 04 01 00 38 00 37 01 00- |...8.7..|


Received packet @ 21:38:14.396133
0000 81 01 00 00 00 08 00 30-0e 42 00 6f 00 6f 00 6b |.......0 .B.o.o.k|
0010 00 69 00 6e 00 67 00 53-00 74 00 61 00 74 00 65 |.i.n.g.S .t.a.t.e|
0020 00 49 00 44 00 d1 00 fd-10 00 c1 00 01 00 00 00 |.I.D.... ........|


21:38:14.396186 processing result tokens. marker is 81(TDS7_RESULT)
tds_get_string: reading 28 from wire to give 14 to client.
21:38:14.396238 tds7_get_data_info:1337:
type = 48 (tinyint)
column_varint_size = 0
colname = BookingStateID (14 bytes)
column_size = 1 (1 on server)
21:38:14.396270 processing result tokens. marker is d1(ROW)
odbc:SQLColAttribute: fDescType is 6
21:38:14.398617 processing row tokens. marker is d1(ROW)
21:38:14.398674 processing row. column is 0 varint size = 0
21:38:14.398695 processing row. column size is 1
21:38:14.398713 clearing column 0 NULL bit
convert_tds2sql: src is 48 dest = 1
convert_tds2sql: outputting character data destlen = 4
SQLFreeHandle(3, 0x80af790)
Sending packet @ 21:38:14.399465
0000 06 01 00 08 00 00 01 00- |........|


21:38:14.399558 tds_process_end: more_results = 0
21:38:14.399568 was_cancelled = 0
21:38:14.399590 error = 0
21:38:14.399597 done_count_valid = 1
21:38:14.399616 rows_affected = 1
Received header @ 21:38:14.400117
0000 04 01 00 11 00 37 01 00- |.....7..|


Received packet @ 21:38:14.400158
0000 fd 20 00 fd 00 00 00 00-00 |. ...... .|


21:38:14.400182 tds_process_end: more_results = 0
21:38:14.400191 was_cancelled = 1
21:38:14.400199 error = 0
21:38:14.400205 done_count_valid = 0
21:38:14.400951 tds_put_string converting 0 bytes of "exec CreateBooking
0,131122"
21:38:14.400991 tds_put_string wrote 54 bytes
Sending packet @ 21:38:14.401011
0000 01 01 00 3e 00 00 01 00-65 00 78 00 65 00 63 00 |...>.... e.x.e.c.|
0010 20 00 43 00 72 00 65 00-61 00 74 00 65 00 42 00 | .C.r.e. a.t.e.B.|
0020 6f 00 6f 00 6b 00 69 00-6e 00 67 00 20 00 30 00 |o.o.k.i. n.g. .0.|
0030 2c 00 31 00 33 00 31 00-31 00 32 00 32 00 |,.1.3.1. 1.2.2.|


Received header @ 21:38:14.402440
0000 04 01 00 3b 00 36 01 00- |...;.6..|


Received packet @ 21:38:14.402478
0000 ff 11 00 c3 00 01 00 00-00 81 01 00 00 00 01 00 |........ ........|
0010 6c 11 26 00 00 d1 05 01-1f 0f 00 00 ff 11 00 c1 |l.&..... ........|
0020 00 01 00 00 00 79 00 00-00 00 fe 00 00 e0 00 01 |.....y.. ........|
0030 00 00 00 - |...|


21:38:14.402540 processing result tokens. marker is ff(DONEINPROC)
21:38:14.402562 tds_process_end: more_results = 1
21:38:14.402570 was_cancelled = 0
21:38:14.402578 error = 0
21:38:14.402585 done_count_valid = 1
21:38:14.402602 rows_affected = 1
21:38:14.402620 processing result tokens. marker is 81(TDS7_RESULT)
21:38:14.402709 tds7_get_data_info:1337:
type = 108 (numeric)
column_varint_size = 1
colname = (0 bytes)
column_size = 17 (17 on server)
21:38:14.402746 processing result tokens. marker is d1(ROW)
odbc:SQLColAttribute: fDescType is 6
21:38:14.403685 processing row tokens. marker is d1(ROW)
21:38:14.403709 processing row. column is 0 varint size = 1
21:38:14.403728 processing row. column size is 5
21:38:14.403746 clearing column 0 NULL bit
21:38:14.403763 swapping numeric data...
convert_tds2sql: src is 108 dest = 1
convert_tds2sql: outputting character data destlen = 41
SQLTransact(0x0,0x807a550,0)
change_transaction(0x807a550,1)
tds_submit_query(): state is PENDING
SQLFreeHandle(3, 0x80af790)
Sending packet @ 21:38:14.406642
0000 06 01 00 08 00 00 01 00- |........|


21:38:14.406748 tds_process_default_tokens() marker is ff(DONEINPROC)
21:38:14.406772 tds_process_end: more_results = 1
21:38:14.406781 was_cancelled = 0
21:38:14.406789 error = 0
21:38:14.406795 done_count_valid = 1
21:38:14.406813 rows_affected = 1
21:38:14.406830 tds_process_default_tokens() marker is 79(RETURNSTATUS)
21:38:14.406849 tds_process_default_tokens() marker is fe(DONEPROC)
21:38:14.406867 tds_process_end: more_results = 0
21:38:14.406875 was_cancelled = 0
21:38:14.406882 error = 0
21:38:14.406889 done_count_valid = 0
Received header @ 21:38:14.407233
0000 04 01 00 11 00 36 01 00- |.....6..|


Received packet @ 21:38:14.407269
0000 fd 20 00 fd 00 00 00 00-00 |. ...... .|


21:38:14.407293 tds_process_end: more_results = 0
21:38:14.407301 was_cancelled = 1
21:38:14.407309 error = 0
21:38:14.407316 done_count_valid = 0



Archive powered by MHonArc 2.6.24.

Top of Page