GoogleCodeArchives / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

SQL Server XML data fields over a certain length produce MemoryError #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create table in SQL Server (testing on 2008 R2) with an XML data type of 
length unlimited
2. Populate field with a large amount (512K-ish?) worth of data
3. Establish a connection to the database and attempt to .fetchone() one of the 
records from that table. 

What is the expected output? What do you see instead?
I expect to see the XML output. Instead I get:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

What version of the product are you using? On what operating system?
Python 2.7.2 (32 bit) with Pyodbc 3.0.2 on Server 2008 R2 SQL Server 2008 R2.  

Please provide any additional information below.

Original issue reported on code.google.com by randall....@gmail.com on 17 Feb 2012 at 10:19

GoogleCodeExporter commented 9 years ago
I still haven't been able to narrow down exactly how big the XML has to be to 
trigger the issue. I have re-tested on 64bit and I don't get a MemoryError, 
instead I get an APPCRASH. Willing to test or provide any additional 
information needed. 

Original comment by randall....@gmail.com on 19 Feb 2012 at 10:23

GoogleCodeExporter commented 9 years ago
Good catch.  Fixed in 3.0.6-beta07

I've added XML unit tests to the SQL Server file.

Original comment by mkleehammer on 23 Jun 2012 at 11:05