[sqlalchemy] Re: mysql innodb table insert problem

2008-07-12 Thread Rick Morrison
Insert into myisam table worked because it does not support transactions? Yes, to my knowledge mysql with myiasm tables will accept, but ignore any 'begin transaction' or 'commit transaction' statements: they are no-ops. --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: mysql innodb table insert problem

2008-07-11 Thread lilo
If I do manual insert into sql server like INSERT INTO lookup (username, shardname) VALUES ('0', 'shard1');, all works fine. But sqlalchemy doesn't insert for whatever reason into innodb table. Here is my shard session: create_session_lookup = sessionmaker(class_=ShardedSession,

[sqlalchemy] Re: mysql innodb table insert problem

2008-07-11 Thread Rick Morrison
I have shard session set to transactional. Does this conflict with innodb transaction? No, but it means your inner sess.begin() and sess.commit() are now within the scope of an outer transaction, so your inner sess.commit() has no effect. Since you immediately issue a sess.clear() after

[sqlalchemy] Re: mysql innodb table insert problem

2008-07-11 Thread lilo
Thanks, I got it to work now. But why did it work for myisam table in the first place. Shouldn't session scope problem also have affected the inserts for myisam table. Insert into myisam table worked because it does not support transactions? On Jul 11, 4:03 pm, Rick Morrison [EMAIL PROTECTED]