Fair enough, though it appears to be a little inconsistent and thus confusing, since I do see COMMIT statements in the log output.
For instance, rearranging the below to: user = User.query.filter_by(id=1).first() user.x = user.x + 1 elixir.session.commit() results in a BEGIN, SELECT, UPDATE, COMMIT log output. When I introduce another query before the commit, the COMMIT is never printed. On Feb 10, 9:14 am, Michael Bayer <[email protected]> wrote: > On Feb 10, 2011, at 6:10 AM, Romy wrote: > > > > > > > > > > > I am testing autocommit=False, and the output pattern is consistently > > missing a COMMIT. I don't quite understand what SQLAlchemy is doing in > > its debug output, unless it's not printing everything that goes to > > MySQL. Specifically, for code that looks like this: > > > user = User.query.filter_by(id=1).first() > > user.x = user.x + 1 > > emails = Emails.query.filter_by(user=user).all() > > elixir.session.commit() > > elixir.session.remove() > > > I get this info-level debug output: > > > BEGIN > > SELECT user > > UPDATE user > > SELECT emails > > > And no COMMIT in sight. The database does appear to get updated... not > > sure what's happening ? > > MySQL MyISAM tables, the default, have no transactional behavior and all data > is committed upon INSERT. > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sqlalchemy" 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 > > athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
