List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:December 20 2005 8:40am
Subject:Re: invalidation rollback?!
View as plain text  
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.


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.

Jörg Brühe

Joerg Bruehe, Senior Production Engineer
invalidation rollback?!wangxu15 Dec
  • Re: invalidation rollback?!Martijn Tonies15 Dec
    • Re: invalidation rollback?!Joerg Bruehe20 Dec