Hi everybody!

Martijn Tonies wrote:

I execute follow procedure:

-----------------------------------------------------------
create procedure test_transation_rollback()
begin
  start transaction;
  create table t_34d (c1 int,c2 char(30));
  rollback;
end
------------------------------------------------------------

After execute this procedure,i find the table "t_34d" in my schema.Why?



Metadata transactions are not supported in MySQL.

Right.

Most systems call it "DML" ("data manipulation language": insert, update, select, and delete commands) versus "DDL" ("data definition language": create/alter/drop table/view, grant/revoke, ... commands),
but the result is the same:

Typically, transactions only cover DML commands,
whereas for DDL often an implicit "autocommit" applies.
Some systems even implicitly commit DML commands when executing a following DDL.

As a consequence, the recommendation is not to try to mix DML and DDL within one transaction, and to issue a "commit" immediately after any DDL command. In this way, effects on all systems should be identical.

Every other style of application programming may be specific to one DBMS, and requires detailed checking against the manual.


HTH,
Jörg Brühe

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to