commit

Bug #500491 reported by diwayou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
Fix Released
Low
Geert JM Vanderkelen

Bug Description

I'm working at windows python 3.1, when i do the 'insert', nothing affect the database, afterall i found i must add the 'db.commit()' line to the source, but i notice the example file "inserts.py" don't have this line, so when i run it, nothing affect the database,
i want to know is it a error in "inserts.py"?

Tags: examples
Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

You best look at 'transaction.py': it uses InnoDB storage engine where you need to do an explicit commit. 'inserts.py' uses the default MyISAM (which is non transactional and doesn't need a commit).

It's not an error in 'inserts.py', but indeed, we need to update it a bit to include a db.commit().

Changed in myconnpy:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Geert JM Vanderkelen (geertjmvdk)
tags: added: examples
Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

revno: 177
committer: Geert Vanderkelen <email address hidden>
branch nick: myconnpy-bug504703
timestamp: Thu 2010-01-14 12:18:34 +0100
message:
  Updating inserts.py example so it commits

  * Addign db.commit() to the example just after inserting data.

Changed in myconnpy:
status: Confirmed → Fix Committed
Changed in myconnpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.