List:Internals« Previous MessageNext Message »
From:MARK CALLAGHAN Date:January 29 2010 7:54pm
Subject:Re: Finding the start of a statement
View as plain text  
On Fri, Jan 29, 2010 at 11:29 AM, Michael Widenius <monty@stripped> wrote:
>
> Hi!
>
>>>>>> "Paul" == Paul McCullagh <paul.mccullagh@stripped>
> writes:


> Paul> It would be easy to tell the start and end of statements if these
> Paul> functions were only called ONCE for each statement.
>
> Paul> However, if multiple tables are involved in a statement (which is not
> Paul> the case in the example above), then start_stmt() and reset() are
> Paul> called multiple times for each statement.
>
> Paul> So how do I know where the actual boundaries of the statements are?
>
> Why not simply have a counter in your transaction object for how
> start_stmt - reset();  When this is 0 then you know stmnt ended.
>
> In Maria we count number of calls to external_lock() and when the sum
> goes to 0 we know the transaction has ended.

Why does the solution need to be so obscure?

-- 
Mark Callaghan
mdcallag@stripped
Thread
Finding the start of a statementPaul McCullagh27 Jan
  • re: Finding the start of a statementMichael Widenius29 Jan
    • Re: Finding the start of a statementMARK CALLAGHAN29 Jan
      • Re: Finding the start of a statementPaul McCullagh1 Feb
        • Re: Finding the start of a statementKristian Nielsen1 Feb
          • Re: Finding the start of a statementPaul McCullagh1 Feb
          • Re: Finding the start of a statementKristian Nielsen11 Feb
        • Re: Finding the start of a statementSergei Golubchik1 Feb
          • Re: Finding the start of a statementPaul McCullagh2 Feb
      • Re: Finding the start of a statementMichael Widenius3 Feb
        • Re: Finding the start of a statementMARK CALLAGHAN18 Feb
          • Re: Finding the start of a statementMARK CALLAGHAN18 Feb
  • Re: Finding the start of a statementSergei Golubchik1 Feb
    • Re: Finding the start of a statementPaul McCullagh1 Feb