google-code-export / ibm-db

Automatically exported from code.google.com/p/ibm-db
1 stars 0 forks source link

cursor.description incorrect value upon consecutive calls for INSERT/DELETE #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Execute an INSERT (or DELETE, UPDATE too possibly) statement and get the 
cursor.description property twice, first time the value will be correct (None), 
second time will return an empty list

>>> cursor.execute("DELETE FROM t1 WHERE t1.ID=11 LIMIT 1")
True
>>> print cursor.description
None
>>> print cursor.description
[]

Expected result:
>>> print cursor.description
None
>>> print cursor.description
None

Relevant lines on trace files

[12/12/2011 12:44:58.291549] SQLExecute( pszSqlStr="DELETE FROM t1 WHERE 
ID=28275719 LIMIT 1" )
[12/12/2011 12:44:58.291865]     ---> Time elapsed - +1.230134E+001 seconds

[12/12/2011 12:44:58.313935] SQLExecute( )
[12/12/2011 12:44:58.314287]     <--- SQL_SUCCESS   Time elapsed - 
+2.273800E-002 seconds

ibm module compiled for Linux X86_64
ibm_db-1.0.5-py2.7-linux-x86_64.egg

Original issue reported on code.google.com by south.mi...@gmail.com on 12 Dec 2011 at 8:47

GoogleCodeExporter commented 9 years ago
Thanks for reporting above bug.
If this one is a blocking issue for you then we will give you a patch for this 
issue otherwise we will keep a not and release it in next release of the the 
driver.

====
>>> cursor.execute("DELETE FROM t1 WHERE t1.ID=11 LIMIT 1")
True
====
Did you sets DB2_COMPATIBILITY_VECTOR to MYS, without this the above sql is not 
compatible with DB2.

Original comment by rahul.pr...@in.ibm.com on 13 Dec 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Welcome! :)

Not a blocking issue right now. BTW: when do you plan to release next
version?

Yes, I have that set.

Original comment by south.mi...@gmail.com on 13 Dec 2011 at 12:58

GoogleCodeExporter commented 9 years ago
currently we can't commit anything but it would be last week of January. 
we will notify you the release through this thread.

Original comment by rahul.pr...@in.ibm.com on 14 Dec 2011 at 8:28

GoogleCodeExporter commented 9 years ago
Great, thanks.

Original comment by south.mi...@gmail.com on 14 Dec 2011 at 10:36

GoogleCodeExporter commented 9 years ago
Fixed and released with ibm_db-1.0.6

Original comment by rahul.pr...@in.ibm.com on 25 May 2012 at 6:47