List:Internals« Previous MessageNext Message »
From:Paul McCullagh Date:February 1 2010 3:02pm
Subject:Re: Finding the start of a statement
View as plain text  
On Feb 1, 2010, at 2:06 PM, Sergei Golubchik wrote:

> Hi, Paul!
>
> On Jan 27, Paul McCullagh wrote:
>> I am having a bit of a problem fixing the following bug:
>>
>> https://bugs.launchpad.net/pbxt/+bug/513012
>>
>> The problem is that it leads to "nested statements".
> ...
>> So the INSERT statement is "nested" in the UPDATE statement.
>>
>> My problem is that I need to detect the start and end of statements.
>
> Why do you need to detect the start of the INSERT ?
> Or, in other words, how your inability of detecting a start of the
> INSERT causes the bug lp:513012 ?

During an UPDATE it can happen that the index scan "sees" a row twice  
during the scan if the row is updated.

So the problem concerns detecting which rows have already been  
affected by an UPDATE statement.

The test is failing because when a trigger is called by the update  
statement, then the engine is not correctly detecting the statement  
boundaries.

My question comes from the fact that solving the problem would be easy  
if there was an indication of the start and end of statements in the  
engine API.

If not, then no problem, I am sure I will be able to put something  
together that will work...

>
> Regards,
> Sergei
>
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals?unsub=1
>



--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com



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