List:Internals« Previous MessageNext Message »
From:Zardosht Kasheff Date:July 3 2010 1:27am
Subject:handler interface question: transactions and "create function"
View as plain text  
I have seen some curious behavior with storage engines, and I was
wondering what the motivation is.

Suppose autocommit=0;

If I do the following:
lock tables foo write;
insert into foo values (1);
insert into foo values (2);
unlock tables;

Our engine is transactional. In the above case, each insert statement
gets a call to start_stmt registers a transaction by calling
trans_register_ha, and at the end of each statement,
handlerton->commit is called.

However, if I have a function:
create function bug13825_2() returns int
begin
  insert into t1 values (1);
  insert into t1 values (2);
  return 1;
end|

and if I execute this function, for each statement, start_stmt is
called, but handlerton->commit is NOT called.

Why is handlerton->commit not called in this case? Is this a bug?

Thanks
-Zardosht
Thread
handler interface question: transactions and "create function"Zardosht Kasheff3 Jul
  • Re: handler interface question: transactions and "create function"Venu Kalyan3 Jul
    • Re: handler interface question: transactions and "create function"Zardosht Kasheff3 Jul
      • Re: handler interface question: transactions and "create function"Konstantin Osipov3 Jul