Hi!
On Jul 12, Sergei Golubchik wrote:
> On Jun 26, Andrei Elkin wrote:
> > ChangeSet@stripped, 2007-06-26 18:21:52+03:00,
> aelkin@stripped +18 -0
> > Bug #27417 thd->no_trans_update.stmt lost value inside of
> > SF-exec-stack
...
> > --- 1.617/sql/sql_parse.cc 2007-04-03 14:11:32 +03:00
> > +++ 1.618/sql/sql_parse.cc 2007-06-26 18:21:48 +03:00
> > @@ -2587,6 +2587,8 @@ mysql_execute_command(THD *thd)
> > statistic_increment(thd->status_var.com_stat[lex->sql_command],
> > &LOCK_status);
> >
> > + thd->transaction.stmt.modified_non_trans_table= FALSE;
>
> Hm, I don't think it's a good idea.
> transaction.stmt describes a "statement transaction", that's BDB-ism,
> but still it refers to the statement, as a whole, the unit of work that
> will be rolled back on, for example, unique constraint violation.
>
> You're using thd->transaction.stmt.modified_non_trans_table, in fact, as
> a *sub-statement* flag, not a *statement*. Having a sub-stmt flag in
> transaction.stmt is VERY confusing.
I couldn't find a better place though, and after discussion with Kostja
we decided to keep it as is, and to add an appropriate comment.
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Radlkoferstr. 2, D-81373 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140