My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 121: update with large parameter + no rows updated = error
1 person starred this issue and may be notified of changes. Back to list
Status:  Complete
Owner:  ----
Closed:  Nov 2010


 
Reported by lukedell...@gmail.com, Sep 19, 2010
What steps will reproduce the problem?
1. Apply first attached patch to pyodbc source code to add a test case
2. C:\Python26\python tests\sqlservertests.py "DRIVER={SQL Server Native Client 10.0};SERVER=localhost;DATABASE=mydatabase;TRUSTED_CONNECTION=yes}"

What is the expected output?
All test cases passed.

What do you see instead?
python:  2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
pyodbc:  2.1.8 C:\cygwin\home\myusername\build\pyodbc\build\lib.win32-2.6\pyodbc.pyd
odbc:    03.80.0000
driver:  sqlncli10.dll 10.50.1600
         supports ODBC version 03.52
os:      Windows
unicode: Py_Unicode=2 SQLWCHAR=2
        post2008Server 6.1.7600 Multiprocessor Free
======================================================================
ERROR: test_large_update_nodata (__main__.SqlServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/sqlservertests.py", line 305, in test_large_update_nodata
    self.cursor.execute('update t1 set a=? where 1=0', (hundredkb,))
Error: ('HY000', 'The driver did not supply an error!')

----------------------------------------------------------------------
Ran 162 tests in 1.316s

FAILED (errors=1)

What version of the product are you using? On what operating system?
pyodbc 2.1.8 (or today's git trunk) with Python 2.6/32-bit on Windows 7, Microsoft SQL Server 2008 R2

Please provide any additional information below.
Attached is a patch which fixes this problem for me.
test_large_update_nodata.patch
575 bytes   View   Download
Sep 19, 2010
#1 lukedell...@gmail.com
Oops the fix_large_update_nodata.patch has the actual fix commented out so that I could reproduce the test failure for this report!

Attaching the corrected patch now.

fix_large_update_nodata_v2.patch
587 bytes   View   Download
Nov 21, 2010
Project Member #2 mkleehammer
Thanks for the unit tests and the patch!  That's always nice.

Applied in 2.1.9-beta04


Status: Complete

Powered by Google Project Hosting