This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年02月11日 20:16 by mattheww, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg153136 - (view) | Author: Matthew Woodcraft (mattheww) | Date: 2012年02月11日 20:16 | |
The documentation for the sqlite3 module contains the following statement, under 'Cursor.rowcount': For DELETE statements, SQLite reports rowcount as 0 if you make a DELETE FROM table without any condition. This doesn't happen for me (with sqlite 3.7.9): rowcount returns the correct value in this case. According to http://www.sqlite.org/lang_delete.html#truncateopt , this was a bug that was fixed in SQLite 3.6.5 (in 2008). So I think the Python documentation should either omit this paragraph, or else explain that it only applies to older versions of SQLite. Also, the first example under 'Using shortcut methods' has code to work around this bug, which should perhaps be removed. |
|||
| msg153497 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月16日 19:47 | |
New changeset 74b2da95c6be by Petri Lehtinen in branch '3.2': sqlite3: Fix documentation errors concerning Cursor.rowcount http://hg.python.org/cpython/rev/74b2da95c6be New changeset a1f17e108a1b by Petri Lehtinen in branch '2.7': Fix errors in sqlite3's Cursor.rowcount documentation http://hg.python.org/cpython/rev/a1f17e108a1b New changeset 08699214f79b by Petri Lehtinen in branch 'default': Merge branch '3.2' http://hg.python.org/cpython/rev/08699214f79b |
|||
| msg153498 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2012年02月16日 19:48 | |
Fixed, thanks! |
|||
| msg153565 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月17日 16:34 | |
> With SQLite versions before 3.6.5, :attr:`rowcount` is set to 0 if > you make a ``DELETE FROM table`` without any condition. Is there a fixed version of SQLite used by each Python version? If yes, then I think it could be more useful to talk about the Python version in that paragraph. |
|||
| msg153591 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2012年02月17日 19:12 | |
Éric Araujo wrote: > Is there a fixed version of SQLite used by each Python version? If > yes, then I think it could be more useful to talk about the Python > version in that paragraph. No. In each Python version, setup.py only checks that SQLite is 3.0.8 or newer. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:26 | admin | set | github: 58203 |
| 2012年02月17日 19:12:29 | petri.lehtinen | set | messages: + msg153591 |
| 2012年02月17日 16:34:17 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg153565 |
| 2012年02月16日 19:48:05 | petri.lehtinen | set | nosy:
+ petri.lehtinen messages: + msg153498 versions: + Python 2.7, Python 3.2, Python 3.3 |
| 2012年02月16日 19:47:31 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg153497 resolution: fixed stage: resolved |
| 2012年02月11日 20:16:14 | mattheww | create | |