Skip to Content.
Sympa Menu

freetds - [freetds] error: native binds to function params on sql server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Clovis Fabricio <nosklo AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] error: native binds to function params on sql server
  • Date: Tue, 29 Jun 2010 15:22:34 -0300

Hello,

I'm using the software following stack on Ubuntu 10.04 Lucid LTS to
connect to a database:

1) python 2.6.5 (ubuntu package)
2) pyodbc git trunk commit eb545758079a743b2e809e2e219c8848bc6256b2
3) unixodbc 2.2.11 (ubuntu package)
4) freetds 0.82 (ubuntu package)
5) Windows with Microsoft SQL Server 2000 (8.0)

I get this error when trying to do native parameter binds in arguments
to a SQL SERVER function:

Traceback (most recent call last):
File "/home/nosklo/devel/testes/sqlfunc.py", line 32, in <module>
cur.execute("SELECT * FROM fn_FuncTest(?)", ('test',))
pyodbc.ProgrammingError: ('42000', '[42000] [FreeTDS][SQL
Server]SqlDumpExceptionHandler: Process 54 generated fatal exception
c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this
process.\r\n (0) (SQLPrepare)')

Here's the reproduction code:

import pyodbc
constring =
'server=myserver;uid=uid;pwd=pwd;database=db;TDS_Version=8.0;driver={FreeTDS}'

con = pyodbc.connect(constring)
print 'VERSION: ', con.getinfo(pyodbc.SQL_DBMS_VER)

cur = con.cursor()
try:
cur.execute('DROP FUNCTION fn_FuncTest')
con.commit()
print "Function dropped"
except pyodbc.Error:
pass

cur.execute('''
CREATE FUNCTION fn_FuncTest (@testparam varchar(4))
RETURNS @retTest TABLE (param varchar(4))
AS
BEGIN
INSERT @retTest
SELECT @testparam
RETURN
END''')
con.commit()

# this works fine (no native bind):
cur.execute("SELECT * FROM fn_FuncTest('test')")
assert cur.fetchone()[0] == 'test'

# this fails (trying to native bind):
cur.execute("SELECT * FROM fn_FuncTest(?)", ('test',))
assert cur.fetchone()[0] == 'test'

Further investigation reveals some _weird_ stuff I'd like to relate:

a) Everything works fine if I change TDS Version to 4.2 (however,
version report from sql server is wrong -- using TDS version 4.2 I get
'95.08.0255' instead of the real version '08.00.0760').
b) Everything works fine for the other two types of functions ->
functions that return a value and functions that are just a SELECT
query (like a view) both work fine. You can even define a new function
that returns the result of a query on the other (broken) function, and
this way everything will work, **even when doing native binds on the
parameters**. For example: CREATE FUNCTION fn_tempFunc(@testparam
varchar(4)) RETURNS TABLE AS RETURN (SELECT * FROM
fn_FuncTest(@testparam))
c) Connection gets very unstable after this error, you can't recover.
d) The error happens when trying to bind any type of data.

I'm including full freetds debug log as attachment.

Can someone guide me on how to pursue this further?

Thanks in advance

--
nosklo
log.c:190:Starting log file for FreeTDS 0.82
	on 2010-06-29 15:11:49 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "ANSI_X3.4-1968" character set
iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 10.32.42.69 port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:735:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 01 81 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 e3 19 00 01 05 47 00 65-00 72 00 61 00 6c 00 06 |.....G.e .r.a.l..|
0010 6d 00 61 00 73 00 74 00-65 00 72 00 ab 6a 00 45 |m.a.s.t. e.r..j.E|
0020 16 00 00 02 00 24 00 43-00 68 00 61 00 6e 00 67 |.....$.C .h.a.n.g|
0030 00 65 00 64 00 20 00 64-00 61 00 74 00 61 00 62 |.e.d. .d .a.t.a.b|
0040 00 61 00 73 00 65 00 20-00 63 00 6f 00 6e 00 74 |.a.s.e.  .c.o.n.t|
0050 00 65 00 78 00 74 00 20-00 74 00 6f 00 20 00 27 |.e.x.t.  .t.o. .'|
0060 00 47 00 65 00 72 00 61-00 6c 00 27 00 2e 00 0b |.G.e.r.a .l.'....|
0070 4d 00 47 00 37 00 36 00-38 00 34 00 4e 00 54 00 |M.G.7.6. 8.4.N.T.|
0080 30 00 30 00 35 00 00 00-00 e3 08 00 07 05 09 04 |0.0.5... ........|
0090 d0 00 00 00 e3 17 00 02-0a 75 00 73 00 5f 00 65 |........ .u.s._.e|
00a0 00 6e 00 67 00 6c 00 69-00 73 00 68 00 00 ab 70 |.n.g.l.i .s.h...p|
00b0 00 47 16 00 00 01 00 27-00 43 00 68 00 61 00 6e |.G.....' .C.h.a.n|
00c0 00 67 00 65 00 64 00 20-00 6c 00 61 00 6e 00 67 |.g.e.d.  .l.a.n.g|
00d0 00 75 00 61 00 67 00 65-00 20 00 73 00 65 00 74 |.u.a.g.e . .s.e.t|
00e0 00 74 00 69 00 6e 00 67-00 20 00 74 00 6f 00 20 |.t.i.n.g . .t.o. |
00f0 00 75 00 73 00 5f 00 65-00 6e 00 67 00 6c 00 69 |.u.s._.e .n.g.l.i|
0100 00 73 00 68 00 2e 00 0b-4d 00 47 00 37 00 36 00 |.s.h.... M.G.7.6.|
0110 38 00 34 00 4e 00 54 00-30 00 30 00 35 00 00 00 |8.4.N.T. 0.0.5...|
0120 00 ad 36 00 01 71 00 00-01 16 4d 00 69 00 63 00 |..6..q.. ..M.i.c.|
0130 72 00 6f 00 73 00 6f 00-66 00 74 00 20 00 53 00 |r.o.s.o. f.t. .S.|
0140 51 00 4c 00 20 00 53 00-65 00 72 00 76 00 65 00 |Q.L. .S. e.r.v.e.|
0150 72 00 00 00 00 00 08 00-02 f8 e3 13 00 04 04 34 |r....... .......4|
0160 00 30 00 39 00 36 00 04-34 00 30 00 39 00 36 00 |.0.9.6.. 4.0.9.6.|
0170 fd 00 00 00 00 00 00 00-00                      |........ .|

token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  ab(INFO)
token.c:108:tds_process_default_tokens() marker is ab(INFO)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 5701 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2281:tds_process_env_chg(): 5 bytes of collation data received
token.c:2282:tds->collation was
0000 00 00 00 00 00         -                        |.....|

iconv.c:985:setting server single-byte charset to "CP1252"
iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"CP1252"
token.c:2292:tds->collation now
0000 09 04 d0 00 00         -                        |.....|

token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  ab(INFO)
token.c:108:tds_process_default_tokens() marker is ab(INFO)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 5703 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  ad(LOGINACK)
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:316:looking for login token, got  fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232:                rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 1
odbc.c:4672:SQLGetFunctions: fFunction is 999
odbc.c:5587:SQLGetInfo(0x8909238, 77, 0xbfaf6fec, 20, (nil))
odbc.c:4841:_SQLGetInfo(0x8909238, 77, 0xbfaf6fec, 20, (nil)
odbc.c:5587:SQLGetInfo(0x8909238, 10000, 0xbfaf6fec, 5, (nil))
odbc.c:4841:_SQLGetInfo(0x8909238, 10000, 0xbfaf6fec, 5, (nil)
odbc.c:5909:SQLSetConnectAttr(0x8909238, 102, (nil), -5)
odbc.c:5827:_SQLSetConnectAttr(0x8909238, 102, (nil), -5)
odbc.c:213:change_autocommit: executing SET IMPLICIT_TRANSACTIONS ON
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 28 bytes of "SET IMPLICIT_TRANSACTIONS ON"
write.c:164:tds_put_string wrote 56 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
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.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8b8c, 0xbfaf8b88, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 fd 00 00 b9 00 00 00 00-00                      |........ .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8b8c, 0xbfaf8b88, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:5587:SQLGetInfo(0x8909238, 77, 0xbfaf8dd8, 20, 0xbfaf8dd6)
odbc.c:4841:_SQLGetInfo(0x8909238, 77, 0xbfaf8dd8, 20, 0xbfaf8dd6
odbc.c:5587:SQLGetInfo(0x8909238, 10002, 0xbfaf8dcc, 2, 0xbfaf8dd6)
odbc.c:4841:_SQLGetInfo(0x8909238, 10002, 0xbfaf8dcc, 2, 0xbfaf8dd6
odbc.c:1504:SQLAllocStmt(0x8909238, 0x88ebb50)
odbc.c:1403:_SQLAllocStmt(0x8909238, 0x88ebb50)
odbc.c:4079:SQLGetStmtAttr(0x88bd578, 10010, 0xbfaf8cc8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88bd578, 10010, 0xbfaf8cc8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88bd578, 10011, 0xbfaf8cc8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88bd578, 10011, 0xbfaf8cc8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88bd578, 10012, 0xbfaf8cc8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88bd578, 10012, 0xbfaf8cc8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88bd578, 10013, 0xbfaf8cc8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88bd578, 10013, 0xbfaf8cc8, 4, (nil))
odbc.c:5680:SQLGetTypeInfo(0x88bd578, 93)
odbc.c:2965:_SQLExecute(0x88bd578)
odbc.c:2970:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 26 bytes of "EXEC sp_datatype_info 93,3"
write.c:164:tds_put_string wrote 52 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3c 00 00 01 00-45 00 58 00 45 00 43 00 |...<.... E.X.E.C.|
0010 20 00 73 00 70 00 5f 00-64 00 61 00 74 00 61 00 | .s.p._. d.a.t.a.|
0020 74 00 79 00 70 00 65 00-5f 00 69 00 6e 00 66 00 |t.y.p.e. _.i.n.f.|
0030 6f 00 20 00 39 00 33 00-2c 00 33 00             |o. .9.3. ,.3.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 03 96 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 ff 01 00 c0 00 00 00 00-00 ff 01 00 c0 00 00 00 |........ ........|
0010 00 00 ff 11 00 c1 00 01-00 00 00 ff 11 00 c1 00 |........ ........|
0020 01 00 00 00 81 14 00 00-01 01 00 e7 00 01 09 04 |........ ........|
0030 d0 00 00 09 54 00 59 00-50 00 45 00 5f 00 4e 00 |....T.Y. P.E._.N.|
0040 41 00 4d 00 45 00 00 00-08 00 34 09 44 00 41 00 |A.M.E... ..4.D.A.|
0050 54 00 41 00 5f 00 54 00-59 00 50 00 45 00 00 00 |T.A._.T. Y.P.E...|
0060 01 00 26 04 09 50 00 52-00 45 00 43 00 49 00 53 |..&..P.R .E.C.I.S|
0070 00 49 00 4f 00 4e 00 00-00 09 00 a7 20 00 09 04 |.I.O.N.. .... ...|
0080 d0 00 00 0e 4c 00 49 00-54 00 45 00 52 00 41 00 |....L.I. T.E.R.A.|
0090 4c 00 5f 00 50 00 52 00-45 00 46 00 49 00 58 00 |L._.P.R. E.F.I.X.|
00a0 00 00 09 00 a7 20 00 09-04 d0 00 00 0e 4c 00 49 |..... .. .....L.I|
00b0 00 54 00 45 00 52 00 41-00 4c 00 5f 00 53 00 55 |.T.E.R.A .L._.S.U|
00c0 00 46 00 46 00 49 00 58-00 00 00 09 00 a7 20 00 |.F.F.I.X ...... .|
00d0 09 04 d0 00 00 0d 43 00-52 00 45 00 41 00 54 00 |......C. R.E.A.T.|
00e0 45 00 5f 00 50 00 41 00-52 00 41 00 4d 00 53 00 |E._.P.A. R.A.M.S.|
00f0 00 00 01 00 26 02 08 4e-00 55 00 4c 00 4c 00 41 |....&..N .U.L.L.A|
0100 00 42 00 4c 00 45 00 00-00 08 00 34 0e 43 00 41 |.B.L.E.. ...4.C.A|
0110 00 53 00 45 00 5f 00 53-00 45 00 4e 00 53 00 49 |.S.E._.S .E.N.S.I|
0120 00 54 00 49 00 56 00 45-00 00 00 08 00 34 0a 53 |.T.I.V.E .....4.S|
0130 00 45 00 41 00 52 00 43-00 48 00 41 00 42 00 4c |.E.A.R.C .H.A.B.L|
0140 00 45 00 00 00 09 00 26-02 12 55 00 4e 00 53 00 |.E.....& ..U.N.S.|
0150 49 00 47 00 4e 00 45 00-44 00 5f 00 41 00 54 00 |I.G.N.E. D._.A.T.|
0160 54 00 52 00 49 00 42 00-55 00 54 00 45 00 00 00 |T.R.I.B. U.T.E...|
0170 08 00 34 05 4d 00 4f 00-4e 00 45 00 59 00 00 00 |..4.M.O. N.E.Y...|
0180 09 00 26 02 0e 41 00 55-00 54 00 4f 00 5f 00 49 |..&..A.U .T.O._.I|
0190 00 4e 00 43 00 52 00 45-00 4d 00 45 00 4e 00 54 |.N.C.R.E .M.E.N.T|
01a0 00 00 01 01 00 e7 00 01-09 04 d0 00 00 0f 4c 00 |........ ......L.|
01b0 4f 00 43 00 41 00 4c 00-5f 00 54 00 59 00 50 00 |O.C.A.L. _.T.Y.P.|
01c0 45 00 5f 00 4e 00 41 00-4d 00 45 00 00 00 01 00 |E._.N.A. M.E.....|
01d0 26 02 0d 4d 00 49 00 4e-00 49 00 4d 00 55 00 4d |&..M.I.N .I.M.U.M|
01e0 00 5f 00 53 00 43 00 41-00 4c 00 45 00 00 00 01 |._.S.C.A .L.E....|
01f0 00 26 02 0d 4d 00 41 00-58 00 49 00 4d 00 55 00 |.&..M.A. X.I.M.U.|
0200 4d 00 5f 00 53 00 43 00-41 00 4c 00 45 00 00 00 |M._.S.C. A.L.E...|
0210 08 00 34 0d 53 00 51 00-4c 00 5f 00 44 00 41 00 |..4.S.Q. L._.D.A.|
0220 54 00 41 00 5f 00 54 00-59 00 50 00 45 00 00 00 |T.A._.T. Y.P.E...|
0230 09 00 26 02 10 53 00 51-00 4c 00 5f 00 44 00 41 |..&..S.Q .L._.D.A|
0240 00 54 00 45 00 54 00 49-00 4d 00 45 00 5f 00 53 |.T.E.T.I .M.E._.S|
0250 00 55 00 42 00 00 00 01-00 26 04 0e 4e 00 55 00 |.U.B.... .&..N.U.|
0260 4d 00 5f 00 50 00 52 00-45 00 43 00 5f 00 52 00 |M._.P.R. E.C._.R.|
0270 41 00 44 00 49 00 58 00-00 00 01 00 26 02 12 49 |A.D.I.X. ....&..I|
0280 00 4e 00 54 00 45 00 52-00 56 00 41 00 4c 00 5f |.N.T.E.R .V.A.L._|
0290 00 50 00 52 00 45 00 43-00 49 00 53 00 49 00 4f |.P.R.E.C .I.S.I.O|
02a0 00 4e 00 00 00 21 00 26-02 08 55 00 53 00 45 00 |.N...!.& ..U.S.E.|
02b0 52 00 54 00 59 00 50 00-45 00 a9 08 00 02 00 0c |R.T.Y.P. E.......|
02c0 00 0b 00 00 00 d1 10 00-64 00 61 00 74 00 65 00 |........ d.a.t.e.|
02d0 74 00 69 00 6d 00 65 00-5d 00 04 17 00 00 00 01 |t.i.m.e. ].......|
02e0 00 27 01 00 27 ff ff 02-01 00 00 00 03 00 00 00 |.'..'... ........|
02f0 00 00 10 00 64 00 61 00-74 00 65 00 74 00 69 00 |....d.a. t.e.t.i.|
0300 6d 00 65 00 02 03 00 02-03 00 09 00 02 03 00 00 |m.e..... ........|
0310 00 02 0c 00 d1 1a 00 73-00 6d 00 61 00 6c 00 6c |.......s .m.a.l.l|
0320 00 64 00 61 00 74 00 65-00 74 00 69 00 6d 00 65 |.d.a.t.e .t.i.m.e|
0330 00 5d 00 04 10 00 00 00-01 00 27 01 00 27 ff ff |.]...... ..'..'..|
0340 02 01 00 00 00 03 00 00-00 00 00 1a 00 73 00 6d |........ .....s.m|
0350 00 61 00 6c 00 6c 00 64-00 61 00 74 00 65 00 74 |.a.l.l.d .a.t.e.t|
0360 00 69 00 6d 00 65 00 02-00 00 02 00 00 09 00 02 |.i.m.e.. ........|
0370 03 00 00 00 02 16 00 ff-11 00 c1 00 02 00 00 00 |........ ........|
0380 79 00 00 00 00 fe 00 00-e0 00 02 00 00 00       |y....... ......|

token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4054, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3334:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4054, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3334:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2232:                rows_affected = 1
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4054, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3334:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2232:                rows_affected = 1
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4054, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3334:odbc_process_tokens: processed TDS_DONEINPROC_RESULT
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4054
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1520:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1544:set current_results (20 columns) to tds->res_info
token.c:1555:setting up column 0
token.c:3294:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 256
	Client charset: US-ASCII
	Client column_size: 128
token.c:1490:tds7_get_data_info: 
	colname = TYPE_NAME (9 bytes)
	type = 39 (varchar)
	server's type = 231 (x UCS-2 varchar)
	column_varint_size = 2
	column_size = 128 (256 on server)
token.c:1555:setting up column 1
token.c:1490:tds7_get_data_info: 
	colname = DATA_TYPE (9 bytes)
	type = 52 (smallint)
	server's type = 52 (smallint)
	column_varint_size = 0
	column_size = 2 (2 on server)
token.c:1555:setting up column 2
token.c:1490:tds7_get_data_info: 
	colname = PRECISION (9 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 4 (4 on server)
token.c:1555:setting up column 3
token.c:3294:adjust_character_column_size:
	Server charset: CP1252
	Server column_size: 32
	Client charset: US-ASCII
	Client column_size: 32
token.c:1490:tds7_get_data_info: 
	colname = LITERAL_PREFIX (14 bytes)
	type = 39 (varchar)
	server's type = 167 (xvarchar)
	column_varint_size = 2
	column_size = 32 (32 on server)
token.c:1555:setting up column 4
token.c:3294:adjust_character_column_size:
	Server charset: CP1252
	Server column_size: 32
	Client charset: US-ASCII
	Client column_size: 32
token.c:1490:tds7_get_data_info: 
	colname = LITERAL_SUFFIX (14 bytes)
	type = 39 (varchar)
	server's type = 167 (xvarchar)
	column_varint_size = 2
	column_size = 32 (32 on server)
token.c:1555:setting up column 5
token.c:3294:adjust_character_column_size:
	Server charset: CP1252
	Server column_size: 32
	Client charset: US-ASCII
	Client column_size: 32
token.c:1490:tds7_get_data_info: 
	colname = CREATE_PARAMS (13 bytes)
	type = 39 (varchar)
	server's type = 167 (xvarchar)
	column_varint_size = 2
	column_size = 32 (32 on server)
token.c:1555:setting up column 6
token.c:1490:tds7_get_data_info: 
	colname = NULLABLE (8 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 7
token.c:1490:tds7_get_data_info: 
	colname = CASE_SENSITIVE (14 bytes)
	type = 52 (smallint)
	server's type = 52 (smallint)
	column_varint_size = 0
	column_size = 2 (2 on server)
token.c:1555:setting up column 8
token.c:1490:tds7_get_data_info: 
	colname = SEARCHABLE (10 bytes)
	type = 52 (smallint)
	server's type = 52 (smallint)
	column_varint_size = 0
	column_size = 2 (2 on server)
token.c:1555:setting up column 9
token.c:1490:tds7_get_data_info: 
	colname = UNSIGNED_ATTRIBUTE (18 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 10
token.c:1490:tds7_get_data_info: 
	colname = MONEY (5 bytes)
	type = 52 (smallint)
	server's type = 52 (smallint)
	column_varint_size = 0
	column_size = 2 (2 on server)
token.c:1555:setting up column 11
token.c:1490:tds7_get_data_info: 
	colname = AUTO_INCREMENT (14 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 12
token.c:3294:adjust_character_column_size:
	Server charset: UCS-2LE
	Server column_size: 256
	Client charset: US-ASCII
	Client column_size: 128
token.c:1490:tds7_get_data_info: 
	colname = LOCAL_TYPE_NAME (15 bytes)
	type = 39 (varchar)
	server's type = 231 (x UCS-2 varchar)
	column_varint_size = 2
	column_size = 128 (256 on server)
token.c:1555:setting up column 13
token.c:1490:tds7_get_data_info: 
	colname = MINIMUM_SCALE (13 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 14
token.c:1490:tds7_get_data_info: 
	colname = MAXIMUM_SCALE (13 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 15
token.c:1490:tds7_get_data_info: 
	colname = SQL_DATA_TYPE (13 bytes)
	type = 52 (smallint)
	server's type = 52 (smallint)
	column_varint_size = 0
	column_size = 2 (2 on server)
token.c:1555:setting up column 16
token.c:1490:tds7_get_data_info: 
	colname = SQL_DATETIME_SUB (16 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 17
token.c:1490:tds7_get_data_info: 
	colname = NUM_PREC_RADIX (14 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 4 (4 on server)
token.c:1555:setting up column 18
token.c:1490:tds7_get_data_info: 
	colname = INTERVAL_PRECISION (18 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
token.c:1555:setting up column 19
token.c:1490:tds7_get_data_info: 
	colname = USERTYPE (8 bytes)
	type = 38 (integer-null)
	server's type = 38 (integer-null)
	column_varint_size = 1
	column_size = 2 (2 on server)
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4049, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4049
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4049
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8aec, 0xbfaf8ae8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  a9(ORDERBY)
token.c:108:tds_process_default_tokens() marker is a9(ORDERBY)
token.c:223:Eating ORDERBY token
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:621:tds_process_tokens::SET_RETURN stopping on current token
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4040
odbc.c:3653:SQLFetch(0x88bd578)
odbc.c:3396:_SQLFetch(0x88bd578, 1, 0)
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8b1c, 0xbfaf8b18, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2166:tds_process_row(): reading column 0 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 16 
token.c:2166:tds_process_row(): reading column 1 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 2 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4 
token.c:2166:tds_process_row(): reading column 3 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 1 
token.c:2166:tds_process_row(): reading column 4 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 1 
token.c:2166:tds_process_row(): reading column 5 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 6 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 7 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 8 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 9 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 10 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 11 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 12 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 16 
token.c:2166:tds_process_row(): reading column 13 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 14 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 15 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 16 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 17 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 18 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 19 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
odbc.c:4569:SQLGetData(0x88bd578, 3, 4, 0xbfaf8dc0, 4, (nil))
convert_tds2sql.c:62:convert_tds2sql: src is 56 dest = 4
odbc.c:3848:SQLFreeStmt(0x88bd578, 0)
odbc.c:3769:_SQLFreeStmt(0x88bd578, 0, 0)
query.c:1934:tds_send_cancel: not in_cancel and not idle
query.c:1943:tds_send_cancel: sending cancel packet
net.c:779:Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8bcc, (nil), 0x0)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2166:tds_process_row(): reading column 0 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 26 
token.c:2166:tds_process_row(): reading column 1 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 2 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4 
token.c:2166:tds_process_row(): reading column 3 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 1 
token.c:2166:tds_process_row(): reading column 4 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 1 
token.c:2166:tds_process_row(): reading column 5 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 6 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 7 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 8 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 9 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 10 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 11 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 12 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 26 
token.c:2166:tds_process_row(): reading column 13 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 14 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 15 
token.c:1915:tds_get_data: type 52, varint size 0
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 16 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:2166:tds_process_row(): reading column 17 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 18 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:2166:tds_process_row(): reading column 19 
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 2 
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2232:                rows_affected = 2
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:645:tds_process_tokens: return status is 0
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 2
net.c:592:Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 fd 20 00 fd 00 00 00 00-00                      |. ...... .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 1
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
odbc.c:1504:SQLAllocStmt(0x8909238, 0x8935918)
odbc.c:1403:_SQLAllocStmt(0x8909238, 0x8935918)
odbc.c:4079:SQLGetStmtAttr(0x88be5d0, 10010, 0xbfaf8dd8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88be5d0, 10010, 0xbfaf8dd8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88be5d0, 10011, 0xbfaf8dd8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88be5d0, 10011, 0xbfaf8dd8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88be5d0, 10012, 0xbfaf8dd8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88be5d0, 10012, 0xbfaf8dd8, 4, (nil))
odbc.c:4079:SQLGetStmtAttr(0x88be5d0, 10013, 0xbfaf8dd8, 4, (nil))
odbc.c:3917:_SQLGetStmtAttr(0x88be5d0, 10013, 0xbfaf8dd8, 4, (nil))
odbc.c:5587:SQLGetInfo(0x8909238, 18, 0xbfaf7edc, 4096, 0xbfaf7ed8)
odbc.c:4841:_SQLGetInfo(0x8909238, 18, 0xbfaf7edc, 4096, 0xbfaf7ed8
odbc.c:3848:SQLFreeStmt(0x88be5d0, 0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 0, 0)
odbc.c:3205:SQLExecDirect(0x88be5d0, 0xb76dd7dc, -3)
odbc.c:2965:_SQLExecute(0x88be5d0)
odbc.c:2970:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 25 bytes of "DROP FUNCTION fn_FuncTest"
write.c:164:tds_put_string wrote 50 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3a 00 00 01 00-44 00 52 00 4f 00 50 00 |...:.... D.R.O.P.|
0010 20 00 46 00 55 00 4e 00-43 00 54 00 49 00 4f 00 | .F.U.N. C.T.I.O.|
0020 4e 00 20 00 66 00 6e 00-5f 00 46 00 75 00 6e 00 |N. .f.n. _.F.u.n.|
0030 63 00 54 00 65 00 73 00-74 00                   |c.T.e.s. t.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 fd 00 00 df 00 00 00 00-00                      |........ .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3313:odbc_process_tokens: processed TDS_DONE_RESULT
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x26914)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3270:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:4256:_SQLRowCount(0x88be5d0, 0xbfaf8ed0)
odbc.c:4275:SQLRowCount returns 0, row count -1
odbc.c:4100:SQLNumResultCols(0x88be5d0, 0xbfaf8ede)
odbc.c:4388:SQLEndTran(2, 0x8909238, 0)
odbc.c:4366:_SQLTransact((nil), 0x8909238, 0)
odbc.c:4327:change_transaction(0x0x8909238,1)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 25 bytes of "IF @@TRANCOUNT > 0 COMMIT"
write.c:164:tds_put_string wrote 50 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3a 00 00 01 00-49 00 46 00 20 00 40 00 |...:.... I.F. .@.|
0010 40 00 54 00 52 00 41 00-4e 00 43 00 4f 00 55 00 |@.T.R.A. N.C.O.U.|
0020 4e 00 54 00 20 00 3e 00-20 00 30 00 20 00 43 00 |N.T. .>.  .0. .C.|
0030 4f 00 4d 00 4d 00 49 00-54 00                   |O.M.M.I. T.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 23 00 36 01 00-                        |...#.6..|

net.c:671:Received packet
0000 fd 01 00 c0 00 00 00 00-00 fd 01 00 d5 00 00 00 |........ ........|
0010 00 00 fd 00 00 ca 00 00-00 00 00                |........ ...|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:5587:SQLGetInfo(0x8909238, 23, 0xbfaf8db6, 8, 0xbfaf8db4)
odbc.c:4841:_SQLGetInfo(0x8909238, 23, 0xbfaf8db6, 8, 0xbfaf8db4
odbc.c:3848:SQLFreeStmt(0x88be5d0, 0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 0, 0)
odbc.c:3205:SQLExecDirect(0x88be5d0, 0xb77103b4, -3)
odbc.c:2965:_SQLExecute(0x88be5d0)
odbc.c:2970:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 194 bytes of "
    CREATE FUNCTION fn_FuncTest (@testparam varchar(4)) 
    RETURNS @retTest TABLE (param varchar(4))
    AS 
    BEGIN
        INSERT @retTest
        SELECT @testparam
        RETURN
    END"
write.c:136:tds_put_string converting 66 bytes of "  INSERT @retTest
        SELECT @testparam
        RETURN
    END"
write.c:164:tds_put_string wrote 388 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 01 8c 00 00 01 00-0a 00 20 00 20 00 20 00 |........ .. . . .|
0010 20 00 43 00 52 00 45 00-41 00 54 00 45 00 20 00 | .C.R.E. A.T.E. .|
0020 46 00 55 00 4e 00 43 00-54 00 49 00 4f 00 4e 00 |F.U.N.C. T.I.O.N.|
0030 20 00 66 00 6e 00 5f 00-46 00 75 00 6e 00 63 00 | .f.n._. F.u.n.c.|
0040 54 00 65 00 73 00 74 00-20 00 28 00 40 00 74 00 |T.e.s.t.  .(.@.t.|
0050 65 00 73 00 74 00 70 00-61 00 72 00 61 00 6d 00 |e.s.t.p. a.r.a.m.|
0060 20 00 76 00 61 00 72 00-63 00 68 00 61 00 72 00 | .v.a.r. c.h.a.r.|
0070 28 00 34 00 29 00 29 00-20 00 0a 00 20 00 20 00 |(.4.).).  ... . .|
0080 20 00 20 00 52 00 45 00-54 00 55 00 52 00 4e 00 | . .R.E. T.U.R.N.|
0090 53 00 20 00 40 00 72 00-65 00 74 00 54 00 65 00 |S. .@.r. e.t.T.e.|
00a0 73 00 74 00 20 00 54 00-41 00 42 00 4c 00 45 00 |s.t. .T. A.B.L.E.|
00b0 20 00 28 00 70 00 61 00-72 00 61 00 6d 00 20 00 | .(.p.a. r.a.m. .|
00c0 76 00 61 00 72 00 63 00-68 00 61 00 72 00 28 00 |v.a.r.c. h.a.r.(.|
00d0 34 00 29 00 29 00 0a 00-20 00 20 00 20 00 20 00 |4.).)...  . . . .|
00e0 41 00 53 00 20 00 0a 00-20 00 20 00 20 00 20 00 |A.S. ...  . . . .|
00f0 42 00 45 00 47 00 49 00-4e 00 0a 00 20 00 20 00 |B.E.G.I. N... . .|
0100 20 00 20 00 20 00 20 00-20 00 20 00 49 00 4e 00 | . . . .  . .I.N.|
0110 53 00 45 00 52 00 54 00-20 00 40 00 72 00 65 00 |S.E.R.T.  .@.r.e.|
0120 74 00 54 00 65 00 73 00-74 00 0a 00 20 00 20 00 |t.T.e.s. t... . .|
0130 20 00 20 00 20 00 20 00-20 00 20 00 53 00 45 00 | . . . .  . .S.E.|
0140 4c 00 45 00 43 00 54 00-20 00 40 00 74 00 65 00 |L.E.C.T.  .@.t.e.|
0150 73 00 74 00 70 00 61 00-72 00 61 00 6d 00 0a 00 |s.t.p.a. r.a.m...|
0160 20 00 20 00 20 00 20 00-20 00 20 00 20 00 20 00 | . . . .  . . . .|
0170 52 00 45 00 54 00 55 00-52 00 4e 00 0a 00 20 00 |R.E.T.U. R.N... .|
0180 20 00 20 00 20 00 45 00-4e 00 44 00             | . . .E. N.D.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 fd 00 00 de 00 00 00 00-00                      |........ .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3313:odbc_process_tokens: processed TDS_DONE_RESULT
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x26914)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3270:    result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:4256:_SQLRowCount(0x88be5d0, 0xbfaf8ed0)
odbc.c:4275:SQLRowCount returns 0, row count -1
odbc.c:4100:SQLNumResultCols(0x88be5d0, 0xbfaf8ede)
odbc.c:4388:SQLEndTran(2, 0x8909238, 0)
odbc.c:4366:_SQLTransact((nil), 0x8909238, 0)
odbc.c:4327:change_transaction(0x0x8909238,1)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 25 bytes of "IF @@TRANCOUNT > 0 COMMIT"
write.c:164:tds_put_string wrote 50 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3a 00 00 01 00-49 00 46 00 20 00 40 00 |...:.... I.F. .@.|
0010 40 00 54 00 52 00 41 00-4e 00 43 00 4f 00 55 00 |@.T.R.A. N.C.O.U.|
0020 4e 00 54 00 20 00 3e 00-20 00 30 00 20 00 43 00 |N.T. .>.  .0. .C.|
0030 4f 00 4d 00 4d 00 49 00-54 00                   |O.M.M.I. T.|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 23 00 36 01 00-                        |...#.6..|

net.c:671:Received packet
0000 fd 01 00 c0 00 00 00 00-00 fd 01 00 d5 00 00 00 |........ ........|
0010 00 00 fd 00 00 ca 00 00-00 00 00                |........ ...|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 1
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cec, 0xbfaf8ce8, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:5587:SQLGetInfo(0x8909238, 23, 0xbfaf8db6, 8, 0xbfaf8db4)
odbc.c:4841:_SQLGetInfo(0x8909238, 23, 0xbfaf8db6, 8, 0xbfaf8db4
odbc.c:3848:SQLFreeStmt(0x88be5d0, 0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 0, 0)
odbc.c:3205:SQLExecDirect(0x88be5d0, 0xb76c8bb4, -3)
odbc.c:2965:_SQLExecute(0x88be5d0)
odbc.c:2970:_SQLExecute() starting with state 0
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 33 bytes of "SELECT * FROM fn_FuncTest('test')"
write.c:164:tds_put_string wrote 66 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 4a 00 00 01 00-53 00 45 00 4c 00 45 00 |...J.... S.E.L.E.|
0010 43 00 54 00 20 00 2a 00-20 00 46 00 52 00 4f 00 |C.T. .*.  .F.R.O.|
0020 4d 00 20 00 66 00 6e 00-5f 00 46 00 75 00 6e 00 |M. .f.n. _.F.u.n.|
0030 63 00 54 00 65 00 73 00-74 00 28 00 27 00 74 00 |c.T.e.s. t.(.'.t.|
0040 65 00 73 00 74 00 27 00-29 00                   |e.s.t.'. ).|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x6914)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 32 00 36 01 00-                        |...2.6..|

net.c:671:Received packet
0000 81 01 00 00 00 09 00 a7-04 00 09 04 d0 00 00 05 |........ ........|
0010 70 00 61 00 72 00 61 00-6d 00 d1 04 00 74 65 73 |p.a.r.a. m....tes|
0020 74 fd 10 00 c1 00 01 00-00 00                   |t....... ..|

token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1520:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1544:set current_results (1 column) to tds->res_info
token.c:1555:setting up column 0
token.c:3294:adjust_character_column_size:
	Server charset: CP1252
	Server column_size: 4
	Client charset: US-ASCII
	Client column_size: 4
token.c:1490:tds7_get_data_info: 
	colname = param (5 bytes)
	type = 39 (varchar)
	server's type = 167 (xvarchar)
	column_varint_size = 2
	column_size = 4 (4 on server)
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4049, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4049
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4049
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8ccc, 0xbfaf8cc8, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:621:tds_process_tokens::SET_RETURN stopping on current token
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4040, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
odbc.c:3119:_SQLExecute: odbc_process_tokens returned result_type 4040
odbc.c:4256:_SQLRowCount(0x88be5d0, 0xbfaf8ed0)
odbc.c:4275:SQLRowCount returns 0, row count -1
odbc.c:4100:SQLNumResultCols(0x88be5d0, 0xbfaf8ede)
odbc.c:1702:SQLDescribeCol(0x88be5d0, 1, 0xbfaf8d74, 200, 0xbfaf8d72, 0xbfaf8d70, 0xbfaf8d68, 0xbfaf8d6e, 0xbfaf8d6c)
odbc.c:1702:SQLDescribeCol(0x88be5d0, 1, 0xbfaf8d50, 300, (nil), 0xbfaf8d4e, 0xbfaf8d44, 0xbfaf8d4c, 0xbfaf8d4a)
odbc.c:3653:SQLFetch(0x88be5d0)
odbc.c:3396:_SQLFetch(0x88be5d0, 1, 0)
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8c2c, 0xbfaf8c28, 0x6508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2166:tds_process_row(): reading column 0 
token.c:1915:tds_get_data: type 39, varint size 2
token.c:1975:tds_get_data(): wire column size is 4 
util.c:162:Changed query state from READING to PENDING
odbc.c:3269:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3270:    result_type=4040, TDS_DONE_COUNT=10, TDS_DONE_ERROR=0
odbc.c:3340:odbc_process_tokens: returning result_type 4040
odbc.c:4569:SQLGetData(0x88be5d0, 1, 1, 0xbfaf89fc, 1024, 0xbfaf89f8)
convert_tds2sql.c:62:convert_tds2sql: src is 39 dest = 1
convert_tds2sql.c:131:convert_tds2sql: outputting character data destlen = 1024 
odbc.c:3848:SQLFreeStmt(0x88be5d0, 0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 0, 0)
query.c:1934:tds_send_cancel: not in_cancel and not idle
query.c:1943:tds_send_cancel: sending cancel packet
net.c:779:Sending packet
0000 06 01 00 08 00 00 01 00-                        |........|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8cac, (nil), 0x0)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 1
token.c:2232:                rows_affected = 1
net.c:592:Received header
0000 04 01 00 11 00 36 01 00-                        |.....6..|

net.c:671:Received packet
0000 fd 20 00 fd 00 00 00 00-00                      |. ...... .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 1
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
odbc.c:4124:SQLPrepare(0x88be5d0, SELECT * FROM fn_FuncTest(?), -3)
odbc.c:4188:Creating prepared statement
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 3 bytes of "@P1"
write.c:164:tds_put_string wrote 6 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 03 01 00 96 00 00 01 00-ff ff 0b 00 00 00 00 01 |........ ........|
0010 26 04 00 00 00 63 1e 00-00 00 09 04 d0 00 00 1e |&....c.. ........|
0020 00 00 00 40 00 50 00 31-00 20 00 76 00 61 00 72 |...@.P.1 . .v.a.r|
0030 00 63 00 68 00 61 00 72-00 28 00 38 00 30 00 29 |.c.h.a.r .(.8.0.)|
0040 00 00 00 63 3c 00 00 00-09 04 d0 00 00 3c 00 00 |...c<... .....<..|
0050 00 53 00 45 00 4c 00 45-00 43 00 54 00 20 00 2a |.S.E.L.E .C.T. .*|
0060 00 20 00 46 00 52 00 4f-00 4d 00 20 00 66 00 6e |. .F.R.O .M. .f.n|
0070 00 5f 00 46 00 75 00 6e-00 63 00 54 00 65 00 73 |._.F.u.n .c.T.e.s|
0080 00 74 00 28 00 40 00 50-00 31 00 29 00 00 00 26 |.t.(.@.P .1.)...&|
0090 04 04 01 00 00 00      -                        |......|

token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8c9c, 0xbfaf8c98, 0x104)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 01 5a 00 36 01 00-                        |...Z.6..|

net.c:671:Received packet
0000 aa 3a 01 00 00 00 00 00-13 8c 00 53 00 71 00 6c |.:...... ...S.q.l|
0010 00 44 00 75 00 6d 00 70-00 45 00 78 00 63 00 65 |.D.u.m.p .E.x.c.e|
0020 00 70 00 74 00 69 00 6f-00 6e 00 48 00 61 00 6e |.p.t.i.o .n.H.a.n|
0030 00 64 00 6c 00 65 00 72-00 3a 00 20 00 50 00 72 |.d.l.e.r .:. .P.r|
0040 00 6f 00 63 00 65 00 73-00 73 00 20 00 35 00 34 |.o.c.e.s .s. .5.4|
0050 00 20 00 67 00 65 00 6e-00 65 00 72 00 61 00 74 |. .g.e.n .e.r.a.t|
0060 00 65 00 64 00 20 00 66-00 61 00 74 00 61 00 6c |.e.d. .f .a.t.a.l|
0070 00 20 00 65 00 78 00 63-00 65 00 70 00 74 00 69 |. .e.x.c .e.p.t.i|
0080 00 6f 00 6e 00 20 00 63-00 30 00 30 00 30 00 30 |.o.n. .c .0.0.0.0|
0090 00 30 00 30 00 35 00 20-00 45 00 58 00 43 00 45 |.0.0.5.  .E.X.C.E|
00a0 00 50 00 54 00 49 00 4f-00 4e 00 5f 00 41 00 43 |.P.T.I.O .N._.A.C|
00b0 00 43 00 45 00 53 00 53-00 5f 00 56 00 49 00 4f |.C.E.S.S ._.V.I.O|
00c0 00 4c 00 41 00 54 00 49-00 4f 00 4e 00 2e 00 20 |.L.A.T.I .O.N... |
00d0 00 53 00 51 00 4c 00 20-00 53 00 65 00 72 00 76 |.S.Q.L.  .S.e.r.v|
00e0 00 65 00 72 00 20 00 69-00 73 00 20 00 74 00 65 |.e.r. .i .s. .t.e|
00f0 00 72 00 6d 00 69 00 6e-00 61 00 74 00 69 00 6e |.r.m.i.n .a.t.i.n|
0100 00 67 00 20 00 74 00 68-00 69 00 73 00 20 00 70 |.g. .t.h .i.s. .p|
0110 00 72 00 6f 00 63 00 65-00 73 00 73 00 2e 00 0d |.r.o.c.e .s.s....|
0120 00 0a 00 0b 4d 00 47 00-37 00 36 00 38 00 34 00 |....M.G. 7.6.8.4.|
0130 4e 00 54 00 30 00 30 00-35 00 00 01 00 ac 09 00 |N.T.0.0. 5.......|
0140 00 01 38 00 00 00 26 04-00 fe 00 00 e0 00 00 00 |..8...&. ........|
0150 00 00                  -                        |..|

token.c:510:processing result tokens.  marker is  aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 0 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:510:processing result tokens.  marker is  ac(PARAM)
token.c:567:processing parameters for sp 11
token.c:569:calling tds_process_param_result
token.c:1198:tds_process_param_result(0x88b2ab0, 0xbfaf8c08)
token.c:1596:processing result. type = 38(integer-null), varint_size 1
token.c:1617:processing result. column_size 4
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is -1 
token.c:573:1 hidden return parameters
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x88b2ab0, 0xbfaf8c9c, 0xbfaf8c98, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
error.c:609:SQLGetDiagRec(3, 0x88be5d0, 1, 0xbfaf882a, 0xbfaf8838, 0xbfaf8a5c, 512, 0xbfaf8834)
error.c:510:_SQLGetDiagRec(3, 0x88be5d0, 1, 0xbfaf882a, 0xbfaf8838, 0xbfaf8a5c, 512, 0xbfaf8834)
error.c:609:SQLGetDiagRec(3, 0x88be5d0, 2, 0xbfaf882a, 0xbfaf8838, 0xbfaf8a5c, 512, 0xbfaf8834)
error.c:510:_SQLGetDiagRec(3, 0x88be5d0, 2, 0xbfaf882a, 0xbfaf8838, 0xbfaf8a5c, 512, 0xbfaf8834)
error.c:609:SQLGetDiagRec(3, 0x88be5d0, 1, 0xbfaf89a8, 0xbfaf89b4, 0xbfaf89bc, 1023, 0xbfaf89ba)
error.c:510:_SQLGetDiagRec(3, 0x88be5d0, 1, 0xbfaf89a8, 0xbfaf89b4, 0xbfaf89bc, 1023, 0xbfaf89ba)
odbc.c:3848:SQLFreeStmt(0x88be5d0, 0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 0, 0)
odbc.c:3680:SQLFreeHandle(3, 0x0x88be5d0)
odbc.c:3769:_SQLFreeStmt(0x88be5d0, 1, 0)
odbc.c:4388:SQLEndTran(2, 0x8909238, 1)
odbc.c:4366:_SQLTransact((nil), 0x8909238, 1)
odbc.c:4327:change_transaction(0x0x8909238,0)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
write.c:136:tds_put_string converting 27 bytes of "IF @@TRANCOUNT > 0 ROLLBACK"
write.c:164:tds_put_string wrote 54 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 01 01 00 3e 00 00 01 00-49 00 46 00 20 00 40 00 |...>.... I.F. .@.|
0010 40 00 54 00 52 00 41 00-4e 00 43 00 4f 00 55 00 |@.T.R.A. N.C.O.U.|
0020 4e 00 54 00 20 00 3e 00-20 00 30 00 20 00 52 00 |N.T. .>.  .0. .R.|
0030 4f 00 4c 00 4c 00 42 00-41 00 43 00 4b 00       |O.L.L.B. A.C.K.|

util.c:334:tdserror(0x890a400, 0x88b2ab0, 20006, 104)
odbc.c:2032:msgno 20006 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from PENDING to DEAD
error.c:609:SQLGetDiagRec(2, 0x8909238, 1, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
error.c:510:_SQLGetDiagRec(2, 0x8909238, 1, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
error.c:609:SQLGetDiagRec(2, 0x8909238, 2, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
error.c:510:_SQLGetDiagRec(2, 0x8909238, 2, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
error.c:609:SQLGetDiagRec(2, 0x8909238, 3, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
error.c:510:_SQLGetDiagRec(2, 0x8909238, 3, 0xbfaf89fa, 0xbfaf8a08, 0xbfaf8c2c, 512, 0xbfaf8a04)
odbc.c:2005:SQLDisconnect(0x8909238)
odbc.c:3769:_SQLFreeStmt(0x88bd578, 1, 1)
mem.c:563:tds_free_all_results()
odbc.c:3680:SQLFreeHandle(2, 0x0x8909238)
odbc.c:3706:_SQLFreeConnect(0x8909238)
odbc.c:3680:SQLFreeHandle(1, 0x0x8845fb0)
odbc.c:3744:_SQLFreeEnv(0x8845fb0)


  • [freetds] error: native binds to function params on sql server, Clovis Fabricio, 06/29/2010

Archive powered by MHonArc 2.6.24.

Top of Page