v0.95.67 Corrupt Packets After - Error converting characters into server's character set.

Ken Collins <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
One more final error when testing the Ruby C-extensions to FreeTDS. 
We have a test that tests usage of the client after inserting invalid characters.

	INSERT INTO [datatypes] ([nvarchar_50]) VALUES ('Test ✓')

After handling the message, the followup `SELECT 1 AS [one]` test query returns:

	Incorrect syntax near '3'

When examine the TDSDUMP file, it seems there is some garbage in the packets. Thoughts?

dblib.c:1338:dbcmd(0x7fca058a4f60, INSERT INTO [datatypes] ([nvarchar_50]) VALUES ('Test ✓'))
dblib.c:1344:dbcmd() bufsz = 56
dblib.c:5845:dbfreebuf(0x7fca058a4f60)
dblib.c:6817:dbsqlsend(0x7fca058a4f60)
mem.c:648:tds_free_all_results()
util.c:165:Changed query state from IDLE to WRITING
util.c:322:tdserror(0x7fca046f4a80, 0x7fca044b0240, 2402, 0)
dblib.c:7897:dbperror(0x7fca058a4f60, 2402, 0)
dblib.c:7965:dbperror: Calling dblib_err_handler with msgno = 2402; msg->msgtext = "Error converting characters into server's character set. Some character(s) could not be converted"
dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:5845:dbfreebuf(0x7fca058a4f60)
dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:1338:dbcmd(0x7fca058a4f60, SELECT 1 AS [one])
dblib.c:1344:dbcmd() bufsz = 0
dblib.c:6817:dbsqlsend(0x7fca058a4f60)
util.c:165:Changed query state from WRITING to PENDING
packet.c:740:Sending packet
0000 01 01 00 56 00 00 01 00-16 00 00 00 12 00 00 00 |...V.... ........|
0010 02 00 01 00 00 00 33 00-00 00 01 00 00 00 16 00 |......3. ........|
0020 00 00 12 00 00 00 02 00-01 00 00 00 33 00 00 00 |........ ....3...|
0030 01 00 00 00 53 00 45 00-4c 00 45 00 43 00 54 00 |....S.E. L.E.C.T.|
0040 20 00 31 00 20 00 41 00-53 00 20 00 5b 00 6f 00 | .1. .A. S. .[.o.|
0050 6e 00 65 00 5d 00      -                        |n.e.].|

dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:5743:dbgetuserdata(0x7fca058a4f60)
dblib.c:4625:dbsqlok(0x7fca058a4f60)
dblib.c:4654:dbsqlok() not done, calling tds_process_tokens()
token.c:549:tds_process_tokens(0x7fca044b0240, 0x7fff5b414fd4, 0x7fff5b414fd0, 0x6914)
util.c:165:Changed query state from PENDING to READING
packet.c:639:Received packet
0000 04 01 00 66 00 33 01 00-aa 4e 00 66 00 00 00 01 |...f.3.. ªN.f....|
0010 0f 1a 00 49 00 6e 00 63-00 6f 00 72 00 72 00 65 |...I.n.c .o.r.r.e|
0020 00 63 00 74 00 20 00 73-00 79 00 6e 00 74 00 61 |.c.t. .s .y.n.t.a|
0030 00 78 00 20 00 6e 00 65-00 61 00 72 00 20 00 27 |.x. .n.e .a.r. .'|
0040 00 33 00 27 00 2e 00 06-53 00 53 00 32 00 30 00 |.3.'.... S.S.2.0.|
0050 31 00 34 00 00 01 00 00-00 fd 02 00 fd 00 00 00 |1.4..... .ý..ý...|
0060 00 00 00 00 00 00      -                        |......|

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.