Bobspadger / pyodbc

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

pyodbc + FreeTDS + SQL Server: null nvarchar causes memory error #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to an SQL Server DB using the FreeTDS ODBC driver. The DB should 
contain a table which has a column of type nvarchar and a row for which that 
column is null
2. c.execute("select top 1 <col> from <tbl> where <col> is null"), where <col> 
is the nvarchar column and <tbl> is the table that contains it.
3. c.fetchone()

What is the expected output? What do you see instead?

The expected output is (None,). Instead, I get a MemoryError (and occasionally, 
a bus error).

What version of the product are you using? On what operating system?

pyodbc 2.1.8

Please provide any additional information below.

FreeTDS CVS checkout from 11/16/2010
MacOS X 10.6.4
Python 2.6
iODBC driver manager
SQL Server 2008 RTM

Original issue reported on code.google.com by s...@mitre.org on 17 Nov 2010 at 4:20

GoogleCodeExporter commented 9 years ago
Oops, this is a duplicate of issue 97. My apologies. I'll update that issue 
instead.

Original comment by s...@mitre.org on 17 Nov 2010 at 4:30

GoogleCodeExporter commented 9 years ago
As noted, this is a duplicate of issue 97 (though I haven't checked that).

Original comment by mkleehammer on 19 Nov 2010 at 9:38