#12612: SQLite3 executemany() method catches too much exceptions
------------------------------------------+---------------------------------
 Reporter:  Niels <[email protected]>  |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2-alpha 
 Keywords:  sqlite,sqlite3                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 In SQLiteCursorWrapper.executemany()
 
(http://code.djangoproject.com/browser/django/trunk/django/db/backends/sqlite3/base.py#L191)
 convert_query (line 199) is called, but if you have an extra (accidental)
 %s in your query the
 replacement of '%s' by ? will raise an exception (TypeError: not enough
 arguments for format string) which is then
 caught and ignored by except(IndexError,TypeError) at line 195.

 None will be returned and whoever is calling executemany will be left
 wondering why nothing happened. This bug basically causes bad input to be
 ignored instead of raising an exception.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12612>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.


Reply via email to