Open
Description
What steps will reproduce the problem?
1. Use pyodbc to access a SQL Server database which has a table <tbl> which
contains a column <col> which has the xml datatype.
2. c.execute("select top 1 <col> from <tbl> where <col> is not null")
3. c.fetchall()
What is the expected output? What do you see instead?
I expect to see the contents of the field. Instead, I get a bus error.
What version of the product are you using? On what operating system?
pyodbc 2.1.8
MacOS X 10.6.4
Python 2.6
Please provide any additional information below.
FreeTDS CVS checkout from 11/16/2010
iODBC driver manager
SQL Server 2008 RTM
gdb tells me that the bus error is
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
0x0038fabf in GetDataString (cur=0x7028e0, iCol=<value temporarily unavailable,
due to optimizations>) at pyodbc-2.1.8/src/getdata.cpp:194
194 if (PyString_CheckExact(bufferOwner))
I suspect that this is related to issue 97. My value for sys.maxunicode:
65535
For what it's worth, the minimum datalength in the table I'm accessing is 1826.
Original issue reported on code.google.com by s...@mitre.org
on 17 Nov 2010 at 8:08