MySQLdb - Query/fetch don't return result when it *theorically* should

Mark Hertel mnh at cogitation.org
Thu Jan 26 11:05:54 EST 2006


On Wed, 18 Jan 2006 18:31:39 -0500, Bernard Lebel <3dbernard at gmail.com> wrote:
> I'm absolutely flabbergasted.
>
> Your suggestion worked, the loop now picks up the changed values, and
> without the need to reconnect.
>
> It's the first time I have to commit after a query, up until I wrote
> this program, I used commit() was for UPDATE/INSERT types of commands
> only, and always got proper fetch results.
>


I found a similar problem occurred when I upgrade MySQL to some of the
4.1.x versions and the newest 5.x. The default table type now seems to
be InnoDB which activates transactions, so now the autocommit has to be
turned on in mysqldb or explicit commit's have to be placed into the
code.



--Mark



More information about the Python-list mailing list