No data returned from MSSQL server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pymssql (Debian) |
Fix Released
|
Unknown
|
|||
pymssql (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Won't Fix
|
High
|
Unassigned | ||
Trusty |
Confirmed
|
High
|
Unassigned | ||
Wily |
Confirmed
|
High
|
Unassigned | ||
Xenial |
Confirmed
|
High
|
Unassigned | ||
Yakkety |
Confirmed
|
High
|
Unassigned | ||
Zesty |
Confirmed
|
High
|
Unassigned | ||
Artful |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
* Due to an issue with PyMSSQL 1.0.x and the version of FreeTDX in the repositories, PyMSSQL no longer returns any information from MSSQL database queries. This means you cannot use fetchone() or fetchall() or similar methods to get data back from a database query.
[Test Case]
* Install python-pymssql to Ubuntu.
* Inside a 'python' console on the Ubuntu server, use the following python code, replacing values accordingly for your MSSQL servers. The "print" function will return 'None' in the current code base. When fixed, you will get either one value, or a tuple, depending on the results (but you will NOT get 'None'):
import pymssql
dbconn = pymssql.
dbcur = dbconn.cursor()
dbcur.execute(
dbrs = dbcur.fetchone()
dbcur.close()
print dbrs
[Regression Potential]
* The patch in the debdiffs is from pymssql upstream. We are on a very old pymssql, but this patch was designed to fix the issue.
[Other Info]
* Test builds in https:/
[Original Description]
this works great in oneiric, but in precise it silently returns empty results from SQL server. The upstream project has relocated and provided a new release, I downloaded and built it and the same code I had started returning results.
http://
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-pymssql 1.0.2+dfsg-1build1
ProcVersionSign
Uname: Linux 3.2.0-9-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Thu Jan 19 20:24:31 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
SourcePackage: pymssql
UpgradeStatus: Upgraded to precise on 2012-01-16 (2 days ago)
Changed in pymssql (Debian): | |
status: | Unknown → New |
Changed in pymssql (Ubuntu): | |
importance: | Undecided → High |
description: | updated |
tags: | added: trusty wily xenial yakkety |
Changed in pymssql (Debian): | |
status: | New → Confirmed |
Changed in pymssql (Debian): | |
status: | Confirmed → Fix Released |
Changed in pymssql (Ubuntu Artful): | |
status: | Confirmed → Fix Released |
trivial python to show the problem
#!/usr/bin/env python connect( server= 'server' ,user=' test',password= 'password' ,database= 'test') query(" SELECT COLUMN_NAME FROM INFORMATION_ SCHEMA. COLUMNS" )
import _mssql
conn=_mssql.
conn.execute_
for row in conn:
print row
if it is working it should return a bunch of data about columns, in precise it just returns nothing.