It happens because in hsqlsb, currently, data definition language execution is not "transactional"
That is, you cannot roll back table creation, etc. So, if you issue ddl in the middle of a transaction, this is equivalent to an implicit commit. The same is true of many DBMS, including Oracle, MS SQL Server, etc. I can't say off the top of my head, but I'd bet the farm that the same applies to Postgresql, MySQL, etc. In fact, I think you'd have to really search carefully to find the small handfull of systems that actually support ddl operations as undoable transaction items. Where HSQLDB really needs work regarding ddl is not to support undoable itms, but rather to support cross-session ddl locks. For instance, try updating a table inside a transaction in one session, then drop the table inside another session, and then roll back the first session. Likely, you'll get a "table not found" exception in the first transaction, whereas IMO it would probably be better to raise an exception in the second session, stating that one cannot drop or alter the table, because it is in use by another session. ----- Original Message ----- From: Irum Godil <[EMAIL PROTECTED]> Date: Friday, March 11, 2005 11:06 pm Subject: [Hsqldb-developers] Transaction Commit > > Hi, > I am going through the Hsql Database code, and I noticed that in > the class DatabaseCommandInterpreter the call to Session.commit is > happening in a few places. One such example is in method: > > private void processCreateTable(int type) throws HsqlException {...} > > I see that if I have created a table, done some transactions on the > table, and now create a new table; then all the transactions made > on the first table are committed by call to function: > > Session.Commit( ) > > I do not understand why is this being done. If I have turned > AutoCommit to false, then I do not want any commits to happen until > I explicitly call commit( ) right? So, if some transactions are > being committed, then is not that wrong. How is atomicity of > transactions preserved in such a case? > > Thanks. > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ hsqldb-developers mailing list hsqldb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hsqldb-developers